23 AWS SQS real exam questions

AWS Certified Developer

Wed, 04 Nov 2020

1. A serverless application uses an API Gateway and AWS Lambda. Where should the Lambda function store its session information across function calls?

A. In an Amazon DynamoDB table

B. In an Amazon SQS queue

C. In the local filesystem

D. In an SQLite session table using “DSQLITEENABLESESSION”

Correct answer: A

2. An application is designed to use Amazon SQS to manage messages from many independent senders. Each sender’s messages must be processed in the order they are received. Which SQS feature should be implemented by the Developer?

A. Configure each sender with a unique MessageGroupId

B. Enable MessageDeduplicationIds on the SQS queue

C. Configure each message with unique MessageGroupIds.

D. Enable ContentBasedDeduplication on the SQS queue

Correct answer: to review, candidate is A but demostrate if C is true

3. An application will ingest data at a very high throughput from many sources and must store the data in an Amazon S3 bucket. Which service would BEST accomplish this task?

A. Amazon Kinesis Firehose

B. Amazon S3 Acceleration Transfer

C. Amazon SQS

D. Amazon SNS

Correct answer: A

4. A game stores user game data in an Amazon DynamoDB table. Individual users should not have access to other users’ game data. How can this be accomplished?

A. Encrypt the game data with individual user keys.

B. Restrict access to specific items based on certain primary key values.

C. Stage data in SQS queues to inject metadata before accessing DynamoDB.

D. Read records from DynamoDB and discard irrelevant data client-side.

Correct answer: B

5. A supplier is writing a new RESTful API for customers to query the status of orders. The customers requested the following API endpoint. http://www.supplierdomain.com/status/customerID Which of the following application designs meet the requirements? (Select two.)

A. Amazon SQS; Amazon SNS

B. Elastic Load Balancing; Amazon EC2

C. Amazon ElastiCache; Amazon Elacticsearch Service

D. Amazon API Gateway; AWS Lambda

E. Amazon S3; Amazon CloudFront

Correct answer: BD

6. An existing serverless application processes uploaded image files. The process currently uses a single Lambda function that takes an image file, performs the processing, and stores the file in Amazon S3. Users of the application now require thumbnail generation of the images. Users want to avoid any impact to the time it takes to perform the image uploads. How can thumbnail generation be added to the application, meeting user requirements while minimizing changes to existing code?

A. Change the existing Lambda function handling the uploads to create thumbnails at the time of upload. Have the function store both the image and thumbnail in Amazon S3.

B. Create a second Lambda function that handles thumbnail generation and storage. Change the existing Lambda function to invoke it asynchronously.

C. Create an S3 event notification with a Lambda function destination. Create a new Lambda function to generate and store thumbnails.

D. Create an S3 event notification to an SQS Queue. Create a scheduled Lambda function that processes the queue, and generates and stores thumbnails.

Correct answer: C

7. A Developer must re-implement the business logic for an order fulfilment system. The business logic has to make requests to multiple vendors to decide where to purchase an item. The whole process can take up to a week to complete. What is the MOST eficient and SIMPLEST way to implement a system that meets these requirements?

A. Use AWS Step Functions to execute parallel Lambda functions, and join the results.

B. Create an AWS SQS for each vendor, poll the queue from a worker instance, and joint the results.

C. Use AWS Lambda to asynchronously call a Lambda function for each vendor, and join the results.

D. Use Amazon CloudWatch Events to orchestrate the Lambda functions.

Correct answer: A (AWS Step Function is the best way to orchestrate business login running in Lambda functions)

8. The Developer for a retail company must integrate a fraud detection solution into the order processing solution. The fraud detection solution takes between ten and thirty minutes to verify an order. At peak, the web site can receive one hundred orders per minute. What is the most scalable method to add the fraud detection solution to the order processing pipeline?

A. Add all new orders to an Amazon SQS queue. Configure a fleet of 10 EC2 instances spanning multiple AZs with the fraud detection solution installed on them to pull orders from this queue. Update the order with a pass or fails status.

B. Add all new orders to an SQS queue. Configure an Auto Scaling group that uses the queue depth metric as its unit of scale to launch a dynamically-sized fieet of EC2 instances spanning multiple AZs with the fraud detection solution installed on them to pull orders from this queue. Update the order with a pass or fails status.

C. Add all new orders to an Amazon Kinesis Stream. Subscribe a Lambda function to automatically read batches of records from the Kinesis Stream. The Lambda function includes the fraud detection software and will update the order with a pass or fail status.

D. Write all new orders to Amazon DynamoDB. Configure DynamoDB Streams to include all new orders. Subscribe a Lambda function to automatically read batches of records from the Kinesis Stream. The Lambda function includes the fraud detection software and will update the order with a pass or fail status.

Correct answer: B

9. An application is real-time processing millions of events that are received through an API. What service could be used to allow multiple consumers to process the data concurrently and MOST cost-effectively?

A. Amazon SNS with fanout to an SQS queue for each application

B. Amazon SNS with fanout to an SQS FIFO (First-in, Firtst-out) queue for each application

C. Amazon Kinesis Firehouse

D. Amazon Kinesis Streams

Correct answer: D

10. An application displays a status dashboard. The status is updated by 1 KB messages from an SQS queue. Although the status changes infrequently, the Developer must minimize the time between the message arrival in the queue and the dashboard update. What technique provides the shortest delay in updating the dashboard?

A. Retrieve the messages from the queue using long polling every 20 seconds.

B. Reduce the size of the messages by compressing them before sending.

C. Retrieve the messages from the queue using short polling every 10 seconds.

D. Reduce the size of each message payload by sending it in two parts.

Correct answer: A

11. A company is migrating from a monolithic architecture to a microservices-based architecture. The Developers need to refactor the application so that the many microservices can asynchronously communicate with each other without impacting performance. Use of which managed AWS services will enable asynchronous message passing? (Choose two.)

A. Amazon SQS

B. Amazon Cognito

C. Amazon Kinesis

D. Amazon SNS

E. Amazon ElastiCache

Correct answer: A

12. What does an Amazon SQS delay queue accomplish?

A. Messages are hidden for a configurable amount of time when they are first added to the queue.

B. Messages are hidden for a configurable amount of time after they are consumed from the queue.

C. The consumer can poll the queue for a configurable amount of time before retrieving a message.

D. Message cannot be deleted for a configurable amount of time after they are consumed from the queue.

Correct answer: A looks correct https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html

13. A company recently migrated its web, application and NoSQL database tiers to AWS. The company is using Auto Scaling to scale the web and application tiers. More than 95 percent of the Amazon DynamoDB requests are repeated read-requests. How can the DynamoDB NoSQL tier be scaled up to cache these repeated requests?

A. Amazon EMR

B. Amazon DynamoDB Accelerator

C. Amazon SQS

D. Amazon CloudFront

Correct answer: B
https://aws.amazon.com/dynamodb/dax/

14. A Developer needs to design an application running on AWS that will be used to consume Amazon SQS messages that range from 1 KB up to 1GB in size. How should the Amazon SQS messages be managed?

A. Use Amazon S3 and the Amazon SQS CLI.

B. Use Amazon S3 and the Amazon SQS Extended Client Library for Java.

C. Use Amazon EBS and the Amazon SQS CLI.

D. Use Amazon EFS and the Amazon SQS CLI.

Correct answer: B
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-quotas.html
                
The minimum message size is 1 byte (1 character). The maximum is 262,144 bytes (256 KB).
To send messages larger than 256 KB, you can use the Amazon SQS Extended Client Library for Java. This library allows you to send an
Amazon SQS message that contains a reference to a message payload in Amazon S3. The maximum payload size is 2 GB.

15. A company is providing services to many downstream consumers. Each consumer may connect to one or more services. This has resulted in a complex architecture that is dificult to manage and does not scale well. The company needs a single interface to manage these services to consumers. Which AWS service should be used to refactor this architecture?

A. AWS Lambda

B. AWS X-Ray

C. Amazon SQS

D. Amazon API Gateway

Correct answer: D

16. Which of the following statements about SQS is true?

A. Messages will be delivered exactly once and messages will be delivered in First in, First out order

B. Messages will be delivered exactly once and message delivery order is indeterminate

C. Messages will be delivered one or more times and messages will be delivered in First in, First out order

D. Messages will be delivered one or more times and message delivery order is indeterminate

Correct answer: D

17. Company B provides an online image recognition service and utilizes SQS to decouple system components for scalability The SQS consumers poll the imaging queue as often as possible to keep end-to-end throughput as high as possible. However, Company B is realizing that polling in tight loops is burning CPU cycles and increasing costs with empty responses. How can Company B reduce the number of empty responses?

A. Set the imaging queue visibility Timeout attribute to 20 seconds

B. Set the Imaging queue ReceiveMessageWaitTimeSeconds attribute to 20 seconds

C. Set the imaging queue MessageRetentionPeriod attribute to 20 seconds

D. Set the DelaySeconds parameter of a message to 20 seconds

Correct answer: B

18. If a message is retrieved from a queue in Amazon SQS, how long is the message inaccessible to other users by default?

A. 0 seconds

B. 1 hour

C. 1 day

D. forever

E. 30 seconds

Correct answer: E

19. An application ingests a large number of small messages and stores them in a database. The application uses AWS Lambda. A Development team is making change to the application’s processing logic. In testing, it is taking more than 15 minutes to process each message. The team is concerned the current backend may time out. Which changes should be made to the backend system to ensure each message is processed in the MOST scalable way?

A. Add the messages to an Amazon SQS queue. Set up and Amazon EC2 instance to poll the queue and process messages as they arrive.

B. Add the messages to an Amazon SQS queue. Set up Amazon EC2 instances in an Auto Scaling group to poll the queue and process the messages as they arrive.

C. Create a support ticket to increase the Lambda timeout to 60 minutes to allow for increased processing time.

D. Change the application to directly insert the body of the message into an Amazon RDS database.

Correct answer: B

20. A Developer has discovered that an application responsible for processing messages in an Amazon SQS queue is routinely falling behind. The application is capable of processing multiple messages in one execution, but is only receiving one message at a time. What should the Developer do to increase the number of messages the application receives?

A. Call the ChangeMessageVisibility API for the queue and set MaxNumberOfMessages to a value greater than the default of 1.

B. Call the AddPermission API to set MaxNumberOfMessages for the ReceiveMessage action to a value greater than the default of 1.

C. Call the ReceiveMessage API to set MaxNumberOfMessages to a value greater than the default of 1.

D. Call the SetQueueAttributes API for the queue and set MaxNumberOfMessages to a value greater than the default of 1.

Correct answer: C

21. A developer added a new feature to an application running on an Amazon EC2 instance that uses Amazon SQS. After deployment, the developer noticed a significant increase in Amazon SQS costs. When monitoring the Amazon SQS metrics on Amazon CloudWatch, the developer found that on average one message per minute is posted on this queue. What can be done to reduce Amazon SQS costs for this application?

A. Increase the Amazon SQS queue polling timeout.

B. Scale down the Amazon SQS queue to the appropriate size for low trafic demand.

C. Configure push delivery via Amazon SNS instead of polling the Amazon SQS queue.

D. Use an Amazon SQS first-in, first-out (FIFO) queue instead of a standard queue.

Correct answer: A

22. A development team is working on a mobile app that allows users to upload pictures to Amazon S3. The team expects the app will be used byhundreds of thousands of users during a single event simultaneously. Once the pictures are uploaded, the backend service will scan and parse the pictures for inappropriate content.

Which approach is the MOST resilient way to achieve this goal, which also smooths out temporary volume spikes for the backend service?

A. Develop an AWS Lambda function to check the upload folder in the S3 bucket. If new uploaded pictures are detected, the Lambda function will scan and parse them.

B. Once a picture is uploaded to Amazon S3, publish the event to an Amazon SQS queue. Use the queue as an event source to trigger an AWS Lambda function. In the Lambda function, scan and parse the picture.

C. When the user uploads a picture, invoke an API hosted in Amazon API Gateway. The API will invoke an AWS Lambda function to scan and parse the picture.

D. Create a state machine in AWS Step Functions to check the upload folder in the S3 bucket. If a new picture is detected, invoke an AWS Lambda function to scan and parse.

Correct answer: B

23. A developer works in an environment with multiple AWS accounts that have AWS Lambda functions processing the same 100 KB payloads. The developer wants to centralize the point of origin of the payloads to one account and have all the Lambda functions be invoked whenever theinitiating event occurs in the parent account.

How can the developer design the workflow in the MOST eficient way, so all the multi-account Lambda functions get invoked when the event occurs?

A. Create a Lambda function in the parent account and use cross-account IAM roles with the AWS Security Token Service (AWS STS) AssumeRole API call to make AWS Lambda invoke the API call to invoke all the cross-account Lambda functions.

B. Subscribe all the multi-account Lambda functions to an Amazon SNS topic and make a SNS Publish API call with the payload to the SNS topic.

C. Set up an Amazon SQS queue with the queue policy permitting the ReceiveMessage action for multi-account Lambda functions. Then send the payload to the SQS queue using the sqs:SendMessage permission and poll the queue using multi-account Lambda functions.

D. Use a worker on an Amazon EC2 instance to poll for the payload event. Invoke all Lambda functions using the Lambda Invoke API after using cross-account IAM roles with the AWS Security Token Service (AWS STS) AssumeRole API call.

Correct answer: A or B
Loading...

written by Senior Orc Developer