How does AWS Lambda handle multiple SNS messages concurrently?
- By batching messages
- By limiting concurrency
- By pausing execution
- By scaling horizontally
AWS Lambda automatically scales horizontally to handle multiple SNS messages concurrently, spinning up additional instances of the function as needed.
In AWS Lambda, what happens after an SNS message triggers a function?
- The function is executed
- The function is paused
- The message is deleted
- The message is resent
After an SNS message triggers a function in AWS Lambda, the function is executed, allowing you to process the message payload and perform actions based on it.
When using SNS triggers with AWS Lambda, what type of messaging protocol is commonly used?
- Amazon SQS
- HTTP/S
- JSON-over-HTTP
- SMTP
JSON-over-HTTP is a commonly used messaging protocol with SNS triggers for AWS Lambda, allowing for lightweight communication between services.
What triggers an AWS Lambda function in response to an SNS message?
- CloudWatch Events
- S3 Bucket Notification
- SNS Topic Subscription
- SQS Queue
An AWS Lambda function can be triggered by subscribing to an SNS topic, so when a message is published to the topic, it triggers the function.
Scenario: Your application generates large amounts of log data stored in S3 buckets. How can you optimize AWS Lambda functions to process these S3 event notifications efficiently?
- Batch process log data using AWS Lambda destinations
- Enable parallel processing by configuring multiple AWS Lambda functions
- Increase the memory allocation for AWS Lambda functions
- Use AWS Step Functions to orchestrate AWS Lambda execution
Configuring multiple AWS Lambda functions to enable parallel processing is an effective way to optimize the handling of large amounts of log data stored in S3 buckets.
How long does DynamoDB Streams retain records by default?
- 24 hours
- 30 days
- 48 hours
- 7 days
DynamoDB Streams retains records for 24 hours by default.
In DynamoDB Streams, what triggers the generation of stream records?
- Data modifications (create, update, delete)
- Read operations
- Schema changes
- Table scans
Stream records in DynamoDB Streams are generated when data modifications such as create, update, and delete operations occur in the table.
How does DynamoDB Streams ensure data durability?
- By creating backups
- By replicating data across multiple regions
- By storing data in memory
- By writing data to disk
DynamoDB Streams ensure data durability by replicating data across multiple availability zones to prevent data loss.
What is DynamoDB Streams primarily used for?
- Automating backups
- Capturing data modification events
- Ensuring high availability
- Managing database schema
DynamoDB Streams captures data modification events in a DynamoDB table, allowing you to track changes and trigger actions based on those changes.
Scenario: You need to implement a serverless architecture where incoming data from IoT devices triggers AWS Lambda functions for processing. How would you design the integration between SNS and AWS Lambda in this scenario?
- Deploy EC2 instances
- Publish data to SNS topic
- Use S3 for data storage
- Utilize Kinesis Data Streams
Publishing data to an SNS topic allows SNS to trigger AWS Lambda functions for processing the incoming data from IoT devices.
Scenario: Your application receives a sudden surge of incoming messages through SNS. How can you ensure that the AWS Lambda functions triggered by these messages can handle the increased load efficiently?
- Enable concurrency limits
- Increase Lambda memory allocation
- Use AWS Batch
- Use Step Functions
Setting concurrency limits helps manage the number of concurrent executions, preventing Lambda functions from being overwhelmed.
Scenario: You are building a real-time notification system for a mobile app. Which AWS service would you use to send push notifications and trigger AWS Lambda functions to process them?
- AWS IoT
- Amazon SES
- Amazon SNS
- Amazon SQS
Amazon SNS can send push notifications to mobile devices and trigger AWS Lambda functions for processing them.