Please answer the quiz and click the "Test" button at the bottom right.This quiz is part of the DevOpsTheHardWay course.
AWS - SQS and SNS - multichoice questions
You are building order-processing application to processes customer's orders. You use an SQS queue as the underlying mechanism to process customer purchase (sending confirmation email, issue an order report, etc..).
Which SQS queue best fits for this task?
- Standard
- FIFO
- Both standard or FIFO
- Dead letter queue
Question 1
You are building a real-time messaging application where users can send and receive messages to each other. You use an SQS queue as the underlying mechanism to transfer messages between users.
Which SQS queue best fits for this task?
- Standard
- FIFO
- Both standard or FIFO
- Dead letter queue
Question 2
You manage a web application on EC2 instances. Your website occasionally experiences brief but large spikes in traffic that cause your EC2 instances’ resources to become overwhelmed and the application to freeze up and lose recently submitted requests from end users. You use Auto Scaling to deploy additional resources to handle the load during spikes, but the new instances do not deploy fast enough to prevent the existing application servers from freezing. Assuming you cannot find a pattern to when these spikes occur, which of the following is likely to provide the most cost-effective solution to avoid losing recently submitted requests?
- Use larger instances for your application.
- Keep one extra EC2 instance always powered on in case a spike occurs.
- Pre-warm your Elastic Load Balancer.
- Use an SQS queue to decouple the application components.
Question 3
You are the DevOps engineer responsible for designing an event notification system for a popular e-commerce platform. The platform uses the same topic for both order placements and order cancellations.
Which type of topic would you choose?
- Standard
- FIFO
- It doesn't matter
- Dead letter topic
Question 4
You are tasked with designing a real-time AI system for a cloud-based application that processes user-generated content. The application consists of several microservices that handle different aspects of content processing, such as image recognition, text analysis, and sentiment analysis.
To achieve this, you plan to utilize SNS in conjunction with multiple SQS queues. Which architectural approach would be most suitable for implementing this system?
- Each microservice will have its own separate SNS topic. Content processing job will be directly sent to the SQS queue, which will then distribute messages to the appropriate topic.
- Each microservice will send its notifications directly to a centralized SQS queue, and SNS will be used solely for email notifications.
- Each microservice will have its own separate SQS queue. Content processing job will be directly sent to the SNS topic, which will then distribute messages to the appropriate SQS queues.
- All microservices will send their notifications directly to a single SQS queue, and SNS will be used for distributing messages to subscribers.
- SNS will handle all notifications and directly send them to subscribers, eliminating the need for SQS queues.
Question 5
Given the below list, choose 1 usage of SNS for customer facing purpose (application-to-person messaging), and one usage for internal systems (application-to-application messaging).
- Streaming real-time analytics data from a database to an Amazon S3 bucket for long-term storage.
- Distributing messages among microservices within an application to ensure inter-service communication.
- Storing backups of Amazon RDS database snapshots in Amazon SNS for instant recovery in case of data loss.
- Replicating data between Amazon S3 buckets across different AWS regions for data redundancy.
- Managing user authentication and authorization for an application by centralizing user profiles and access control lists.
- Triggering automated scaling of Amazon EC2 instances based on CPU utilization metrics.
- Notifying subscribers about stock market price changes in real time.
Question 6
You are designing a notification system using SNS for an application that sends critical alerts to different endpoints. However, you are aware that subscribers' endpoints might experience occasional short outages, causing message delivery failures.
To ensure message delivery and prevent data loss, what strategy can you employ based on SNS features?
- Manually re-send the messages to the subscribers once their endpoints become available.
- Enable a paid feature of SNS to automatically re-send the messages until subscribers' endpoints become available.
- Use "Try and catch" mechanism within the SNS topic.
- Create a dead-letter queue to store any messages that aren't delivered before the delivery retry policy ends.
- No need to create any strategy as retry mechanism is already built in SNS.