YouTube2Text

AWS SQS vs SNS Explained! | Application Integration (Day 15) — Transcript

by Pawan Joshi · 3,618 words · 654 segments · language en · Watch on YouTube

Full transcript

  1. 0:02Hey everyone, welcome back and a huge
  2. 0:04congratulations because today we are
  3. 0:06kicking off week three of our journey.
  4. 0:08This is day 15 of 21, which means you
  5. 0:10are already past 2/3 of the way through
  6. 0:12this course.
  7. 0:13Give yourself credit for that.
  8. 0:15Today's topic is called application
  9. 0:17integration services, and honestly, this
  10. 0:19is one of my favorite topics in the
  11. 0:20entire course because it explains
  12. 0:23something that most beginners never
  13. 0:24really think about. How do different
  14. 0:26parts of an application actually talk to
  15. 0:28each other?
  16. 0:29When you open an app like Amazon or
  17. 0:30Swiggy or Zomato, you are not just
  18. 0:32talking to one giant program. Behind the
  19. 0:34scenes, there are dozens of small
  20. 0:35independent services. One service
  21. 0:37handles your login, another handles
  22. 0:39payment, another handles inventory,
  23. 0:41another sends you notifications.
  24. 0:44These services need a way to communicate
  25. 0:45and pass information to each other
  26. 0:47reliably, safely, and without one
  27. 0:48service crashing the whole system if it
  28. 0:50goes down.
  29. 0:51That's exactly what we are covering
  30. 0:53today. We will look at three core AWS
  31. 0:55services that let applications talk to
  32. 0:57each other.
  33. 0:58Amazon SQS,
  34. 1:00Amazon SNS,
  35. 1:02and Amazon EventBridge. Plus two more
  36. 1:05services that help you build and
  37. 1:06orchestrate modern applications. API
  38. 1:08Gateway
  39. 1:10and Step Functions.
  40. 1:12This falls under domain three, cloud
  41. 1:13technology and services, which is worth
  42. 1:16a massive 34% of your exam.
  43. 1:18The single biggest domain of
  44. 1:20this whole CLF-C02 exam. So, pay close
  45. 1:23attention because what you learn today
  46. 1:24is going to show up again and again in
  47. 1:26your exam questions. By the end of
  48. 1:28today, you will be able to clearly tell
  49. 1:29the difference between SQS, SNS, and
  50. 1:31EventBridge, and know exactly which one
  51. 1:33to pick in an exam scenario. You will be
  52. 1:35able to compare SQS standard queue
  53. 1:37versus FIFO queue, and know when to use
  54. 1:40each.
  55. 1:41You will understand what API Gateway and
  56. 1:43Step Functions actually do in a
  57. 1:45serverless architecture.
  58. 1:47And after the theory, we are jumping
  59. 1:48into a hands-on lab where you will
  60. 1:49create a real SQS queue in your own AWS
  61. 1:52account. You will send a message into it
  62. 1:54and receive it back. So, you are not
  63. 1:55just memorizing definitions. You're
  64. 1:57actually doing the thing.
  65. 1:59So, let's get into it.
  66. 2:01Before we jump into specific services, I
  67. 2:03want you to understand why this topic
  68. 2:05exist at all. Why does AWS even need
  69. 2:08queues and notification system? What is
  70. 2:10the problem are we actually solving
  71. 2:12here?
  72. 2:13Let's talk about tight coupling first.
  73. 2:15Imagine you build an e-commerce website
  74. 2:17the old-fashioned way. A single big
  75. 2:20application where the checkout process
  76. 2:22directly calls payment service
  77. 2:25which directly calls inventory service
  78. 2:30which directly calls the shipping
  79. 2:31service all in a long connected chain.
  80. 2:35This is called a tightly coupled
  81. 2:36architecture.
  82. 2:38Now, here's the problem. What happens if
  83. 2:39the shipping service goes down for
  84. 2:41maintenance at 2:00 a.m.?
  85. 2:43In a tightly coupled system, the
  86. 2:44complete the entire chain breaks.
  87. 2:47Your customer can't even complete a
  88. 2:49purchase even though shipping wasn't
  89. 2:50even needed yet at that stage. This is
  90. 2:53what we call a
  91. 2:54brittle chain.
  92. 2:56One single point of failure can bring
  93. 2:58down the whole system and failures
  94. 3:00cascade through the entire architecture
  95. 3:01like dominoes falling.
  96. 3:04You must have seen those.
  97. 3:05Now, compare that to a loosely coupled
  98. 3:07architecture. What do you mean by that?
  99. 3:09Here, each component doesn't talk
  100. 3:11directly to the next one. Instead, they
  101. 3:13communicate through a buffer layer. A
  102. 3:15middleman that holds messages safely
  103. 3:17until the next service is ready to
  104. 3:19process them. If the shipping service
  105. 3:21goes down for 10 minutes, no problem.
  106. 3:23The order just waits safely in a queue.
  107. 3:25And the moment shipping comes back
  108. 3:26online, it picks up right where it left
  109. 3:28off.
  110. 3:30Nothing is lost. Nothing crashes. The
  111. 3:31customer checkout is still complete
  112. 3:33successfully.
  113. 3:34This is the entire philosophy behind
  114. 3:36today's lesson. Buffered components are
  115. 3:38resilient, independently scalable, and
  116. 3:40fault tolerant.
  117. 3:42Each piece of your application can fail,
  118. 3:44restart, or scale up, scale down on its
  119. 3:46own without taking the rest of system
  120. 3:48down with it.
  121. 3:49Okay, so here's exactly what we are
  122. 3:51covering today step-by-step.
  123. 3:53Number one, the case of decoupling.
  124. 3:55Which we just covered why tight coupling
  125. 3:57is a reliability risk.
  126. 3:59Number two, SQS vs. SNS.
  127. 4:03This is without a doubt the single most
  128. 4:05important comparison in this entire
  129. 4:06domain for your exam. If you remember
  130. 4:08only one thing from today, remember this
  131. 4:10one.
  132. 4:12Number three, SQS standard vs. FIFO
  133. 4:14queues. Two flavors of the same service
  134. 4:16and knowing when to use which one is a
  135. 4:18very common exam trap.
  136. 4:20Number four, a quick but important
  137. 4:21overview of EventBridge, API Gateway,
  138. 4:24and Step Functions.
  139. 4:26Number five, our hands-on lab, where we
  140. 4:28will actually create an SQS queue, send
  141. 4:30a message into it, receive it, and
  142. 4:32delete it. The full life cycle.
  143. 4:34All right, let's start with a big one.
  144. 4:37All right, this slide has an exam focus
  145. 4:38tag on it for a reason. Questions
  146. 4:40comparing SQS and SNS show up constantly
  147. 4:43on the real exam. So, let's build a
  148. 4:44rock-solid mental picture of both.
  149. 4:47First, let's talk about Amazon SQS.
  150. 4:50Simple Queue Service.
  151. 4:52Think of SQS like a postal mailbox.
  152. 4:55Imagine you drop a letter into a
  153. 4:56mailbox, that letter sits there safely
  154. 4:58until exactly one person, the postman or
  155. 5:01whoever owns that mailbox, comes and
  156. 5:03picks it up.
  157. 5:04Once it is picked up and read, the
  158. 5:06letter is gone. Nobody else gets a copy
  159. 5:08of it.
  160. 5:10That's exactly how SQS behaves.
  161. 5:13It's called a point-to-point messaging
  162. 5:15pattern, and here's the flow
  163. 5:16step-by-step.
  164. 5:17A producer, some part of your
  165. 5:19application, places a message into the
  166. 5:21queue.
  167. 5:22The queue stores that message durably,
  168. 5:24meaning it's saved safely, even if
  169. 5:26nothing is reading it yet.
  170. 5:28A consumer, another part of your
  171. 5:29application, comes along, retrieves the
  172. 5:31message, and processes it.
  173. 5:34Once processing is done, the consumer
  174. 5:36deletes the message from the queue.
  175. 5:38The key idea to lock into your brain
  176. 5:40here is one message goes to one
  177. 5:42consumer, and it's a consumed exactly
  178. 5:44once. Even if you have multiple
  179. 5:46consumers attached to the same queue,
  180. 5:48each individual message will only ever
  181. 5:50be picked up and processed by only one
  182. 5:52of them.
  183. 5:53Not all of them.
  184. 5:55Let's take a real use case.
  185. 5:56Imagine an e-commerce site. A customer
  186. 5:59places an order.
  187. 6:00That order placed event goes into an SQS
  188. 6:03queue.
  189. 6:04On the other side, your payment
  190. 6:05processing service picks up orders from
  191. 6:07that queue one at a time in a controlled
  192. 6:09sequential way, processing them without
  193. 6:11getting overwhelmed by the sudden burst
  194. 6:13of traffic.
  195. 6:14SQS acts like a shock absorber. Even if
  196. 6:1610,000 orders come in during a flash
  197. 6:18sale, they queue up nicely and get
  198. 6:20processed steadily instead of crashing
  199. 6:22your payment system.
  200. 6:24Now, let's talk about Amazon SNS, that
  201. 6:26is Simple Notification Service.
  202. 6:29If SQS is a postal mailbox, think of SNS
  203. 6:32like a broadcast announcement.
  204. 6:34Like a school PA system or a group email
  205. 6:37blast.
  206. 6:38When one message goes out, everybody who
  207. 6:40is subscribed hears it at the same time.
  208. 6:42SNS works on something called a pub/sub
  209. 6:45pattern, which stands for
  210. 6:46publish/subscribe.
  211. 6:49There's a publisher
  212. 6:51who sends out a single message to
  213. 6:53something called an SNS topic.
  214. 6:57That topic can have multiple subscribers
  215. 6:59attached to it, and when the message is
  216. 7:01published, every single subscriber gets
  217. 7:03a copy of it simultaneously.
  218. 7:05This is also called a fan out pattern
  219. 7:08because one message fans out to many
  220. 7:09destinations at once.
  221. 7:11Let's take one real use case. Let's say
  222. 7:13a new user signs up on the application.
  223. 7:16That user registered event gets
  224. 7:18published to an SNS topic.
  225. 7:20Now, at the exact same moment, an email
  226. 7:22service subscriber sends the user a
  227. 7:23welcome email.
  228. 7:25An analytics service subscriber logs
  229. 7:27this new registration event for
  230. 7:28reporting.
  231. 7:29A CRM system subscriber updates the
  232. 7:31customer relationship database with this
  233. 7:33new user details.
  234. 7:35All three of these things happen
  235. 7:37simultaneously, triggered by that one
  236. 7:39single publish action. None of them wait
  237. 7:41for each other.
  238. 7:42That's the power of fan out.
  239. 7:44So, here's the one-line summary you
  240. 7:45should memorize for the exam.
  241. 7:47SQS is equal to
  242. 7:50one message, one consumer,
  243. 7:53point-to-point.
  244. 7:55Message deleted after
  245. 7:57being processed.
  246. 8:00SQS equal to
  247. 8:02one message,
  248. 8:04many subscribers,
  249. 8:07all triggered at the same time, fan out
  250. 8:10pattern.
  251. 8:11If an exam question says something like,
  252. 8:13"We need to decouple our order
  253. 8:14processing so a single service can pick
  254. 8:16up and process each order."
  255. 8:18That's SQS. But, if the question says,
  256. 8:21"We need to notify multiple different
  257. 8:23systems at once when an event happens."
  258. 8:26That's SNS.
  259. 8:29Now that you have understood what SQS
  260. 8:31is, I need to tell you something
  261. 8:33important.
  262. 8:34SQS actually comes in two different
  263. 8:36flavors, and choosing the wrong one in
  264. 8:38the real system or on your exam can
  265. 8:40completely outcome. Let's break them
  266. 8:43down.
  267. 8:44We have a standard queue. This is the
  268. 8:46default type of SQS queue, and it's
  269. 8:48built for raw speed and massive scale.
  270. 8:51It has three defining characteristics.
  271. 8:54At least once delivery. This means a
  272. 8:57message is guaranteed to be delivered,
  273. 8:59but in rare cases it might accidentally
  274. 9:01be delivered more than once. Yes,
  275. 9:03duplicates are technically possible.
  276. 9:06The another one is best effort ordering.
  277. 9:09AWS tries its best to keep messages in
  278. 9:11the order you sent them, but it's not
  279. 9:13guaranteed. Messages might occasionally
  280. 9:15arrive out of sequence.
  281. 9:18Virtually unlimited throughput. Standard
  282. 9:20queues can handle an enormous, almost
  283. 9:22unlimited number of transactions per
  284. 9:24second.
  285. 9:26Where would you use a standard queue?
  286. 9:28Anywhere high volume matters more than
  287. 9:30perfect precision. Think log processing,
  288. 9:32best data uploads, or any fault tolerant
  289. 9:34workload where occasionally processing
  290. 9:36the same thing twice isn't a big deal.
  291. 9:39Now, let's discuss FIFO queue.
  292. 9:41FIFO stands for first-in, first-out,
  293. 9:44meaning messages come out in exactly the
  294. 9:45same order they went in. No exceptions.
  295. 9:48This queue type is built for precision,
  296. 9:50not raw speed. Its characteristics are
  297. 9:53exactly once processing, no duplicates
  298. 9:55guaranteed. A message will be processed
  299. 9:58one time and only one time.
  300. 10:01Strict message ordering. Messages are
  301. 10:03always delivered in the exact sequence
  302. 10:05they were sent.
  303. 10:07Limited throughput, a maximum of 3,000
  304. 10:09transactions per second when using
  305. 10:11batching. That's still fast, but nowhere
  306. 10:13nearly the virtual unlimited throughput
  307. 10:15of a standard queue.
  308. 10:16Here's something AWS strictly enforces.
  309. 10:19The name of every FIFO queue must end
  310. 10:20with the .fifo suffix.
  311. 10:23If you try to create a FIFO queue
  312. 10:24without that suffix, AWS will simply
  313. 10:26reject it. This is a small detail, but
  314. 10:28exams love testing small enforced
  315. 10:30details like this. So, where would you
  316. 10:32use a FIFO queue?
  317. 10:34Anywhere that duplicate processing would
  318. 10:36be a disaster. Think about financial
  319. 10:37transactions. If a customer credit cards
  320. 10:40get accidentally charged twice because
  321. 10:41of a duplicate message, that's a serious
  322. 10:44problem
  323. 10:45both for the customer and for your
  324. 10:46business.
  325. 10:47Same with e-commerce order processing.
  326. 10:49You never want that the same order
  327. 10:51accidentally submitted twice.
  328. 10:53Here's the exam pattern you must
  329. 10:54memorize. Whenever you see a question
  330. 10:56that mentions no duplicate processing,
  331. 10:59exactly once, or financial transactions
  332. 11:02that must not be processed twice,
  333. 11:05the answer is almost always SQS FIFO
  334. 11:07queue.
  335. 11:08Keep that phrase logged in your memory.
  336. 11:09No duplicates, financial transactions
  337. 11:11equals FIFO. And don't forget that the
  338. 11:14queue name has to end with .fifo suffix.
  339. 11:18Now, let's quickly cover three more
  340. 11:20services that round out the application
  341. 11:22integration picture.
  342. 11:23These come up less frequently than SQS
  343. 11:25versus SNS on the exam, but you
  344. 11:27absolutely need to know what each one
  345. 11:29does and, more importantly, what makes
  346. 11:31each one different from the others?
  347. 11:34Amazon EventBridge. Think of EventBridge
  348. 11:36as a serverless event bus. Basically, a
  349. 11:39smart traffic controller for events
  350. 11:41happening across your AWS environment.
  351. 11:43You create rules that say, "When this
  352. 11:45specific event occurs, automatically
  353. 11:47route it to that specific target."
  354. 11:50Let's take a real example.
  355. 11:52Say an EC2 instance gets terminated.
  356. 11:55You can set up an EventBridge rule that
  357. 11:56says, "Whenever an EC2 instance
  358. 11:58terminates, automatically trigger a
  359. 12:00Lambda cleanup function." Maybe to clean
  360. 12:02up leftover resources, update a
  361. 12:03database, or send an alert.
  362. 12:06This all happens automatically without a
  363. 12:08human lifting a finger.
  364. 12:10EventBridge isn't just for AWS own
  365. 12:12internal events, either. It can also
  366. 12:13react to events from SaaS applications
  367. 12:15like you must have heard about Zendesk
  368. 12:17or Shopify, and even your own custom
  369. 12:20application events.
  370. 12:21Basically, if something happens,
  371. 12:22EventBridge can catch it and route it
  372. 12:24wherever it needs to go
  373. 12:26based on the rules you define in it.
  374. 12:29The next one is Amazon API Gateway.
  375. 12:32Think of API Gateway as the front door
  376. 12:33of your backend services.
  377. 12:35When outside applications, mobile apps,
  378. 12:37or website wants to talk to a backend,
  379. 12:39they don't talk to it directly. They go
  380. 12:42through an API Gateway first.
  381. 12:44API Gateway lets you build and manage
  382. 12:46REST APIs, HTTP APIs, and WebSocket
  383. 12:49APIs. And it comes packed with useful
  384. 12:52built-in features so you don't have to
  385. 12:53build them yourself.
  386. 12:55It has built-in rate limiting,
  387. 12:57authorization, catching, request
  388. 12:59validation, and SSL termination. What do
  389. 13:01these mean? Rate limiting means
  390. 13:02controlling how many requests a client
  391. 13:04can make to prevent abuse or overload.
  392. 13:07Authorization means checking whether the
  393. 13:09person calling your API is actually
  394. 13:11allowed it to.
  395. 13:13Catching
  396. 13:15is storing frequent responses so your
  397. 13:17backend doesn't get hit with repeat
  398. 13:18requests.
  399. 13:20And we have request validation. That
  400. 13:21means making sure incoming data is
  401. 13:23properly formatted before it even
  402. 13:25reaches your backend.
  403. 13:27And talking about SSL termination, it
  404. 13:28means handling the secure HTTPS
  405. 13:30encryption or decryption, so your
  406. 13:32back-end servers don't have to.
  407. 13:34Basically, API Gateway sits at the entry
  408. 13:36point of your architecture and handles
  409. 13:38all the traffic management work before
  410. 13:40request even reach your actual
  411. 13:41application logic.
  412. 13:43The next service we have is AWS Step
  413. 13:45Functions.
  414. 13:46Step Functions is all about workflow
  415. 13:48orchestration using something called a
  416. 13:49state machine.
  417. 13:51Imagine you have a complex process with
  418. 13:53many steps. Maybe a validate an order,
  419. 13:56check inventory, charge the payment,
  420. 13:58update the database, then send a
  421. 13:59confirmation email as well.
  422. 14:01Instead of writing messy code to
  423. 14:03manually chain all these steps together,
  424. 14:05Step Functions lets you visually design
  425. 14:07the entire workflow step-by-step. And it
  426. 14:10comes with powerful building
  427. 14:11capabilities.
  428. 14:13We have retry logic, that means
  429. 14:14automatically retrying a step if it
  430. 14:16fails, instead of the whole workflow
  431. 14:18crashing.
  432. 14:19We have error handling, that is
  433. 14:21gracefully catching failures and
  434. 14:22deciding what to do next.
  435. 14:24Conditional branching,
  436. 14:26that is taking different path depending
  437. 14:28on the outcome of a step. Like an if
  438. 14:31this, then that logic.
  439. 14:33Another is parallel execution, running
  440. 14:35multiple steps at the same time when
  441. 14:37they don't depend on each other.
  442. 14:39And here's a very common real-world
  443. 14:40combo you should remember.
  444. 14:42SQS plus Lambda is probably the most
  445. 14:44common serverless message processing
  446. 14:46pattern you will see in real AWS
  447. 14:47architectures. Here's how it works.
  448. 14:50Messages land in an SQS queue, and the
  449. 14:52AWS Lambda automatically pulls that
  450. 14:54queue in the background, picking up
  451. 14:56messages as they arrive and processing
  452. 14:57them. Completely serverless with no
  453. 15:00server management required on your end.
  454. 15:03This combination shows up constantly in
  455. 15:04real production systems, and it's a
  456. 15:06pattern worth remembering both for your
  457. 15:07exam and for your future projects as
  458. 15:09well.
  459. 15:14All right, theory is done. Now, let's
  460. 15:15get our hands dirty. This is where
  461. 15:18things get really fun because you are
  462. 15:19going to to
  463. 15:20and use a real SQS queue with your own
  464. 15:22hands right inside your AWS account.
  465. 15:25Make sure you're logged in into AWS
  466. 15:26Management Console before we start and
  467. 15:28let's go step-by-step together.
  468. 15:31First in the AWS Console search bar at
  469. 15:33the top, type in SQS
  470. 15:37and click on Amazon SQS to open the
  471. 15:39service.
  472. 15:41And once you're in the SQS dashboard,
  473. 15:43click on create queue button.
  474. 15:46Now you will see two options, standard
  475. 15:48or FIFO.
  476. 15:50For this lab we are going to select
  477. 15:52standard since we just want to
  478. 15:54understand the basic message life cycle
  479. 15:56first.
  480. 15:57And for the name, type in
  481. 15:59my
  482. 16:01test queue.
  483. 16:03You will notice a setting called
  484. 16:04visibility timeout. Leave this at the
  485. 16:07default of 30 seconds. I want you to
  486. 16:09remember this setting because it's
  487. 16:10actually really important and I will
  488. 16:12explain exactly why in a moment.
  489. 16:15Uh leave every other setting all at its
  490. 16:17default value and click on create queue
  491. 16:19at the bottom.
  492. 16:21All right, congratulations. You just
  493. 16:23created your very first SQS queue.
  494. 16:27Now click on the queue that you just
  495. 16:29created to open it and then click on the
  496. 16:31button that says send and receive
  497. 16:33messages.
  498. 16:34And in the message body, type
  499. 16:37uh this like hello from
  500. 16:40SQS.
  501. 16:42All right, now click on send message.
  502. 16:45You should see a success notification
  503. 16:47pop up along with this uh unique message
  504. 16:49ID.
  505. 16:50This confirms that your message was
  506. 16:51successfully stored in the queue.
  507. 16:53And if you scroll down and check uh this
  508. 16:56metric,
  509. 16:57uh you can see the receive message
  510. 16:59section, there is uh it is showing one
  511. 17:00message and confirming there is exactly
  512. 17:03one message sitting in the your queue
  513. 17:04right now waiting to be picked up.
  514. 17:06So in the receive message section only,
  515. 17:09uh click on the button labeled poll for
  516. 17:11messages.
  517. 17:13This is basically you acting as a
  518. 17:15consumer and you are asking the queue,
  519. 17:16"Hey, do you have anything for me?" And
  520. 17:18within a moment, your message would
  521. 17:19appear in the list below.
  522. 17:21Here, click on the message.
  523. 17:23Now, you can see you will be able to
  524. 17:25read the full message body that you
  525. 17:26typed exactly earlier.
  526. 17:29Now, click on delete. Let's delete it.
  527. 17:33Uh
  528. 17:33So, it will remove the message from the
  529. 17:35queue permanently.
  530. 17:37So, here's the important part I promised
  531. 17:38to explain,
  532. 17:40the visibility timeout. When you poll
  533. 17:42for a message and it appeared to you,
  534. 17:44SQS didn't just leave it to uh visible
  535. 17:46to everyone. It temporarily hid that
  536. 17:47message from any other consumer for 30
  537. 17:49seconds, the visibility timeout we set
  538. 17:51earlier.
  539. 17:52This exists specifically to prevent
  540. 17:54duplicate processing. Imagine if two
  541. 17:57different consumers grab the exact same
  542. 17:59message at the same time and both try to
  543. 18:01process it.
  544. 18:02That could cause serious problems, like
  545. 18:04charging a customer twice.
  546. 18:06So, here's a golden rule. If you don't
  547. 18:08delete the message within the uh that
  548. 18:1030-second visibility timeout window, it
  549. 18:12automatically reappears in the queue,
  550. 18:14becoming available for another consumer
  551. 18:16to pick up. This is by design. It's
  552. 18:19SQS's way of guaranteeing that messages
  553. 18:21never get silently lost, even if the
  554. 18:23consumer get that grabbed them crashes
  555. 18:25or fails before finishing the job.
  556. 18:28Okay, now if you want to go a step
  557. 18:30further, let's click on create queue
  558. 18:32again.
  559. 18:33But this time, select FIFO.
  560. 18:36For the name, let's type my FIFO
  561. 18:40. FIFO.
  562. 18:42Notice something here? Uh AWS will not
  563. 18:45let you create unless the name ends with
  564. 18:47.FIFO.
  565. 18:49This is exactly the enforced naming rule
  566. 18:51we talked about earlier in the theory
  567. 18:53section.
  568. 18:54Try removing that suffix and you will
  569. 18:55see AWS immediately throws an error.
  570. 18:58While setting this up, uh you can also
  571. 19:00enable a feature called content-based
  572. 19:02deduplication,
  573. 19:04which tells AWS to automatically detect
  574. 19:06and eliminate duplicate messages based
  575. 19:08on their content. Handy feature that
  576. 19:10enforces the exactly one guarantee of
  577. 19:12FIFO queues.
  578. 19:13Go ahead and click create queue and then
  579. 19:16try sending a few messages into this
  580. 19:18FIFO queue one after another.
  581. 19:20When you receive them, notice how they
  582. 19:21always come out in the exact same order
  583. 19:24you sent them. That strict ordering
  584. 19:26guarantee in action, something a
  585. 19:27standard queue can't promise you.
  586. 19:29All right, so take your time with this
  587. 19:31lab, play around with it, send a few
  588. 19:33more messages, delete a few, and get
  589. 19:35really comfortable with how a queue
  590. 19:37behaves.
  591. 19:38Because this hands-on understanding is
  592. 19:40going to help you far more than just
  593. 19:41memorizing the definitions.
  594. 19:44First, SQS versus SNS.
  595. 19:47SQS is a message queue that works on a
  596. 19:49point-to-point pattern. Each message is
  597. 19:51consumed exactly once by one consumer.
  598. 19:55And SNS is a pub/sub notification system
  599. 19:58that works on a fan-out pattern. That
  600. 20:00is, one message goes out to all
  601. 20:02subscribers simultaneously.
  602. 20:04Second, standard versus FIFO queues.
  603. 20:07A standard queue gives you virtually
  604. 20:09unlimited throughput, but duplicates are
  605. 20:11possible and ordering isn't guaranteed
  606. 20:12as well.
  607. 20:14A FIFO queue guarantees exactly-once
  608. 20:17processing and strict ordering.
  609. 20:19But at a lower throughput cap of 3,000
  610. 20:22transactions per second. And its name
  611. 20:24must always end in .fifo.
  612. 20:28Third, the wider integration ecosystem.
  613. 20:30EventBridge handles event-driven
  614. 20:32routing, reacting automatically to
  615. 20:34events and routing them to targets.
  616. 20:36API Gateway acts as a front door API
  617. 20:39layer for your back-end services. And
  618. 20:41Step Functions handles multi-step
  619. 20:43workflow orchestration, coordinating
  620. 20:44complex processes with retry logic and
  621. 20:46error handling built right in.
  622. 20:49So, for tonight practice, go and attempt
  623. 20:5110 questions which are in the notes and
  624. 20:54pay close attention to how questions are
  625. 20:56worded. Like,
  626. 20:57words like decouple, notify multiple
  627. 21:00systems, no duplicates, and event-driven
  628. 21:02are all clues pointing toward a specific
  629. 21:05service.
  630. 21:06The exam loves testing these subtle
  631. 21:08keyword patterns and so the more you
  632. 21:10practice spotting them, the faster and
  633. 21:12more confidently you will answer the on
  634. 21:13the exam day.
  635. 21:15And a quick look ahead, tomorrow is day
  636. 21:1716 and we are moving into security
  637. 21:19tools. We will be covering guard duty,
  638. 21:21WAF, shield, Macy, inspector, KMS and
  639. 21:25secret manager.
  640. 21:27Yes, that's a lot of services in one
  641. 21:28day, but don't worry, each one maps very
  642. 21:30clearly to a specific security use case.
  643. 21:33And once you see the pattern, it all
  644. 21:35clicks into place quickly.
  645. 21:37That's it for day 15. You now understand
  646. 21:39how modern resilient AWS applications
  647. 21:41talk to each other behind the scenes.
  648. 21:44And you have built a working SQS queue
  649. 21:46with your own hands. That's real
  650. 21:48practical progress. Great job today. Go
  651. 21:50finish up those practice questions, get
  652. 21:52some rest and I will see you tomorrow
  653. 21:53for day 16. Keep going, keep doing. You
  654. 21:56are doing great.

About this transcript

This page contains the full transcript of AWS SQS vs SNS Explained! | Application Integration (Day 15) by Pawan Joshi, generated from the public captions YouTube serves with the video. The transcript has 3,618 words across 654 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.