AWS Developer Associate · Domain 1 of 4 · 32% of the exam

AWS Developer Associate Domain 1: Development with AWS Services

64 free practice questions for Development with AWS Services in the AWS Certified Developer – Associate (DVA-C02) exam. Try each question first, then open "Show answer" for the correct option and explanation.

Development with AWS Services practice questions

  1. Question 1. A Lambda function written in Python must reuse a database connection across invocations. Where should the connection be created?

    1. Inside the handler, at the start of every invocation
    2. In a separate Lambda layer that runs per request
    3. Outside the handler function, in the initialization code
    4. In an environment variable read by the handler
    Show answer

    Answer: C. Outside the handler function, in the initialization code

    Code outside the handler runs once per execution environment, so warm invocations reuse the connection.

  2. Question 2. A Lambda function needs a 3 GB temporary scratch file during processing. Where should it write the file?

    1. The function's deployment package directory
    2. The /tmp directory, with ephemeral storage raised as needed
    3. An environment variable holding the file contents
    4. The /opt directory provided by a Lambda layer
    Show answer

    Answer: B. The /tmp directory, with ephemeral storage raised as needed

    /tmp is writable ephemeral storage, configurable from 512 MB up to 10 GB. /opt and the code directory are read-only.

  3. Question 3. Several Lambda functions share the same third-party libraries. How can the libraries be packaged once and reused?

    1. Publish them as a Lambda layer and attach it to each function
    2. Store them in DynamoDB and load them at runtime
    3. Put them in each function's environment variables
    4. Upload them to /tmp from the first function that runs
    Show answer

    Answer: A. Publish them as a Lambda layer and attach it to each function

    Layers package shared code or dependencies. Their contents are extracted to /opt in the execution environment.

  4. Question 4. A team wants production traffic to point at a stable Lambda identifier while new code is tested. What should production use?

    1. The $LATEST version of the function
    2. A new function name for every release
    3. An alias pointing to a published version
    4. A resource-based policy on $LATEST
    Show answer

    Answer: C. An alias pointing to a published version

    Published versions are immutable. An alias such as prod points to a version and can be moved when a release is approved.

  5. Question 5. How can 10% of a Lambda alias's traffic be sent to a new version?

    1. Create a second alias and split traffic with DNS
    2. Set reserved concurrency to 10 on the new version
    3. Configure weighted routing on the alias between two versions
    4. Deploy the new version to $LATEST for 10% of calls
    Show answer

    Answer: C. Configure weighted routing on the alias between two versions

    Alias routing configuration sends a chosen percentage of invocations to an additional version.

  6. Question 6. A Lambda function is invoked asynchronously and must send failed events to an SQS queue after retries. What should be configured?

    1. A longer function timeout
    2. An on-failure destination or a dead-letter queue
    3. Provisioned concurrency on the function
    4. A reserved concurrency of zero
    Show answer

    Answer: B. An on-failure destination or a dead-letter queue

    Asynchronous invocations are retried twice by default. Destinations and DLQs capture events that still fail.

  7. Question 7. Which Lambda setting guarantees that a function can always scale to a certain number of concurrent executions?

    1. Provisioned throughput
    2. Maximum event age
    3. Reserved concurrency
    4. Ephemeral storage size
    Show answer

    Answer: C. Reserved concurrency

    Reserved concurrency sets aside capacity from the account pool and also caps the function at that value.

  8. Question 8. A latency-sensitive API backed by Lambda suffers from slow first requests after idle periods. What reduces this?

    1. Reserved concurrency on the function
    2. A larger /tmp storage allocation
    3. An SQS queue in front of the function
    4. Provisioned concurrency on the alias
    Show answer

    Answer: D. Provisioned concurrency on the alias

    Provisioned concurrency keeps initialized execution environments ready, removing cold-start initialization time.

  9. Question 9. A Lambda function reads from an SQS queue. How does Lambda receive the messages?

    1. SQS pushes each message to the function through a subscription
    2. The function must call ReceiveMessage in a loop
    3. EventBridge forwards messages from the queue to the function
    4. An event source mapping polls the queue and invokes the function with batches
    Show answer

    Answer: D. An event source mapping polls the queue and invokes the function with batches

    Event source mappings poll SQS, Kinesis, DynamoDB Streams, and similar sources, then invoke the function synchronously.

  10. Question 10. In an SQS batch, one message fails while the others succeed. How can Lambda avoid reprocessing the whole batch?

    1. Increase the queue's visibility timeout to 12 hours
    2. Set the batch size to 10,000 messages
    3. Throw an exception so the batch is deleted
    4. Enable ReportBatchItemFailures and return the failed message IDs
    Show answer

    Answer: D. Enable ReportBatchItemFailures and return the failed message IDs

    Partial batch responses let Lambda delete successful messages and only return failed ones to the queue.

  11. Question 11. Which environment variable approach keeps a database password out of a Lambda function's code and configuration in plain text?

    1. Store it as a plain environment variable
    2. Store it in Secrets Manager and fetch it at runtime
    3. Hard-code it in the deployment package
    4. Put it in the function description
    Show answer

    Answer: B. Store it in Secrets Manager and fetch it at runtime

    Secrets Manager stores the secret encrypted and supports rotation. Cache the value outside the handler to reduce calls.

  12. Question 12. What is the maximum timeout for a single Lambda invocation?

    1. 5 minutes
    2. 1 hour
    3. 30 seconds
    4. 15 minutes
    Show answer

    Answer: D. 15 minutes

    Work that takes longer should be split into steps, for example with Step Functions, or moved to containers.

  13. Question 13. A Lambda function must access a private RDS database in a VPC. What must be configured?

    1. A public IP address on the Lambda function
    2. An internet gateway attached to the function
    3. VPC subnets and security groups on the function
    4. An API Gateway private integration
    Show answer

    Answer: C. VPC subnets and security groups on the function

    A VPC-attached function gets elastic network interfaces in the chosen subnets and can reach private resources.

  14. Question 14. A VPC-attached Lambda function in private subnets must call a public third-party API. What does it need?

    1. A route to a NAT gateway
    2. A public IP on the function's network interface
    3. An internet gateway route in the private subnets
    4. A VPC endpoint for the third-party API
    Show answer

    Answer: A. A route to a NAT gateway

    Lambda network interfaces don't get public IPs, so outbound internet access goes through a NAT gateway.

  15. Question 15. Which deployment package option lets a Lambda function use an image up to 10 GB?

    1. A .zip file uploaded directly in the console
    2. A .zip file stored in Amazon S3
    3. A Lambda layer attached to the function
    4. A container image stored in Amazon ECR
    Show answer

    Answer: D. A container image stored in Amazon ECR

    Container images can be up to 10 GB. .zip packages are limited to 250 MB unzipped.

  16. Question 16. In API Gateway, which integration type passes the whole request to Lambda and expects Lambda to return the full response?

    1. Lambda proxy integration
    2. Lambda custom integration with mapping templates
    3. HTTP integration without proxy
    4. Mock integration
    Show answer

    Answer: A. Lambda proxy integration

    With proxy integration, the function receives headers, path, and body and must return statusCode, headers, and body.

  17. Question 17. A browser app on one domain calls an API Gateway REST API on another domain and gets a CORS error. What must be done?

    1. Enable CORS so the API returns Access-Control headers
    2. Move the API to a private endpoint type instead
    3. Require an API key header on every request
    4. Increase the stage's throttling rate and burst limits
    Show answer

    Answer: A. Enable CORS so the API returns Access-Control headers

    With proxy integrations, the Lambda function must also return Access-Control-Allow-Origin in its response.

  18. Question 18. Different API Gateway stages must call different Lambda aliases without changing the API definition. What should be used?

    1. Separate APIs for every stage
    2. Usage plans attached to each stage
    3. Stage variables referenced in the integration
    4. Custom domain names for each alias
    Show answer

    Answer: C. Stage variables referenced in the integration

    A stage variable such as ${stageVariables.alias} can select the Lambda alias for each stage.

  19. Question 19. A partner must be limited to 1,000 API requests per day. What should be configured in API Gateway?

    1. A usage plan with a quota and an API key
    2. A Lambda authorizer that counts requests
    3. A stage variable with a request limit
    4. A resource policy denying extra requests
    Show answer

    Answer: A. A usage plan with a quota and an API key

    Usage plans define throttling and quotas and are associated with API keys given to clients.

  20. Question 20. Which API Gateway feature converts a request body format before sending it to a non-proxy backend?

    1. Stage variables on the target stage
    2. Usage plans with request quotas
    3. Mapping templates written in VTL
    4. Canary release settings on the stage
    Show answer

    Answer: C. Mapping templates written in VTL

    Mapping templates transform requests and responses for custom (non-proxy) integrations.

  21. Question 21. Which API type should be chosen for a low-cost, low-latency API that forwards requests to Lambda with JWT authorization?

    1. API Gateway REST API with edge endpoints
    2. API Gateway HTTP API
    3. API Gateway WebSocket API
    4. An Application Load Balancer with sticky sessions
    Show answer

    Answer: B. API Gateway HTTP API

    HTTP APIs are simpler and cheaper than REST APIs and include native JWT authorizers.

  22. Question 22. A chat application needs a persistent two-way connection between clients and the backend. Which API Gateway type fits?

    1. WebSocket API
    2. REST API with caching
    3. HTTP API with CORS
    4. REST API with a usage plan
    Show answer

    Answer: A. WebSocket API

    WebSocket APIs keep connections open and route messages by route key, such as $connect and sendmessage.

  23. Question 23. A DynamoDB table uses OrderId as partition key. The app must fetch all orders for a customer quickly. What should be added?

    1. A local secondary index with CustomerId as partition key
    2. A Scan with a filter on CustomerId
    3. A second table copied nightly with a batch job
    4. A global secondary index with CustomerId as partition key
    Show answer

    Answer: D. A global secondary index with CustomerId as partition key

    GSIs can use any attribute as a partition key. LSIs must share the table's partition key.

  24. Question 24. Which DynamoDB operation is MOST efficient for fetching all items with the same partition key?

    1. Scan with a FilterExpression
    2. BatchGetItem with every sort key
    3. GetItem called in a loop
    4. Query
    Show answer

    Answer: D. Query

    Query reads only the items in one partition key. Scan reads the whole table before filtering.

  25. Question 25. A DynamoDB Query returns LastEvaluatedKey in the response. What does this mean?

    1. The query failed and must be retried with backoff
    2. The table has no more items for that partition key
    3. The request exceeded the table's provisioned write capacity
    4. More results exist; pass it as ExclusiveStartKey next time
    Show answer

    Answer: D. More results exist; pass it as ExclusiveStartKey next time

    Query and Scan return up to 1 MB per call, so applications paginate using the returned key.

  26. Question 26. Two users may update the same DynamoDB item at the same time. How can one update be prevented from silently overwriting the other?

    1. Use eventually consistent reads for every request
    2. Use a version attribute with a conditional write
    3. Increase the table's write capacity units
    4. Add a global secondary index on the version
    Show answer

    Answer: B. Use a version attribute with a conditional write

    Optimistic locking checks the expected version in a ConditionExpression and fails if it changed.

  27. Question 27. An order and its inventory update in two DynamoDB tables must succeed or fail together. What should be used?

    1. BatchWriteItem
    2. Two PutItem calls with retries
    3. TransactWriteItems
    4. A DynamoDB stream between the tables
    Show answer

    Answer: C. TransactWriteItems

    Transactions provide all-or-nothing writes across items and tables. BatchWriteItem isn't atomic.

  28. Question 28. A table uses provisioned capacity. How many RCUs are needed for 10 strongly consistent reads per second of 6 KB items?

    1. 10
    2. 15
    3. 60
    4. 20
    Show answer

    Answer: D. 20

    One RCU is one strongly consistent read per second of up to 4 KB. A 6 KB item rounds up to 8 KB, which is 2 RCUs, so 10 × 2 = 20.

  29. Question 29. How many WCUs are needed to write 5 items per second, each 2.5 KB?

    1. 15
    2. 5
    3. 10
    4. 13
    Show answer

    Answer: A. 15

    One WCU is one write per second of up to 1 KB. 2.5 KB rounds up to 3 KB, so each write needs 3 WCUs, and 5 × 3 = 15.

  30. Question 30. Session items in DynamoDB should be deleted automatically after 24 hours at no extra cost. What should be used?

    1. A scheduled Lambda that scans and deletes items
    2. DynamoDB Accelerator (DAX) with a 24-hour TTL
    3. A lifecycle rule on the table
    4. Time to Live (TTL) on an expiry timestamp attribute
    Show answer

    Answer: D. Time to Live (TTL) on an expiry timestamp attribute

    TTL deletes expired items in the background without consuming write capacity.

  31. Question 31. A Lambda function must react to every change made to a DynamoDB table. What should trigger it?

    1. DynamoDB Streams with an event source mapping
    2. An S3 event notification
    3. A CloudWatch Logs subscription filter
    4. An SNS topic subscribed to the table
    Show answer

    Answer: A. DynamoDB Streams with an event source mapping

    Streams record item-level changes in order, and Lambda processes them in batches.

  32. Question 32. A DynamoDB query returns large items, but the app only needs two attributes. How can the response size be reduced?

    1. Use a ProjectionExpression
    2. Use a FilterExpression
    3. Use a ConditionExpression
    4. Use an UpdateExpression
    Show answer

    Answer: A. Use a ProjectionExpression

    ProjectionExpression limits the returned attributes. FilterExpression removes items after they are read.

  33. Question 33. An SQS consumer sometimes needs longer than the visibility timeout for one message. What should it do?

    1. Delete the message and immediately send it again
    2. Call ChangeMessageVisibility to extend that message's timeout
    3. Set the queue's delivery delay to 15 minutes
    4. Switch the queue from short polling to long polling
    Show answer

    Answer: B. Call ChangeMessageVisibility to extend that message's timeout

    Extending visibility for a message in progress stops another consumer from receiving it.

  34. Question 34. Messages sent to an SQS queue must not be visible to consumers for 60 seconds after sending. What should be set?

    1. A visibility timeout of 60 seconds
    2. A message retention period of 60 seconds
    3. A receive wait time of 60 seconds
    4. A delivery delay (DelaySeconds) of 60
    Show answer

    Answer: D. A delivery delay (DelaySeconds) of 60

    Delivery delay hides new messages for up to 15 minutes. Visibility timeout applies after a message is received.

  35. Question 35. An SQS FIFO queue must process each customer's messages in order, while different customers are processed in parallel. What should be set?

    1. MessageDeduplicationId to the customer ID
    2. A separate FIFO queue for every message
    3. A delivery delay per customer
    4. MessageGroupId to the customer ID
    Show answer

    Answer: D. MessageGroupId to the customer ID

    Order is kept within a message group. Different groups can be processed concurrently.

  36. Question 36. A producer may send the same message to a FIFO queue twice after a network retry. How are duplicates prevented?

    1. Content-based deduplication or a MessageDeduplicationId
    2. A longer visibility timeout on the queue
    3. A dead-letter queue with maxReceiveCount of 1
    4. Long polling with a 20-second wait time
    Show answer

    Answer: A. Content-based deduplication or a MessageDeduplicationId

    FIFO queues drop messages with the same deduplication ID sent within the 5-minute deduplication interval.

  37. Question 37. An application must send 2 MB payloads through SQS. What is the recommended approach?

    1. Split the payload into 2,000 separate messages of 1 KB each
    2. Raise the queue's maximum message size setting to 2 MB
    3. Store it in S3 and send a reference, e.g. with the Extended Client
    4. Compress the payload and send it in a FIFO message group
    Show answer

    Answer: C. Store it in S3 and send a reference, e.g. with the Extended Client

    SQS messages are limited to 256 KB, so large payloads are stored in S3 with a pointer in the message.

  38. Question 38. Which API call reduces SQS costs when an application sends many small messages?

    1. SendMessage with a longer delay
    2. ReceiveMessage with short polling
    3. PurgeQueue after every send
    4. SendMessageBatch with up to 10 messages
    Show answer

    Answer: D. SendMessageBatch with up to 10 messages

    Batching sends up to 10 messages in one request, cutting the number of billed API calls.

  39. Question 39. One event must be delivered to three SQS queues owned by different services. Which pattern fits?

    1. Send the event to one queue that forwards to the others
    2. Publish to an SNS topic that the three queues subscribe to
    3. Have each service poll the producer's database
    4. Use a FIFO queue with three message groups
    Show answer

    Answer: B. Publish to an SNS topic that the three queues subscribe to

    SNS-to-SQS fan-out delivers a copy of each message to every subscribed queue.

  40. Question 40. An SNS subscriber should only receive messages where the attribute eventType equals "refund". What should be used?

    1. A subscription filter policy
    2. A separate topic per subscriber
    3. A Lambda function that drops other messages
    4. An SQS message group per event type
    Show answer

    Answer: A. A subscription filter policy

    Filter policies are evaluated by SNS, so non-matching messages are never delivered to that subscriber.

  41. Question 41. A Lambda function must run only when an EC2 instance enters the "stopped" state. What should be configured?

    1. An EventBridge rule whose event pattern matches that state change
    2. A CloudWatch Logs metric filter on the instance's system log
    3. An SQS queue that polls the EC2 API every minute
    4. An SNS topic subscribed directly to the EC2 instance
    Show answer

    Answer: A. An EventBridge rule whose event pattern matches that state change

    EventBridge receives EC2 state-change events, and a rule's JSON event pattern can match detail.state = "stopped" and target the function.

  42. Question 42. A Lambda function should run every day at 02:00 UTC. What is the simplest way to schedule it?

    1. An EventBridge Scheduler schedule or scheduled rule
    2. A cron job on an EC2 instance that calls the function
    3. An SQS queue with a 24-hour delivery delay
    4. An S3 lifecycle rule that invokes the function
    Show answer

    Answer: A. An EventBridge Scheduler schedule or scheduled rule

    EventBridge supports cron and rate expressions and invokes the function directly.

  43. Question 43. An order workflow has several steps, retries, error handling, and a manual approval that may take days. Which service fits?

    1. AWS Step Functions Express Workflows
    2. AWS Step Functions Standard Workflows
    3. An SQS queue with long polling
    4. A single Lambda function with a long timeout
    Show answer

    Answer: B. AWS Step Functions Standard Workflows

    Standard Workflows run up to a year with exactly-once execution. Express Workflows are limited to 5 minutes.

  44. Question 44. A high-volume event processing workflow runs thousands of times per second and finishes in seconds. Which Step Functions type is cheaper?

    1. Standard Workflows
    2. Standard Workflows with activity tasks
    3. Express Workflows
    4. Nested Standard Workflows
    Show answer

    Answer: C. Express Workflows

    Express Workflows are billed by executions and duration and suit short, high-rate workloads.

  45. Question 45. In Step Functions, which state runs the same steps for each item in an array?

    1. Choice
    2. Wait
    3. Pass
    4. Map
    Show answer

    Answer: D. Map

    Map iterates over items, optionally in parallel. Parallel runs different branches at the same time.

  46. Question 46. Records in a Kinesis data stream must be processed in order for each device. What should the producer set?

    1. A different stream for every device
    2. The partition key to the device ID
    3. The sequence number to the device ID
    4. A shard count of 1 for each consumer
    Show answer

    Answer: B. The partition key to the device ID

    Records with the same partition key go to the same shard, where order is preserved.

  47. Question 47. A Kinesis stream consumer falls behind, and the stream has enough shards. How can Lambda processing be sped up?

    1. Raise the event source mapping's parallelization factor
    2. Add a dead-letter queue directly to the stream
    3. Lower the stream's data retention period to 24 hours
    4. Switch the stream to an SQS FIFO queue instead
    Show answer

    Answer: A. Raise the event source mapping's parallelization factor

    A parallelization factor up to 10 lets Lambda process multiple batches per shard while keeping order per partition key.

  48. Question 48. A browser must upload a file directly to a private S3 bucket without AWS credentials. What should the backend return?

    1. The IAM user's access key and secret key
    2. A presigned URL for a PutObject request
    3. The bucket's ARN and a public ACL
    4. A CloudFront signed cookie for GET
    Show answer

    Answer: B. A presigned URL for a PutObject request

    Presigned URLs grant temporary permission for one operation, signed with the backend's credentials.

  49. Question 49. A Lambda function should run whenever a new object is added to an S3 bucket under the uploads/ prefix. What should be configured?

    1. An S3 lifecycle rule for the prefix
    2. An S3 event notification with a prefix filter
    3. S3 Replication to the Lambda function
    4. A bucket policy that invokes the function
    Show answer

    Answer: B. An S3 event notification with a prefix filter

    Event notifications can send ObjectCreated events to Lambda, SQS, SNS, or EventBridge.

  50. Question 50. An application writes to DynamoDB and should cache reads in ElastiCache so the cache is always current. Which strategy fits?

    1. Lazy loading only, with no expiry on keys
    2. Write-through: update the cache whenever the database is written
    3. Reading from the database and never caching writes
    4. Caching only failed reads for later retries
    Show answer

    Answer: B. Write-through: update the cache whenever the database is written

    Write-through keeps data current but may cache items that are never read. Adding a TTL helps.

  51. Question 51. What is a drawback of the lazy-loading caching strategy?

    1. Every write must update the cache first
    2. A cache miss adds latency, and cached data can become stale
    3. The cache fills with data that is never read
    4. It cannot be used with Redis or Memcached
    Show answer

    Answer: B. A cache miss adds latency, and cached data can become stale

    Lazy loading only caches requested data. TTLs limit how stale the data can become.

  52. Question 52. A DynamoDB-backed app needs microsecond read latency without changing its data access code much. What should be used?

    1. ElastiCache for Memcached with custom logic
    2. A global secondary index on every attribute
    3. DynamoDB Accelerator (DAX)
    4. Strongly consistent reads on every request
    Show answer

    Answer: C. DynamoDB Accelerator (DAX)

    DAX is a write-through cache for DynamoDB that uses a compatible API.

  53. Question 53. A call to a DynamoDB API fails with ProvisionedThroughputExceededException. What should the client do?

    1. Retry immediately in a tight loop
    2. Retry with exponential backoff and jitter
    3. Switch to a Scan operation
    4. Delete and recreate the table
    Show answer

    Answer: B. Retry with exponential backoff and jitter

    The AWS SDKs retry throttling errors automatically with backoff. Persistent throttling needs more capacity or better keys.

  54. Question 54. Which statement about the default credential provider chain in the AWS SDKs is correct?

    1. It only reads credentials hard-coded in the application's source code
    2. It requires a long-term access key even when running on Amazon EC2
    3. It stores credentials in the application's database for later reuse
    4. It checks environment variables, shared files, then instance or task roles
    Show answer

    Answer: D. It checks environment variables, shared files, then instance or task roles

    On AWS compute, the SDK picks up temporary role credentials automatically, so no keys are needed in code.

  55. Question 55. A developer needs to call AWS APIs from a laptop without long-term access keys. What is recommended?

    1. IAM Identity Center with aws sso login for temporary credentials
    2. An IAM user with access keys in a text file
    3. Root user access keys stored in environment variables
    4. A shared team access key rotated yearly
    Show answer

    Answer: A. IAM Identity Center with aws sso login for temporary credentials

    Short-lived credentials from IAM Identity Center avoid storing long-term keys.

  56. Question 56. A mobile app needs a managed GraphQL API that combines data from DynamoDB and Lambda with real-time subscriptions. Which service fits?

    1. AWS AppSync
    2. Amazon API Gateway REST API
    3. AWS Step Functions
    4. Amazon Kinesis Data Streams
    Show answer

    Answer: A. AWS AppSync

    AppSync hosts GraphQL APIs with resolvers for several data sources and built-in subscriptions.

  57. Question 57. Why should Lambda functions triggered by SQS, SNS, or EventBridge be idempotent?

    1. Lambda never retries failed events
    2. Events always arrive in strict order
    3. Idempotent functions run without IAM roles
    4. Events can be delivered more than once
    Show answer

    Answer: D. Events can be delivered more than once

    At-least-once delivery means duplicates can occur, so processing the same event twice must be safe.

  58. Question 58. A function writes a payment record and must not charge twice when the event is redelivered. What is a common approach?

    1. Store an idempotency key with a conditional write and skip duplicates
    2. Increase the function's memory setting
    3. Disable retries on the event source everywhere
    4. Process events only with eventually consistent reads
    Show answer

    Answer: A. Store an idempotency key with a conditional write and skip duplicates

    A conditional put on the idempotency key fails for a repeated event, so the charge isn't repeated.

  59. Question 59. Which DynamoDB read type returns the most recent committed data, at double the read cost?

    1. A strongly consistent read
    2. An eventually consistent read
    3. A transactional read
    4. A read from a global secondary index
    Show answer

    Answer: A. A strongly consistent read

    Strongly consistent reads cost 1 RCU per 4 KB. Eventually consistent reads cost half. GSIs only support eventual consistency.

  60. Question 60. Many items must be written to DynamoDB with fewer network calls. Which API helps, and what must the caller handle?

    1. TransactWriteItems, and ignore failures
    2. PutItem, with a larger item size
    3. UpdateItem, with a projection expression
    4. BatchWriteItem, and retry any UnprocessedItems
    Show answer

    Answer: D. BatchWriteItem, and retry any UnprocessedItems

    BatchWriteItem writes up to 25 items per call but may return unprocessed items that need a retry.

  61. Question 61. A table's access pattern is "get the latest 10 events for a device". Which key design fits BEST?

    1. Partition key timestamp, with no sort key on the table
    2. Partition key eventType and sort key deviceId on the table
    3. Partition key deviceId, sort key timestamp, queried newest first
    4. A random partition key with a Scan, then sorting in code
    Show answer

    Answer: C. Partition key deviceId, sort key timestamp, queried newest first

    Query with ScanIndexForward=false and Limit=10 returns the newest items for one device.

  62. Question 62. Which Lambda feature filters events from an SQS queue or Kinesis stream so the function is only invoked for matching records?

    1. A reserved concurrency limit on the function
    2. An on-success destination for the function
    3. Event filtering on the event source mapping
    4. An alias routing configuration on the function
    Show answer

    Answer: C. Event filtering on the event source mapping

    Filter criteria use event patterns, which reduces invocations and cost.

  63. Question 63. A Lambda function is invoked by API Gateway. Which invocation type is used?

    1. Synchronous, so errors return to the caller
    2. Asynchronous, with two automatic retries
    3. Poll-based, through an event source mapping
    4. Asynchronous, with an on-failure destination
    Show answer

    Answer: A. Synchronous, so errors return to the caller

    API Gateway waits for the response. Retrying synchronous invocations is the caller's job.

  64. Question 64. An S3 event notification for a new object should reach several consumers with rule-based filtering. What should be enabled?

    1. A second event notification with the same prefix
    2. Amazon EventBridge notifications on the bucket
    3. S3 Object Lambda on the bucket
    4. S3 Transfer Acceleration
    Show answer

    Answer: B. Amazon EventBridge notifications on the bucket

    EventBridge integration sends all bucket events to EventBridge, where many rules can match and route them.

AWS, Amazon Web Services, and AWS Certified are trademarks of Amazon.com, Inc. or its affiliates. These questions are original study material, not questions from the real exam.