Developer Associate · 32% of the exam

Development with AWS Services: free practice questions

5 sample questions from our 80-question bank for this domain — answers and explanations included. These are the same scenario-based style as the real AWS exam.

1. A developer needs to implement server-sent real-time notifications in a web application so that connected browser clients receive updates whenever a backend event occurs. The API must support two-way communication where the client can also send messages to the server. Which Amazon API Gateway API type is the CORRECT choice for this requirement?

  • A. REST API, using long polling on a GET endpoint.
  • B. HTTP API, using server-sent events (SSE) via chunked transfer encoding.
  • C. WebSocket API, using routes and integration backends to handle connect, disconnect, and custom message frames.✓ Correct
  • D. REST API with caching enabled to push cached responses to connected clients.
Explanation

API Gateway WebSocket APIs maintain persistent, stateful connections between clients and the server. They support two-way communication: clients can send messages to the server (via custom routes) and the server can push messages to connected clients using the @connections management API. This directly satisfies both requirements. Option A REST API long polling is a workaround where clients repeatedly re-issue requests; it is not true real-time push and adds significant overhead. Option B HTTP API SSE supports server-to-client push only (one-way); the client cannot send messages over the SSE connection itself. Option D API Gateway caching stores responses to reduce backend load; it has no mechanism to push data to clients.

2. A developer is building a Lambda function that needs to access the same set of configuration values (database endpoint, feature flags) across 50 Lambda functions in an account. The values rarely change but must be immediately consistent when they do. The developer wants to avoid hardcoding values or duplicating them in each function's environment variables. Which solution BEST meets these requirements?

  • A. Store the configuration in an Amazon S3 object and have each function download it at cold start.
  • B. Store the configuration as Lambda environment variables on a shared Lambda Layer.
  • C. Store the configuration values in AWS Systems Manager Parameter Store and retrieve them at function initialisation, caching the values in the execution environment's global scope.✓ Correct
  • D. Embed the configuration in a Lambda Layer's code and redeploy all 50 functions whenever values change.
Explanation

AWS Systems Manager Parameter Store is designed for centralised configuration management. Fetching parameters at function initialisation (outside the handler) and caching them in the global scope means each execution environment retrieves them only on a cold start. When values change, you can force fresh retrieval by deploying a new function version or using a short local TTL. This avoids duplication, is immediately updatable, and requires no redeployment. — Downloading from S3 works but adds latency and cost per cold start; Parameter Store is purpose-built for this and supports IAM-based access control more easily. — Lambda environment variables are set at deploy time and are per-function; they cannot be shared across functions without redeployment. — Embedding config in a Layer still requires redeploying all 50 functions when values change, which is the exact problem the developer wants to avoid.

3. A developer is designing an Amazon DynamoDB table for a social media application. Users can follow other users and see a personalized feed of posts. The access patterns are: (1) get all posts by a specific author, sorted by timestamp descending; (2) get a single post by its unique post ID. Which primary key design BEST supports both access patterns efficiently?

  • A. Partition key: postId (UUID). Add a GSI with partition key: authorId and sort key: timestamp.✓ Correct
  • B. Partition key: authorId, sort key: timestamp. Add a GSI with partition key: postId.
  • C. Partition key: authorId, sort key: postId. Add a LSI with sort key: timestamp.
  • D. Partition key: postId, sort key: authorId. Query by authorId using a Scan with a FilterExpression.
Explanation

Option A uses a UUID postId as the partition key of the base table, enabling O(1) GetItem lookups for access pattern 2. A GSI with authorId as partition key and timestamp as sort key directly supports access pattern 1—querying by author and sorting by time descending with no extra reads. Option B makes the base table's partition key authorId with sort key timestamp, which handles access pattern 1 natively, but retrieving a single post by postId requires a GSI on postId—however, a GSI on a non-key attribute only supports Query (with an equality filter on the partition key), not a direct GetItem, adding slight inefficiency compared to option A's base table GetItem. More critically in option B the GSI would have postId as its partition key but no sort key, meaning you'd get a single item per partition which is fine, but the base table choice of authorId+timestamp makes it hard to have a truly unique single-key lookup without the GSI. Option A is still cleaner overall. Option C uses a LSI (sort key: timestamp) on a base table keyed by authorId+postId; LSIs must share the same partition key as the base table, so you can query by authorId and sort by timestamp via the LSI—but you cannot do a direct single-item lookup by postId alone without knowing the authorId, making access pattern 2 incomplete. Option D uses Scan with FilterExpression to retrieve posts by author, which is extremely inefficient and costly on large tables and is an anti-pattern.

4. An e-commerce application uses Amazon SQS to decouple order placement from order fulfillment. A consumer application processes each message and calls a third-party payment API that occasionally takes up to 8 minutes to respond. The operations team reports that orders are being processed twice. Which configuration change BEST resolves the duplicate processing issue?

  • A. Increase the SQS visibility timeout to a value greater than 8 minutes (e.g., 10 minutes).✓ Correct
  • B. Enable long polling on the SQS queue by setting the ReceiveMessage wait time to 20 seconds.
  • C. Convert the SQS queue to a FIFO queue to enforce exactly-once processing.
  • D. Decrease the message retention period so that timed-out messages are deleted before re-delivery.
Explanation

When a consumer receives a message, SQS hides it for the duration of the visibility timeout. If the consumer doesn't delete the message before the timeout expires, SQS makes it visible again and another consumer can receive it—causing duplicate processing. Because the payment API can take up to 8 minutes, the visibility timeout must exceed that (e.g., 10 minutes) so the original consumer has time to finish and delete the message. — Long polling (B) reduces empty receives and API calls but has no effect on visibility timeout or duplicate delivery. FIFO queues (C) offer exactly-once processing at the API level (deduplication ID), but if the visibility timeout is still too short the message will still reappear and be delivered again; the root cause here is the timeout, not ordering. Decreasing the retention period (D) would cause messages to be deleted before they're processed at all, resulting in lost orders rather than duplicates.

5. A developer is architecting a solution where an Amazon EventBridge rule must invoke an AWS Step Functions Standard Workflow whenever an order.created event is published to the default event bus. During load testing, the developer finds that some events are not triggering the workflow. CloudWatch metrics show that some events are being throttled. What is the MOST likely cause, and what should the developer do?

  • A. EventBridge has a default limit of 10 targets per rule; reduce the number of targets to below this limit.
  • B. The Step Functions state machine is exceeding the StartExecution API throttle limit; request a service quota increase for StartExecution transactions per second, and configure a dead-letter queue on the EventBridge rule target to capture throttled events.✓ Correct
  • C. The event pattern on the EventBridge rule is too broad; narrow the filter to reduce the number of matching events.
  • D. EventBridge does not natively support Step Functions as a target; use a Lambda function intermediary to call StartExecution.
Explanation

EventBridge invokes its targets synchronously (for synchronous targets) or asynchronously. When calling Step Functions StartExecution, the invocation rate is subject to the StartExecution API quota (which has per-region TPS limits). Under high load, throttling occurs. The correct resolution is to request a quota increase to match the workload and to configure a DLQ on the EventBridge target so that throttled events are not silently dropped—they can be replayed later. — EventBridge supports up to 5 targets per rule (not 10), and the test scenario only has one target, so this is not the issue. — Narrowing the event pattern reduces the volume of events but does not fix the root throttling problem; it is also an inappropriate business change to avoid a technical limit. — EventBridge natively supports Step Functions as a direct target without a Lambda intermediary.

75 more questions in this domain

Practice the full bank with instant grading, flashcards, and a timed mock exam.

Start practicing free
Development with AWS Services — Free Developer Associate Practice Questions | DataCertPrep — Certification Prep