AWS Developer Practice Test

AWS Certified Developer – Associate

AWS Developer overview

  • 200 practice questions
  • 32 flashcards
  • 4 study guide topics
  • 38 key terms

What you'll study

  • Development with AWS Services32%
  • Security26%
  • Deployment24%
  • Troubleshooting and Optimization18%

The AWS Certified Developer – Associate (DVA-C02) is an intermediate-level credential for people who build and maintain applications on AWS. It suits developers with roughly a year of hands-on experience writing code that talks to AWS services, plus a working feel for the console, the CLI, and infrastructure-as-code tooling. Unlike the Solutions Architect track, this exam stays close to the code: how your application authenticates, stores state, handles asynchronous work, and ships to production.

The content splits into four weighted areas. Development with AWS Services is the largest, covering compute, storage, APIs, messaging and event-driven patterns, and the SDKs. Security comes next - IAM policies and roles, credential handling, encryption, and secrets management. Deployment covers CI/CD pipelines, Elastic Beanstalk, SAM and CloudFormation, and rollout strategies such as blue/green and canary. Troubleshooting and Optimization rounds things out with logging, tracing, metrics, and performance tuning.

Preparation works best as a loop: read the official exam guide, then build something small that exercises each service in the blueprint - a Lambda-backed API with a queue, a pipeline that deploys it, and permissions scoped down to least privilege. Practise writing and debugging IAM policies and CloudFormation fragments by hand, since these appear in scenario form. Answers to current administrative questions - scheduling, format, scoring, and cost - are published by AWS on its certification pages.

Common mistakes

Choosing a synchronous, in-request processing pattern (e.g., doing image resizing or PDF generation inline in the Lambda or API handler) when the scenario states the work takes minutes or must survive downstream failures.

Candidates pattern-match on 'serverless' and forget that API Gateway and Lambda have timeout ceilings and that inline work couples user latency to task duration; the question's phrasing about 'long-running' or 'must not be lost' is the tell.

What to do instead

When you see duration, retry, or durability language, route to an asynchronous decoupling service: SQS between producer and consumer, SNS for fan-out, Step Functions for multi-step orchestration, and return a 202/job ID to the caller. Reserve synchronous invocation for sub-second request/response work.

Treating DynamoDB like a relational database in access-pattern design: picking a partition key with low cardinality, then relying on Scan or on FilterExpression to satisfy queries.

Candidates from an RDBMS background default to 'query then filter' thinking and underestimate that FilterExpression is applied after read, so consumed capacity reflects items scanned, not items returned.

What to do instead

Enumerate access patterns first, then choose a high-cardinality partition key and a sort key that supports range queries; use GSIs/LSIs or composite keys for alternate patterns, and Query (never Scan) on hot paths. If the prompt mentions a status or date filter with slow performance, that is the signal.

Assuming environment variables or a config file are the right place for secrets, or baking credentials into a Lambda deployment package or AMI.

Environment variables are visible to anyone with lambda:GetFunctionConfiguration and appear in console/CI logs; candidates conflate 'not in source code' with 'secure'.

What to do instead

Store secrets in Secrets Manager (with rotation) or SSM Parameter Store SecureString, grant the execution role least-privilege GetSecretValue, and cache the value in the execution environment outside the handler. For cross-account or short-lived needs, use IAM roles and STS rather than static keys.

Granting a resource policy or execution role broader permissions than the scenario requires - e.g., s3:* on * for a function that only reads one prefix, or an overly permissive Lambda resource policy instead of a source-account/source-ARN condition.

Candidates optimize for 'it will definitely work' and pick the widest option, missing that these questions frequently test least privilege and cross-account constraints as the discriminating detail.

What to do instead

Scope actions to the specific operations named in the prompt and resources to specific ARNs/prefixes. For cross-service triggers, prefer resource-based policies with aws:SourceAccount and aws:SourceArn conditions over wildcards, and use IAM roles rather than long-lived access keys.

Confusing Cognito User Pools with Identity Pools, or trying to authorize API Gateway directly against a User Pool without the right authorizer configuration.

Both are 'Cognito' and both return tokens/credentials; candidates memorize names without mapping them to authentication (who you are, JWT issuance) versus authorization to AWS resources (temporary credentials).

What to do instead

User Pool = sign-up/sign-in and JWT issuance; attach a Cognito authorizer or JWT authorizer to API Gateway to validate tokens and pass claims downstream. Identity Pool = exchange of a token for temporary AWS credentials via STS for direct AWS service access. If the prompt says 'call DynamoDB directly from the mobile app', that is Identity Pools.

Deploying SAM/CDK/CloudFormation changes with console edits or manual CLI patches, causing drift, or forgetting that change sets and stack updates can fail and roll back.

The console is the fastest path in practice, so candidates answer with the behaviour they habitually use, and they forget that CloudFormation rolls back on failure, leaving the previous stack in place.

What to do instead

Express all infrastructure as code and deploy through a pipeline stage; use change sets for review, and for Lambda use versioned aliases with gradual deployment preferences (Canary/Linear) so rollback is automatic. If a question asks how to trace what changed, the answer is CloudFormation stack events/drift detection, not console history.

Ignoring deployment-package mechanics: bundling native dependencies without building on the Lambda runtime's compatible architecture/OS, exceeding the 250 MB unzipped limit, or not realizing layer and /tmp limits.

Code works locally, so candidates select 'zip and upload' without considering that Lambda runs on Amazon Linux and that native modules must be compiled for that environment.

What to do instead

Build inside a container matching the runtime (or use SAM/CDK build with the right architecture), push large artifacts to S3 for deployment, prefer container images up to 10 GB when the package is heavy, and place shared libraries in layers. Remember /tmp is 512 MB and is not shared between concurrent invocations.

Debugging Lambda or container failures by looking only at application logs instead of the invocation metrics, and misreading throttling as a code bug.

Concurrency errors (Throttles, 429s from downstream, ProvisionedConcurrency shortfalls) produce symptoms identical to timeouts in application logs; candidates jump to code changes without checking account/function concurrency limits.

What to do instead

Check CloudWatch metrics first: Throttles, ConcurrentExecutions, Duration p99, Errors, and IteratorAge for stream sources. Distinguish Reserved vs Provisioned Concurrency, raise limits or request increases appropriately, and set DLQs or destinations so failed async invocations are recoverable rather than silently dropped.

Applying the wrong caching layer - enabling ElastiCache/DAX for data that must be strongly consistent, or assuming API Gateway caching is per-user by default.

Caching looks like a universal latency fix; candidates miss that API Gateway stage caching keys on request parameters by default (not on Authorization headers), a classic cause of data leaking between users.

What to do instead

Select the cache by requirement: DAX for DynamoDB microsecond reads (eventually consistent), ElastiCache for session/derived data, CloudFront for public content. For API Gateway, explicitly configure cache key parameters including the auth token/header when responses are user-specific, or disable caching on those methods.

Relying on infinite or unmanaged retries - e.g., SQS standard queue redrive without a DLQ, Lambda async retries without a destination, or SDK default retries on non-idempotent writes.

Candidates fix transient failures by 'adding retries' and overlook that SQS is at-least-once and Lambda async invokes retry twice by default, so non-idempotent handlers create duplicates or poison-pill loops.

What to do instead

Make handlers idempotent (conditional writes with a dedupe key, idempotency tokens), configure maxReceiveCount with a DLQ and alarm on DLQ depth, use FIFO queues with deduplication IDs where ordering/duplication matters, and use exponential backoff with jitter for downstream throttling.

Exam requirements can change. Confirm current details with the exam provider.

AWS Developer practice

200 questions. Each one lists the choices, the correct answer, and an explanation. With JavaScript, this list opens one question at a time. The checker at the top of this page saves progress in this browser when it is available.

  1. Question 1Development with AWS Services

    A developer invokes an AWS Lambda function synchronously using the Invoke API. What is the maximum size of the request payload that can be sent?

    1. 1 MB
    2. 6 MB Correct answer.
    3. 10 MB
    4. 256 KB

    Explanation

    The synchronous invocation payload limit for Lambda is 6 MB for both request and response. Asynchronous invocations are limited to 256 KB, which is why larger payloads are normally staged in Amazon S3 and passed by reference.

  2. Question 2Development with AWS Services

    What is the maximum size of a single item that can be stored in an Amazon DynamoDB table?

    1. 1 MB
    2. 256 KB
    3. 400 KB Correct answer.
    4. 64 KB

    Explanation

    DynamoDB enforces a 400 KB limit on the total size of an item, including attribute names and values. Larger objects should be stored in Amazon S3 with a pointer kept in the item.

  3. Question 3Development with AWS Services

    A web application must let anonymous browser users upload files directly to an Amazon S3 bucket without distributing AWS credentials. What should the developer implement?

    1. Make the bucket public so browsers can upload directly
    2. Attach an unauthenticated Cognito identity to every browser
    3. Return a presigned URL with a short expiry Correct answer.
    4. Embed a long-lived IAM access key in the browser application

    Explanation

    A presigned URL carries the signer's permissions for a specific operation and expires after a configured period, so no credentials reach the browser. The application server generates the URL with credentials held only on the backend.

  4. Question 4Development with AWS Services

    A consumer receives an Amazon SQS message but crashes before deleting it. Which queue setting determines how long the message stays hidden before it becomes available to other consumers again?

    1. The receive request attempt ID
    2. The queue's visibility timeout Correct answer.
    3. The delay queue setting
    4. The message retention period

    Explanation

    The visibility timeout is the window during which a received message is hidden from other consumers. If the message is not deleted within that window, it becomes visible again and can be received by another consumer.

  5. Question 5Development with AWS Services

    A publisher must deliver each order event to three independent services, each with its own consumer, and no service may lose events while it is down. Which design meets these requirements?

    1. Send to a single SQS queue and let all three services poll it
    2. Publish to an SNS topic with one SQS queue subscribed per service Correct answer.
    3. Invoke all three services synchronously from the publisher
    4. Write the event to an S3 bucket and have each service poll listings

    Explanation

    The fan-out pattern combines SNS with one SQS queue per subscriber, so each service receives its own copy and can buffer events while offline. This also decouples the publisher from the availability of each consumer.

  6. Question 6Development with AWS Services

    A Lambda function must read items from a DynamoDB table at runtime. Which approach grants the required permission with least privilege?

    1. Store an IAM user's access key ID and secret access key in Lambda environment variables
    2. Add the function to a VPC security group that allows DynamoDB
    3. Attach an IAM policy to the DynamoDB table resource
    4. Use an execution role policy allowing the DynamoDB actions Correct answer.

    Explanation

    Lambda assumes an execution role at invocation time, and the permissions on that role determine what the function can call. Scoping the role policy to the specific table and actions satisfies least privilege without long-lived credentials.

  7. Question 7Development with AWS Services

    An API Gateway REST API integrated with Lambda starts returning HTTP 429 responses to legitimate clients during traffic spikes. What does this status code indicate?

    1. An authorizer rejected the caller's token
    2. The Lambda function's execution role is missing permissions
    3. The integration request timed out
    4. Requests exceeded the stage's throttling limits Correct answer.

    Explanation

    API Gateway returns 429 Too Many Requests when the request rate exceeds the configured account or stage throttling limits. Raising the limits, enabling usage-plan quotas, or adding client-side backoff addresses the cause.

  8. Question 8Development with AWS Services

    Where does Lambda send the log output written by a function's code with console.log?

    1. A CloudTrail trail dedicated to Lambda invocations
    2. The CloudWatch metrics namespace AWS/Lambda
    3. An S3 bucket created automatically by the function
    4. The log group /aws/lambda/<function-name> Correct answer.

    Explanation

    Lambda writes function logs to CloudWatch Logs in a log group named after the function, with one log stream per execution environment. CloudTrail, S3, and the metrics namespace serve different purposes.

  9. Question 9Development with AWS Services

    A team wants 10 percent of production traffic to reach a new Lambda version while the remaining 90 percent stays on the current version, with instant rollback. What should they configure?

    1. Weighted routing on a Lambda alias Correct answer.
    2. A Lambda layer referenced by both versions
    3. Reserved concurrency split across both versions
    4. Two API Gateway stages with different stage variables

    Explanation

    An alias can route traffic between two published versions using configurable weights, so shifting the weights or repointing the alias provides immediate rollback. Versions themselves are immutable, so traffic control belongs on the alias.

  10. Question 10Development with AWS Services

    A Lambda function is configured with event source mapping to a DynamoDB stream. How does Lambda deliver records that belong to the same partition key?

    1. Out of order, sorted only by the item's sequence number attribute
    2. In order, one batch at a time per shard Correct answer.
    3. In parallel, one record per invocation, in no guaranteed order
    4. Only after the 24-hour stream retention window has elapsed

    Explanation

    DynamoDB Streams keeps records for the same partition key in the same shard, and Lambda processes each shard sequentially with one invocation per batch. This preserves per-key ordering while different shards are processed concurrently.

  11. Question 11Development with AWS Services

    A workflow runs for at most five minutes, executes at very high volume, and needs the lowest cost per execution with no exactly-once requirement. Which AWS Step Functions workflow type fits?

    1. A Standard workflow
    2. A callback pattern task
    3. A nested Map state
    4. An Express workflow Correct answer.

    Explanation

    Express workflows are designed for high-volume, short-duration executions up to five minutes and are priced by number of requests, execution duration, and memory. Standard workflows provide exactly-once semantics and long durations at a higher cost per state transition.

  12. Question 12Development with AWS Services

    Which AWS SAM resource type declares a Lambda function together with its API Gateway event source in a single resource?

    1. AWS::Lambda::EventSourceMapping
    2. AWS::Serverless::Function Correct answer.
    3. AWS::Serverless::LayerVersion
    4. AWS::Serverless::Api

    Explanation

    AWS::Serverless::Function supports an Events property that declares triggers such as API, S3, SQS, and DynamoDB, and SAM transforms them into the underlying resources. The other types either model an API, a layer, or an existing stream mapping separately.

  13. Question 13Development with AWS Services

    A REST API on API Gateway uses Lambda proxy integration. What must the function return for the client to receive a well-formed response?

    1. An object with integrationResponse and stageVariables keys
    2. An object with statusCode, headers, and body Correct answer.
    3. A JSON object with an HTTP status field named code
    4. Only the response body as a plain string

    Explanation

    With Lambda proxy integration, API Gateway passes the function's response through without transformation, so the function must supply statusCode and body, with headers optional. The body should be a string, typically serialized JSON.

  14. Question 14Development with AWS Services

    An S3 bucket invokes a Lambda function on s3:ObjectCreated:* events, but a backlog of two million objects that already exist must also be processed. What is the most efficient approach?

    1. Enable S3 Transfer Acceleration and resync the bucket
    2. Re-upload each existing object so the event fires again
    3. Run an S3 Batch Operations job over the existing objects Correct answer.
    4. Add an s3:ObjectRemoved:* notification and invert the logic

    Explanation

    S3 event notifications only fire for new activity, so existing objects require a bulk process such as S3 Batch Operations, which can invoke a Lambda function for each object in an inventory or manifest. This avoids re-writing data or adding manual scripting.

  15. Question 15Development with AWS Services

    Several producers send messages to an SQS FIFO queue and multiple consumers poll it. How is ordering maintained?

    1. Messages sharing a message group ID are delivered in order Correct answer.
    2. Ordering applies only when a single consumer uses long polling
    3. Ordering is guaranteed only for messages with the same deduplication ID
    4. Ordering is maintained across the entire queue by send timestamp

    Explanation

    A FIFO queue delivers messages within the same message group ID in strict order, while different groups can be processed in parallel. Consumers must finish a group's batch before the next message in that group is delivered.

  16. Question 16Development with AWS Services

    A critical payment Lambda function must always have capacity available and must never run more than 100 concurrent executions. What should the developer configure?

    1. An account concurrency limit of 100
    2. Provisioned concurrency of 100 on the function's alias
    3. Reserved concurrency of 100 on the function Correct answer.
    4. A burst limit of 100 on the API Gateway stage

    Explanation

    Reserved concurrency both guarantees that the function can always scale up to the reserved amount and caps it at that number, isolating it from other functions in the account. Provisioned concurrency pre-warms environments but does not impose a hard ceiling on total concurrency.

  17. Question 17Development with AWS Services

    Database credentials must be rotated automatically every 30 days and retrieved at runtime with a single API call. Which service provides this with the least custom code?

    1. AWS Secrets Manager with a rotation function Correct answer.
    2. An encrypted environment variable using a KMS key
    3. SSM Parameter Store SecureString parameters
    4. Credentials stored in an S3 bucket with SSE-KMS

    Explanation

    Secrets Manager supports scheduled rotation by invoking a rotation Lambda function and lets applications fetch the current secret with a single GetSecretValue call. Parameter Store SecureString values are encrypted but have no built-in rotation scheduler.

  18. Question 18Development with AWS Services

    A Node.js Lambda function calls DynamoDB and SQS using the AWS SDK and must produce X-Ray subsegments for those downstream calls. What code change is required?

    1. Set the _X_AMZN_TRACE_ID environment variable manually
    2. Call AWSXRay.recordMetadata before each SDK call
    3. Increase the function's memory size to enable tracing
    4. Wrap the SDK client with AWSXRay.captureAWS Correct answer.

    Explanation

    Wrapping the SDK client with the X-Ray SDK instruments each AWS API call and records it as a subsegment of the function's segment. Active tracing must also be enabled on the function so the SDK can emit segments.

  19. Question 19Development with AWS Services

    Code running on an EC2 instance with an attached instance profile creates an S3 client without passing credentials explicitly. How does the SDK obtain credentials?

    1. From the S3 bucket policy attached to the client
    2. From the AWS_ACCESS_KEY_ID environment variable only
    3. From a Cognito identity pool linked to the instance
    4. From instance metadata via the instance profile Correct answer.

    Explanation

    The SDK's default credential provider chain queries the EC2 instance metadata service for temporary credentials associated with the instance profile. This keeps credentials off the instance and rotates them automatically.

  20. Question 20Development with AWS Services

    Two worker processes update the same DynamoDB item and must not silently overwrite each other's changes. Which technique should be used?

    1. A ConditionExpression on a version attribute Correct answer.
    2. A strongly consistent read before each write
    3. Increasing the table's write capacity units
    4. Enabling DynamoDB Streams on the table

    Explanation

    Optimistic locking uses a version attribute plus a ConditionExpression so the write succeeds only if the item still holds the version the writer read. A failed condition means another writer changed the item first, and the caller can retry.

  21. Question 21Development with AWS Services

    An asynchronously invoked Lambda function fails after all retries. The team needs the original request payload delivered along with the error details. Which feature should they use?

    1. A Lambda destination for failed invocations Correct answer.
    2. An X-Ray sampling rule with a high rate
    3. A dead-letter queue configured on the function
    4. A CloudWatch Logs subscription filter

    Explanation

    Destinations for asynchronous invocations record the full invocation record, including the original request payload, the response, and error details, and deliver it to SQS, SNS, S3, or EventBridge. This is richer than the older dead-letter queue mechanism and is the recommended approach.

  22. Question 22Development with AWS Services

    A Lambda function consumes a Kinesis data stream, and a malformed record makes the function throw on every attempt. What happens by default?

    1. Lambda retries the batch and blocks the shard until the record expires Correct answer.
    2. Lambda skips the record after three attempts and logs a warning
    3. The record is sent to the function's dead-letter queue automatically
    4. The record is discarded and processing continues with the next batch

    Explanation

    For stream-based event sources, Lambda retries the failing batch until it succeeds or the records expire from the stream, which halts progress on that shard. Developers mitigate this with a maximum retry count, on-failure destinations, or bisecting the batch on error.

  23. Question 23Development with AWS Services

    Which statement about the DynamoDB TransactWriteItems operation is accurate?

    1. It accepts up to 25 items and permits two actions on the same item
    2. It applies all included actions atomically or none at all Correct answer.
    3. It requires the target table to use on-demand capacity mode
    4. It is restricted to a single table per transaction

    Explanation

    TransactWriteItems groups up to 100 actions, potentially across multiple tables in the same account and Region, into an all-or-nothing operation. The transaction fails if any condition check fails or if two actions target the same item.

  24. Question 24Development with AWS Services

    A parallel write job intermittently receives ProvisionedThroughputExceededException from DynamoDB. Which client-side change is most appropriate?

    1. Catch the exception and retry immediately in a tight loop
    2. Disable SDK retries so failed batches fail fast
    3. Enable SDK retries with exponential backoff and jitter Correct answer.
    4. Increase the table's read capacity units

    Explanation

    The AWS SDK retries throttling errors automatically using exponential backoff with jitter, which spreads retries and relieves contention; the retry count or adaptive retry mode can be raised for bursty workloads. Tight-loop retries worsen throttling because they add load without a delay.

  25. Question 25Development with AWS Services

    A Lambda function must record about twenty custom metrics per invocation without extra network calls or added latency. Which approach should the developer use?

    1. Create X-Ray subsegments and convert them into metrics
    2. Call PutMetricData once per metric in the handler
    3. Publish metrics to an SNS topic for a separate aggregator
    4. Write Embedded Metric Format JSON events to stdout Correct answer.

    Explanation

    CloudWatch Embedded Metric Format lets a function emit structured JSON log events that CloudWatch Logs extracts into custom metrics asynchronously, so no API call is made from the function. This avoids the latency and cost of per-metric PutMetricData calls.

  26. Question 26Development with AWS Services

    A Lambda function downloads a large reference file during each invocation and needs local scratch space. Where can the function write this file, and what is the maximum size available?

    1. Write to /mnt, which defaults to 512 MB and can be resized per function
    2. Write to /var/task, which is writable and sized by the memory setting
    3. Write to /opt, which is writable and expands automatically as needed
    4. Write to /tmp, which can be configured from 512 MB up to 10,240 MB Correct answer.

    Explanation

    Each Lambda execution environment exposes writable scratch space only at /tmp, while /var/task (function code) and /opt (layers) are read-only at runtime. The /tmp size is configurable from 512 MB up to 10,240 MB and persists only for the lifetime of that execution environment.

  27. Question 27Development with AWS Services

    A development team wants to share a common logging library and its dependencies across 20 Python Lambda functions without packaging it into each deployment artifact. Which mechanism should they use?

    1. Store the library in S3 and download it at the start of every invocation
    2. Publish the library as a Lambda layer and attach it to each function Correct answer.
    3. Place the library in EFS and mount the file system on every function
    4. Copy the library into each function's /tmp directory during deployment

    Explanation

    A layer packages code and dependencies separately from function code and can be attached to many functions in the same account and Region. Lambda mounts layer content under /opt at runtime, so the library does not need to be bundled into each deployment package.

  28. Question 28Development with AWS Services

    A team needs a simple HTTPS endpoint that invokes a single Lambda function directly, without API Gateway, and wants AWS to manage the endpoint and its TLS certificate. What should they create?

    1. An Application Load Balancer with a Lambda target group
    2. A CloudFront distribution in front of the function's ARN
    3. A Lambda function URL configured with AWS_IAM auth Correct answer.
    4. An API Gateway HTTP API with a Lambda proxy integration

    Explanation

    A function URL provides a dedicated HTTPS endpoint for one function, and AWS manages the endpoint and its certificate without any additional service. Auth type AWS_IAM requires requests to be signed with SigV4 using IAM credentials.

  29. Question 29Development with AWS Services

    A web application lets authenticated users upload large files directly to an S3 bucket, and the browser must not hold AWS credentials. Which approach should the developer implement?

    1. Make the bucket public with a policy that allows s3:PutObject to everyone
    2. Send the IAM user's access key and secret key to the browser over HTTPS
    3. Proxy every upload through an EC2 instance that assumes an IAM role
    4. Generate a presigned PUT URL on the server and return it to the browser Correct answer.

    Explanation

    A presigned URL embeds the signer's permissions in the query string for a limited time, so the browser can upload without any AWS credentials. The server keeps its own credentials and should scope the URL to a single object key with a short expiry.

  30. Question 30Development with AWS Services

    An order service must notify three independent downstream systems about each new order, and more consumers will be added over time. Which architecture decouples the producer most effectively?

    1. Store orders in S3 and have each consumer poll the bucket on a schedule
    2. Publish orders to an SNS topic with one SQS subscription per consumer Correct answer.
    3. Write orders to a single SQS queue that all three consumers poll
    4. Call each downstream system's API synchronously from the order service

    Explanation

    The fan-out pattern publishes one message to an SNS topic, which delivers a copy to each subscribed SQS queue, so each consumer has its own durable backlog. New consumers can be added as new subscriptions without any change to the producer.

  31. Question 31Development with AWS Services

    A DynamoDB table stores session records that should expire one hour after creation, and expired items must be removed without consuming write capacity. Which feature should be used?

    1. A DynamoDB stream consumer that deletes items older than one hour
    2. DAX with an item cache TTL of 3,600 seconds
    3. A scheduled Lambda function that scans the table and deletes old items
    4. DynamoDB TTL on an attribute that holds an epoch timestamp Correct answer.

    Explanation

    Time to Live reads a Number attribute containing an epoch timestamp and deletes expired items in the background without consuming write capacity. Deletion is not immediate; expired items are typically removed within a few days of their expiry time.

  32. Question 32Development with AWS Services

    An application must sign users in with email and password and also obtain temporary AWS credentials mapped to an IAM role. Which Cognito combination is required?

    1. A user pool for authentication and an identity pool for AWS credentials Correct answer.
    2. An identity pool only, configured with a hosted sign-in UI
    3. An identity pool for authentication and a user pool for AWS credentials
    4. A single user pool with an attached IAM role

    Explanation

    A user pool authenticates users and issues tokens, while an identity pool exchanges those tokens for temporary AWS credentials associated with an IAM role. Sign-in plus AWS access therefore requires both resources.

  33. Question 33Development with AWS Services

    A developer wants to run a function from a SAM template on a laptop with a sample event to test it before deploying. Which SAM CLI command should be used?

    1. sam local invoke with the --event option Correct answer.
    2. sam build --use-container
    3. sam deploy --guided
    4. sam package with an S3 bucket and output template

    Explanation

    sam local invoke runs a single function locally in a container and accepts a JSON event file through --event. Building artifacts first with sam build is recommended, but the command that actually executes the function locally is sam local invoke.

  34. Question 34Development with AWS Services

    A function's environment variables contain a database password that must be encrypted with a customer managed KMS key and decrypted by the function at runtime. What must the developer configure?

    1. Enable log group encryption and grant kms:Encrypt to the execution role
    2. Pass the password as a plaintext SAM parameter with NoEcho set
    3. Set KMSKeyArn on the environment and grant kms:Decrypt to the role Correct answer.
    4. Store the password in a layer and grant kms:GenerateDataKey to the role

    Explanation

    Lambda encrypts environment variables at rest with an AWS managed key by default, and setting KMSKeyArn switches to a customer managed key. The execution role must then be allowed kms:Decrypt so the function can read the values when it initializes.

  35. Question 35Development with AWS Services

    A Lambda function processes messages from an SQS standard queue, and occasionally the same message is processed twice because the function runs longer than the queue's visibility timeout. What is the most direct fix?

    1. Raise the message retention period to the 14-day maximum
    2. Enable long polling with a 20-second wait time
    3. Raise the visibility timeout above the function timeout Correct answer.
    4. Switch the queue to FIFO to remove duplicate deliveries

    Explanation

    The visibility timeout hides a received message for a period, and if processing exceeds that period the message becomes visible again and can be delivered to a second consumer. Setting the visibility timeout above the maximum function runtime stops that redelivery during processing.

  36. Question 36Development with AWS Services

    An SQS queue is subscribed to an SNS topic that carries orders of several types, but the consumer should receive only priority orders. How can the other messages be prevented from reaching the queue?

    1. Set a redrive policy on the queue with a dead-letter target
    2. Apply an IAM policy to the queue that denies non-priority messages
    3. Attach an SNS filter policy matching the priority message attribute Correct answer.
    4. Use a DynamoDB stream filter on the orders table

    Explanation

    A subscription filter policy is a JSON policy evaluated against message attributes or message body keys, and only matching messages are delivered to that subscription. Placing it on the SNS subscription keeps non-matching messages out of the queue entirely.

  37. Question 37Development with AWS Services

    A Lambda function can be invoked twice with the same request ID because of an at-least-once event source, and the team wants the second write to fail instead of overwriting the first. Which approach achieves this?

    1. A ConditionExpression of attribute_not_exists(pk) on PutItem Correct answer.
    2. A Global Secondary Index with a unique partition key
    3. Optimistic locking with a version number updated on every write
    4. A Scan before each write that checks for the request ID

    Explanation

    A conditional PutItem succeeds only when the item does not already exist, so a duplicate invocation receives ConditionalCheckFailedException instead of overwriting data. The caller treats that exception as a duplicate and returns the stored result.

  38. Question 38Development with AWS Services

    A read-heavy application repeatedly fetches the same small set of DynamoDB items and needs microsecond read latency with minimal application changes. Which service should be added?

    1. S3 Transfer Acceleration for exports of the table
    2. An ElastiCache for Memcached cluster populated by the application
    3. DynamoDB global tables in a second Region
    4. DynamoDB Accelerator (DAX) in front of the table Correct answer.

    Explanation

    DAX is a write-through cache that is API-compatible with DynamoDB and serves eventually consistent reads in microseconds, requiring only a client change. It removes repeated read pressure from the table.

  39. Question 39Development with AWS Services

    A job calls BatchWriteItem with 25 items, and the response includes a non-empty UnprocessedItems collection. What should the application do?

    1. Resend each item as an individual PutItem call
    2. Retry only the unprocessed items with exponential backoff Correct answer.
    3. Retry the whole batch immediately with the same request
    4. Ignore the response because DynamoDB retries automatically

    Explanation

    Items returned in UnprocessedItems were not written, usually because capacity was exceeded, and the client is responsible for retrying them. Retrying only that subset with exponential backoff and jitter avoids resending successful writes and reduces further throttling.

  40. Question 40Development with AWS Services

    A Step Functions task calls a Lambda function that sometimes fails with a transient timeout. The workflow must retry up to three times with increasing intervals and then move to a cleanup state. Which features provide this?

    1. Retry with interval and backoff, plus a Catch field Correct answer.
    2. A Choice state that loops back to the task on any error
    3. A Parallel state with a Catch block on each branch
    4. A Wait state before the task and a Fail state afterwards

    Explanation

    The Retry field names error types and configures IntervalSeconds, MaxAttempts, and BackoffRate, producing bounded retries with growing delays. The Catch field then matches a named error and transitions to the cleanup state once retries are exhausted.

  41. Question 41Development with AWS Services

    A microservice must be invoked only when the event bus receives events whose source is orders and whose detail.type equals NEW. Which EventBridge capability should be used?

    1. An SNS topic with an email subscription for order events
    2. A scheduled rule with a cron expression that polls the orders service
    3. A rule with an event pattern matching source and detail Correct answer.
    4. An EventBridge archive that replays matching events

    Explanation

    EventBridge rules support event patterns that match on event fields such as source and detail.type, so only matching events invoke the target. Filtering happens at the rule, before the target is invoked.

  42. Question 42Development with AWS Services

    A Kinesis Data Streams producer sends all events for one high-volume customer with the same partition key, and a single shard is throttling while the others stay idle. What is the most likely cause?

    1. A single partition key maps to one shard, concentrating traffic Correct answer.
    2. The retention period is shorter than the producer's batch interval
    3. Consumers use enhanced fan-out, which limits producers
    4. Kinesis requires exactly one partition key per shard

    Explanation

    Kinesis hashes the partition key to select a shard, so every record with the same key lands on the same shard. Reusing one key for a high-volume customer creates a hot shard that exhausts its write capacity while other shards remain idle.

  43. Question 43Development with AWS Services

    An application calls an AWS API that returns paginated results and must collect every page. Which SDK feature avoids manually tracking continuation tokens?

    1. Use the SDK's built-in paginator for that operation Correct answer.
    2. Call the operation in a loop with identical parameters
    3. Set the MaxItems parameter to a very large value
    4. Set the client's retry mode to standard

    Explanation

    SDK paginators repeatedly call the operation and pass the service-provided continuation token until no more pages remain, exposing the results as an iterable. The application therefore never reads or stores the token itself.

  44. Question 44Development with AWS Services

    A company sells three tiers of an API and must meter and throttle each customer separately using API keys. Which API Gateway feature provides this?

    1. Resource policies attached to the API
    2. Stage variables per deployment
    3. Usage plans associated with API keys and stages Correct answer.
    4. Gateway responses that map 4XX errors

    Explanation

    Usage plans define throttling limits and quotas, and they are associated with API keys and one or more stages. Each customer's key maps to a plan, so consumption is metered and limited per tier.

  45. Question 45Development with AWS Services

    An API has a dev stage and a prod stage, and each stage must invoke a different Lambda alias without duplicating the API definition. Which feature should be used?

    1. Lambda environment variables that store the stage name
    2. Stage variables referenced in the integration URI Correct answer.
    3. Two separate REST APIs with hard-coded integration URIs
    4. A canary release deployment with a percentage split

    Explanation

    Stage variables are name-value pairs attached to a stage and can be referenced in the integration URI, so the dev stage can target the dev alias and prod can target the prod alias from one API definition.

  46. Question 46Development with AWS Services

    A Step Functions workflow must wait for a human approval that may take several days and then continue with the approver's result, without polling. Which pattern should be implemented?

    1. Pass a task token to the approver, who calls SendTaskSuccess to resume Correct answer.
    2. An Activity worker that calls GetActivityTask to poll for work
    3. A Wait state that polls an approval table until the record appears
    4. A Parallel state with a timeout that fails the workflow on expiry

    Explanation

    In the callback pattern Step Functions generates a task token and pauses the task until SendTaskSuccess or SendTaskFailure is called with that token. This supports waits of days or longer without polling and without consuming compute.

  47. Question 47Development with AWS Services

    A REST API uses a non-proxy Lambda integration. Clients send JSON in one shape, the function expects a different input shape, and the client must receive a custom JSON response structure. What should the developer configure?

    1. Gateway responses that map status codes to bodies
    2. A proxy integration that returns the Lambda proxy format
    3. Integration and method mapping templates written in VTL Correct answer.
    4. A Lambda authorizer that rewrites the request body

    Explanation

    With non-proxy integrations, API Gateway uses Velocity Template Language mapping templates on the integration request and integration response to reshape payloads. Method response mapping templates then define the structure the client receives.

  48. Question 48Development with AWS Services

    An application emits X-Ray traces, and the team must filter traces in the console by a business field such as orderId. How should that value be recorded?

    1. As an annotation, because annotations are indexed for filtering Correct answer.
    2. As a CloudWatch Logs line that includes the trace ID
    3. As a segment name, because segment names are searchable
    4. As trace metadata, because metadata is indexed for filtering

    Explanation

    Annotations are indexed key-value pairs attached to segments and subsegments, so filter expressions can select traces by values such as orderId. Metadata is stored with the trace but is not indexed for search.

  49. Question 49Development with AWS Services

    A service assumes a cross-account IAM role whose policy allows DynamoDB access to every table. The team must limit one specific session to a single table without changing the role for other callers. What should they do?

    1. Use a permissions boundary on the role listing the allowed table
    2. Create an IAM user with access keys scoped to the table
    3. Attach an inline deny policy to the calling IAM user
    4. Pass a session policy to AssumeRole that allows only that table Correct answer.

    Explanation

    The Policy parameter of AssumeRole applies a session policy whose permissions are intersected with the role's own policy, so the resulting credentials are limited to that one table. The role's identity policy remains unchanged for every other caller.

  50. Question 50Development with AWS Services

    A team must have CloudFormation provision a third-party SaaS resource that has no native resource type, with custom code performing the create and delete logic and reporting the result back to the stack. Which approach should they use?

    1. A WaitCondition with a presigned URL in the template
    2. A DeletionPolicy of Retain on the SaaS resource
    3. A CloudFormation custom resource backed by a Lambda function Correct answer.
    4. A nested stack that references the SaaS API endpoint

    Explanation

    A custom resource lets a Lambda function implement create, update, and delete behavior for a resource type CloudFormation does not natively support, then signal completion through the response URL. The function needs permission to call the third-party API and to send that response.

  51. Question 51Development with AWS Services

    A web application stores private objects in an S3 bucket and must let an authenticated end user download one specific object for a limited time without exposing AWS credentials or making the object public. Which approach meets these requirements?

    1. Create an IAM user for each end user and embed the access key in the page.
    2. Generate a presigned URL for the object with a short expiration. Correct answer.
    3. Enable static website hosting on the bucket and link directly to the object.
    4. Attach a bucket policy that grants public read access to the object prefix.

    Explanation

    A presigned URL embeds the signer's permissions and an expiration into the URL itself, so the holder can perform only the permitted operation until the URL expires. No AWS credentials are exposed and the object stays private. This is the standard way to grant temporary, scoped access to a single object.

  52. Question 52Development with AWS Services

    A DynamoDB table has a partition key named customerId and a sort key named orderDate. An application must retrieve all orders for one customer, newest first, using as few read operations as possible. Which operation should be used?

    1. A Query on orderDate with a filter expression on customerId.
    2. A Scan of the entire table followed by client-side sorting of the results.
    3. A Query on customerId with ScanIndexForward set to false. Correct answer.
    4. A Scan with a filter expression on customerId.

    Explanation

    A Query targets a single partition key value and reads only the items in that item collection, with the sort key determining order. Setting ScanIndexForward to false returns the items in descending sort-key order, giving newest-first results directly. Scans read the whole table and then discard data, consuming far more capacity.

  53. Question 53Development with AWS Services

    An AWS Lambda function must read objects from an S3 bucket and write items to a DynamoDB table. Which mechanism grants the function these permissions?

    1. The AWS account root user credentials configured in the function's environment variables.
    2. The IAM execution role that is assumed by the function at runtime. Correct answer.
    3. A trust policy on the S3 bucket that lists the function name.
    4. Access keys stored in the function's deployment package.

    Explanation

    Lambda assumes an IAM execution role when it runs a function, and the permissions policies attached to that role determine which AWS API calls the code can make. Temporary credentials from that role are made available to the runtime automatically. Storing static or root credentials in code or configuration is never required and is a security risk.

  54. Question 54Development with AWS Services

    A consumer reads a message from an SQS standard queue but does not delete it before the visibility timeout expires. What happens to the message?

    1. It becomes visible to other consumers and can be delivered again. Correct answer.
    2. It is moved to the dead-letter queue automatically when the timeout expires.
    3. It stays invisible until the consumer explicitly deletes it from the queue.
    4. It is permanently removed from the queue after the timeout expires.

    Explanation

    The visibility timeout hides a received message from other consumers only for the duration of the timeout. If the consumer has not deleted the message by then, the message returns to the queue and may be delivered to another consumer, which is why consumers should be idempotent.

  55. Question 55Development with AWS Services

    Two application instances update the same DynamoDB item concurrently, and the team must prevent one update from silently overwriting the other. Each item already stores a numeric version attribute. Which change achieves this with the fewest additional resources?

    1. Enable DynamoDB Streams and have a second Lambda function reject updates that use an older value.
    2. Perform a strongly consistent GetItem and then a PutItem that writes the new values back to the item.
    3. Update with a condition that the stored version equals the version read, and increment it. Correct answer.
    4. Wrap the write in a TransactWriteItems call that also writes an audit record to a second table.

    Explanation

    Optimistic locking uses a condition expression on the version attribute so the write succeeds only when the version is unchanged since it was read. The same UpdateItem increments the version, so a competing writer with a stale version fails the condition and must retry. This requires no extra tables or streams.

  56. Question 56Development with AWS Services

    A Lambda function is invoked asynchronously by an application and must hand failed invocations to an SQS queue for later analysis, without adding code to the function. Which configuration should be used?

    1. An on-failure destination on the asynchronous invocation configuration. Correct answer.
    2. A dead-letter queue configured on the Lambda function's event source mapping.
    3. An SQS trigger with a maximum receive count and a redrive policy.
    4. A CloudWatch Logs subscription filter that forwards error lines to the queue.

    Explanation

    For asynchronous invocations, Lambda destinations can route records of failed invocations to an SQS queue or other target, along with metadata about the failure. This is configured on the function's event invoke settings and needs no handler code. Event source mapping dead-letter queues apply to polled sources such as streams and queues, not asynchronous invokes.

  57. Question 57Development with AWS Services

    A Lambda function processes a DynamoDB stream. One malformed record causes the whole batch to fail repeatedly, and the shard stops advancing. The team wants the good records processed while the bad record is isolated after a few attempts. Which configuration meets this?

    1. Set a maximum retry count with an on-failure destination and enable bisect on error. Correct answer.
    2. Increase the function's memory size and timeout so that the whole batch completes within the limit.
    3. Attach a dead-letter queue directly to the DynamoDB table that is the source of the stream records.
    4. Change the stream's starting position to LATEST and then redeploy the event source mapping.

    Explanation

    Bisecting a failed batch splits it in half and reprocesses each half, so the good records succeed while the failure is narrowed to the offending record. A maximum retry count limits repeated attempts, and an on-failure destination sends the remaining record and metadata elsewhere so the shard can continue.

  58. Question 58Development with AWS Services

    A team deploys a Lambda function by publishing a new version and updating a production alias. They must shift traffic to the new version gradually and roll back automatically if errors exceed a threshold. Which approach provides this?

    1. Deploy two separate functions and split traffic with an Application Load Balancer.
    2. Set the function's reserved concurrency to zero for the duration of the deployment.
    3. Use CodeDeploy with a canary preference and CloudWatch alarms on the alias. Correct answer.
    4. Point the alias at 100 percent of the new version and rely on Lambda's built-in retries.

    Explanation

    CodeDeploy for Lambda shifts alias traffic in steps defined by a canary, linear, or all-at-once deployment preference. Alarms attached to the deployment trigger an automatic rollback to the previous version if error metrics breach thresholds. This is how versioned Lambda deployments achieve gradual traffic shifting.

  59. Question 59Development with AWS Services

    A Lambda function fetches a database password from Secrets Manager on every invocation. Invocation volume has grown, and the team wants to reduce the number of GetSecretValue calls and the added latency while keeping secrets out of environment variables. What should they do?

    1. Embed the secret in the deployment package and redeploy the function whenever it rotates.
    2. Increase the SDK client timeout and retry configuration for every GetSecretValue call.
    3. Cache the value with the Secrets Manager Lambda extension or an in-memory TTL cache. Correct answer.
    4. Store the secret in a global variable inside the function and refresh it only on each cold start.

    Explanation

    The Secrets Manager Lambda extension runs as a local HTTP endpoint that caches secrets for the life of the execution environment, so most invocations avoid a network call to the service. An in-memory cache in the handler's global scope with a time-to-live achieves a similar effect in code. Both approaches also pick up rotated values once the cache expires.

  60. Question 60Development with AWS Services

    An application runs on an EC2 instance and uses the AWS SDK without explicitly configuring credentials. The SDK must locate credentials. Which source does the default credential provider chain use after environment variables and the shared credentials file are exhausted?

    1. The IAM role attached to the EC2 instance, delivered through instance metadata. Correct answer.
    2. Credentials hard-coded in the application source code that the SDK reads at startup.
    3. The account root credentials stored in the instance's user data script.
    4. Credentials stored in SSM Parameter Store and loaded by the SDK automatically.

    Explanation

    The default provider chain checks environment variables, then the shared credentials and config files, then the container or instance metadata service. On EC2, the instance profile role supplies rotating temporary credentials through IMDS. This lets applications run without any embedded secrets.

  61. Question 61Development with AWS Services

    A Step Functions workflow receives a list of 500 order IDs and must call the same Lambda function once per order, running the calls concurrently and collecting all results before the next state. Which state should be used?

    1. A Choice state with 500 separate branches for the order IDs.
    2. A Map state with an iterator that invokes the function for each item. Correct answer.
    3. A Parallel state with 500 static branches, one per order ID.
    4. A Wait state with a loop that retries the function for each order ID.

    Explanation

    A Map state iterates over an array in the input and runs the same set of states, such as a Lambda task, for each element, collecting results before the workflow continues. It supports a MaxConcurrency setting to control how many iterations run at once. Parallel branches are static and cannot be generated dynamically from the input array.

  62. Question 62Development with AWS Services

    A REST API uses a Lambda token authorizer with authorization caching enabled. After a user's permissions are revoked in the backend, the user can still call the API for several minutes. Which change makes revocations take effect most quickly while keeping authorizer invocations low?

    1. Increase the authorizer cache TTL and rotate the API key the client presents.
    2. Lower the authorizer result TTL, or disable authorizer caching entirely. Correct answer.
    3. Enable detailed CloudWatch metrics on the stage and lower the integration timeout.
    4. Move the authorization logic into the integration function and allow all requests by default.

    Explanation

    API Gateway caches the policy returned by a Lambda authorizer for the configured time-to-live, keyed by the token or identity source. Until that TTL expires, the cached policy is reused and the authorizer is not invoked again. Reducing or removing the TTL trades fewer authorizer invocations for faster propagation of permission changes.

  63. Question 63Development with AWS Services

    An order workflow must, in a single atomic operation, create an order item and decrement the stock count of a product item, and it must fail completely if stock is insufficient. The order and product items live in the same DynamoDB table. Which approach meets these requirements?

    1. Call PutItem for the order and UpdateItem for the product inside a Lambda try/catch block.
    2. Use TransactWriteItems with a Put and a conditional Update in a single request. Correct answer.
    3. Scan the table to check stock, then write both items with two sequential UpdateItem calls.
    4. Write both items with PutItem and use DynamoDB Streams to revert the order if stock runs out.

    Explanation

    TransactWriteItems groups up to 100 write actions across items into one all-or-nothing request. A condition expression on the stock Update, such as requiring the quantity to remain non-negative, causes the whole transaction to be cancelled when stock is insufficient. This gives atomicity and isolation without compensating logic.

  64. Question 64Development with AWS Services

    A service calls DynamoDB through the AWS SDK and occasionally receives ProvisionedThroughputExceededException, which grows worse when many clients retry at the same moment. Which SDK configuration improves resilience to throttling?

    1. Retry only on 4xx client errors, using a fixed one-second delay between each attempt.
    2. Increase the client read timeout and set the maximum retry attempts to zero for all requests.
    3. Disable SDK retries entirely and propagate the throttling error to the calling service immediately.
    4. Use the SDK's adaptive retry mode with exponential backoff and jitter. Correct answer.

    Explanation

    Adaptive retry mode adds client-side rate limiting on top of exponential backoff with jitter, which reduces synchronized retry storms against a throttled resource. Jitter spreads retries over time so multiple clients do not collide. Throttling errors are retryable, while validation errors in the 4xx range generally are not.

  65. Question 65Security

    An identity policy attached to a user allows s3:GetObject on a bucket. A bucket policy explicitly denies s3:GetObject to that same user. What happens when the user requests the object?

    1. Denied, unless the user assumes a role first
    2. Denied, because an explicit deny overrides any allow Correct answer.
    3. Allowed, because the identity policy allows the action
    4. Allowed, because bucket policies are evaluated last

    Explanation

    AWS evaluates all applicable policies together: a request is allowed only when at least one policy allows it and no policy explicitly denies it. An explicit deny in any policy type wins over every allow.

  66. Question 66Security

    An application running on EC2 must call DynamoDB without storing long-term credentials on the instance. Which mechanism should be used?

    1. A root account access key in AWS Config
    2. An SSH key pair registered with IAM
    3. An access key stored in a user data script
    4. An IAM role attached to an instance profile Correct answer.

    Explanation

    EC2 instances obtain temporary credentials for an IAM role through instance metadata, and the SDK refreshes them automatically before expiration. No long-term secrets are written to disk.

  67. Question 67Security

    A developer must give a third party temporary access to a private S3 object without changing bucket or object permissions. Which approach works?

    1. Make the object public for one hour
    2. Create a new IAM user for the third party
    3. Add an anonymous principal to the bucket policy temporarily
    4. Generate a pre-signed URL with a short expiration Correct answer.

    Explanation

    A pre-signed URL embeds the signer's credentials and an expiration in the URL, so the holder can perform only the signed operation until it expires. Permissions on the bucket and object stay unchanged.

  68. Question 68Security

    Which statement describes how security groups handle traffic?

    1. They are stateful, so return traffic is allowed automatically Correct answer.
    2. They evaluate numbered rules in order and end with an implicit deny
    3. They are stateless, so return traffic needs its own rule
    4. They support explicit deny rules for specific IP ranges

    Explanation

    Security groups are stateful: responses to an allowed inbound connection are permitted outbound regardless of outbound rules, and the reverse also holds. They support allow rules only.

  69. Question 69Security

    A developer stores configuration values in SSM Parameter Store and needs one value encrypted with KMS and decrypted automatically on retrieval. Which parameter type should be used?

    1. String
    2. StringList
    3. SecureString Correct answer.
    4. EncryptedText

    Explanation

    SecureString parameters are encrypted with a KMS key and are decrypted when retrieved with the WithDecryption option enabled. Other parameter types are stored in plaintext.

  70. Question 70Security

    How is data at rest encrypted in a new DynamoDB table by default?

    1. With a TLS certificate stored in ACM
    2. Only with a customer managed key you create
    3. With an AWS owned key, at no extra cost Correct answer.
    4. It is not encrypted unless you enable encryption

    Explanation

    DynamoDB encrypts all data at rest by default using an AWS owned KMS key that is not visible in your account and adds no cost. You may switch to a customer managed key for control over rotation and access.

  71. Question 71Security

    A Lambda function must read objects from an S3 bucket. Where are the required permissions defined?

    1. In the execution role assumed by the function Correct answer.
    2. In a resource policy on the function alias
    3. In the S3 bucket ACL
    4. In the function's environment variables

    Explanation

    Lambda assumes an execution role at runtime, and the identity policy on that role grants the function access to other AWS services. The function has exactly the permissions of its execution role.

  72. Question 72Security

    Which service records API activity in an account, including which principal made each request and when?

    1. Amazon Inspector
    2. AWS Config
    3. AWS CloudTrail Correct answer.
    4. VPC Flow Logs

    Explanation

    CloudTrail logs API calls with the caller identity, source IP address, and timestamp, making it the audit record of who did what. Config tracks resource configuration state instead of individual API callers.

  73. Question 73Security

    A developer in Account A must call an API using a role defined in Account B. What must be in place?

    1. Both accounts joined to the same AWS Organization
    2. A shared secret access key provided by Account B
    3. A trust policy in Account B that allows Account A Correct answer.
    4. An instance profile attached to the role in Account B

    Explanation

    Cross-account role assumption requires the role's trust policy to list the calling account or principal and the caller's identity policy to allow sts:AssumeRole. The caller then receives temporary credentials scoped to the role.

  74. Question 74Security

    Why does the AWS Encryption SDK call KMS GenerateDataKey when encrypting large files?

    1. It keeps the data key valid only inside KMS
    2. It removes the need to store an encrypted data key
    3. It stores the whole object inside the KMS hardware module
    4. It returns a data key used to encrypt the data locally Correct answer.

    Explanation

    Envelope encryption uses GenerateDataKey to get a plaintext data key plus its KMS-encrypted copy. Bulk data is encrypted locally with the plaintext key, and only the small encrypted key is stored with the ciphertext.

  75. Question 75Security

    Which capability is the main reason to choose Secrets Manager over Parameter Store for database credentials?

    1. Automatic rotation of the secret using a Lambda function Correct answer.
    2. It allows values larger than the 4 KB parameter limit
    3. It supports hierarchical names for organizing parameters
    4. It is free for standard parameters

    Explanation

    Secrets Manager has built-in rotation support that invokes a Lambda function to change the credential and update the stored secret. Parameter Store does not provide native rotation.

  76. Question 76Security

    A mobile app signs users in with a Cognito user pool and then needs temporary AWS credentials to upload to S3. What supplies those credentials?

    1. An IAM user access key bundled in the app
    2. A Cognito identity pool linked to an IAM role Correct answer.
    3. A Cognito user pool app client
    4. An S3 bucket ACL granting access to the app

    Explanation

    An identity pool exchanges the user pool token for temporary AWS credentials through STS, scoped to the IAM role configured for authenticated users. User pools handle authentication only.

  77. Question 77Security

    An application in a private subnet must call S3 without traffic leaving the AWS network. Which configuration achieves this?

    1. A NAT gateway with an elastic IP address
    2. An internet gateway attached to the private subnet
    3. A gateway VPC endpoint for S3 with a route table entry Correct answer.
    4. A VPC peering connection to the S3 service

    Explanation

    Gateway endpoints for S3 and DynamoDB are associated with route tables and route traffic privately to the service. NAT gateways send traffic to the internet, which the requirement forbids.

  78. Question 78Security

    A user's identity policy allows s3:CreateBucket, yet the call fails with AccessDenied because an SCP attached to the account lists s3:CreateBucket in a Deny statement. Why does the call fail?

    1. SCPs apply only to the account root user
    2. SCPs limit the maximum permissions available in the account Correct answer.
    3. The bucket policy must also allow the action
    4. Identity policies always override SCP denials

    Explanation

    Service control policies set the permission ceiling for principals in an account, so a deny in an SCP blocks the action regardless of identity policies. An explicit deny always wins.

  79. Question 79Security

    A Java application uses the AWS SDK on an EC2 instance and no credentials are configured in code. What does the default credential provider chain use?

    1. A hard-coded key inside the SDK
    2. The IAM role attached to the instance Correct answer.
    3. The AWS Support API key
    4. The root account password

    Explanation

    The default chain checks environment variables, then the shared credentials file, then the instance metadata service, which serves temporary credentials for the attached role.

  80. Question 80Security

    How does IMDSv2 improve the security of the EC2 instance metadata service compared with IMDSv1?

    1. It requires a session token obtained with a PUT request Correct answer.
    2. It disables the metadata service by default
    3. It encrypts metadata with a KMS key
    4. It requires IAM authentication for each metadata call

    Explanation

    IMDSv2 requires a PUT request to obtain a session token and then a token header on each GET, which mitigates SSRF-style access to role credentials. You can enforce it through instance metadata options.

  81. Question 81Security

    What is the primary purpose of IAM Access Analyzer?

    1. To find resources shared externally through resource policies Correct answer.
    2. To rotate access keys automatically
    3. To scan EC2 instances for missing patches
    4. To enforce password complexity rules for IAM users

    Explanation

    Access Analyzer analyzes resource policies such as bucket policies and role trust policies to identify resources reachable by principals outside the account or organization.

  82. Question 82Security

    A developer needs an ACM certificate for a CloudFront distribution. In which region must the certificate be requested?

    1. In us-east-1 Correct answer.
    2. In every region where the distribution is deployed
    3. In the region closest to the end users
    4. In the region where the origin bucket is located

    Explanation

    CloudFront is a global service and accepts ACM certificates only from us-east-1. Certificates for regional resources such as an ALB must be issued in that resource's own region.

  83. Question 83Security

    Which policy element enforces that a caller used MFA before performing s3:DeleteObject?

    1. A Condition block testing aws:MultiFactorAuthPresent Correct answer.
    2. An SCP with a NotAction element
    3. A permissions boundary on the user
    4. A resource tag condition on the bucket

    Explanation

    The aws:MultiFactorAuthPresent global condition key is true only when the request is made with MFA-derived temporary credentials, so a deny with a false condition enforces MFA.

  84. Question 84Security

    Which setting blocks public access to every bucket in an account even if a bucket policy grants it?

    1. Default encryption on the bucket
    2. Object Ownership with ACLs disabled
    3. Versioning on the bucket
    4. Account-level S3 Block Public Access Correct answer.

    Explanation

    Block Public Access at the account level overrides bucket policies and ACLs that would otherwise make a bucket or its objects public. Bucket-level settings only cover one bucket.

  85. Question 85Security

    A user's identity policy allows ec2:StartInstances, but the attached permissions boundary does not include that action. What is the result?

    1. The action is allowed because the identity policy grants it
    2. The action is denied only if an SCP also denies it
    3. The action is denied because the boundary caps effective permissions Correct answer.
    4. The action is allowed if the boundary contains no Deny statements

    Explanation

    Effective permissions are the intersection of identity policies and the permissions boundary. An action must be allowed by both, so the boundary alone can block it.

  86. Question 86Security

    A principal in the same account has kms:Decrypt in an identity policy but receives AccessDenied from a customer managed key. What explains this?

    1. The key is pending deletion
    2. KMS keys can only be used by the root user
    3. The key policy does not enable IAM policies to grant access Correct answer.
    4. The principal must be in the key's region and account

    Explanation

    Every KMS key has a key policy, and by default nothing else can grant access unless the key policy includes the statement that enables IAM policies in the account. Without that statement, identity policies have no effect on the key.

  87. Question 87Security

    When a request is signed with AWS Signature Version 4, which value is included in the string to sign?

    1. A hash of the canonical request Correct answer.
    2. The full response body returned by the service
    3. The IAM user's console password
    4. The KMS data key used for the payload

    Explanation

    SigV4 builds a canonical request, hashes it with SHA-256, and signs a string containing that hash along with the algorithm, timestamp, scope, and credential. The secret access key itself is never transmitted.

  88. Question 88Security

    Which statement about S3 MFA delete is accurate?

    1. It requires MFA for every GET request on the bucket
    2. Only the root account can enable it, and deletes require MFA Correct answer.
    3. It is enabled by default on new buckets
    4. Any IAM user with s3:PutBucketVersioning can enable it

    Explanation

    MFA delete must be enabled by the bucket owner's root user on a versioned bucket, and permanently deleting versions or suspending versioning then requires an MFA code.

  89. Question 89Security

    What do AWS KMS grants provide?

    1. Temporary delegation of key usage without editing the key policy Correct answer.
    2. Long-term credentials for calling KMS APIs
    3. Permissions that apply to every key in the account
    4. A complete replacement for the key policy

    Explanation

    Grants delegate a subset of KMS operations on one key to a principal, optionally with a retire time, without modifying the key policy. AWS services commonly use grants for this purpose.

  90. Question 90Security

    An IAM user has an MFA device registered, and the user's policy requires MFA for certain API calls. The user needs temporary credentials for their own identity that carry the MFA context, without assuming a role. Which approach should the developer use?

    1. Call GetCallerIdentity and include the MFA code as a parameter.
    2. Call GetSessionToken and pass the MFA code. Correct answer.
    3. Call AssumeRole and pass the MFA code to the role session.
    4. Call GetFederationToken with the user's long-term access key.

    Explanation

    sts:GetSessionToken returns temporary credentials for an existing IAM user and accepts an MFA serial number and token code, so the session carries MFA context that keys like aws:MultiFactorAuthPresent evaluate. It is the API intended for elevating a user's own credentials with MFA rather than assuming a different role.

  91. Question 91Security

    A developer needs encryption at rest for data written by an AWS service and wants AWS to own the key policy and rotation, with no monthly key fee. Which KMS key type should be used?

    1. An AWS managed key (aws/<service>) Correct answer.
    2. A multi-Region customer managed key
    3. A customer managed key with automatic rotation enabled
    4. An asymmetric customer managed key

    Explanation

    AWS managed keys are created and maintained by the AWS service that uses them; AWS controls the key policy, rotates them automatically, and does not charge a monthly key fee. Customer managed keys give the account control over policy and rotation but incur the monthly charge.

  92. Question 92Security

    A developer must let an external partner download a single private object from an S3 bucket for the next few hours. The partner has no AWS account credentials and the object must not become public. What is the most appropriate approach?

    1. Create an IAM user with read-only S3 access and share its access keys.
    2. Attach a bucket policy that allows the partner's IP range to read all objects.
    3. Generate a presigned URL for the object that expires in a short period. Correct answer.
    4. Make the object public by using an ACL.

    Explanation

    A presigned URL embeds the signer's permissions and an expiry time in the URL, so a bearer can retrieve one object without any AWS credentials and without changing the object's public status. It is the standard way to grant time-limited access to a private object.

  93. Question 93Security

    Which construct evaluates its inbound rules only when a connection is established, so that return traffic for an allowed connection is automatically permitted?

    1. A VPC endpoint policy on the interface endpoint
    2. An AWS WAF web ACL associated with the load balancer
    3. A security group associated with the elastic network interface Correct answer.
    4. A network ACL associated with the subnet

    Explanation

    Security groups are stateful: when an inbound or outbound connection is permitted, the response traffic for that connection is allowed regardless of the rules in the other direction. Network ACLs are stateless and require explicit rules for both directions.

  94. Question 94Security

    A developer stores an RDS password in Secrets Manager and must change it on a schedule without breaking running applications. What should be configured on the secret?

    1. A CloudWatch alarm that triggers a Systems Manager Automation document.
    2. An EventBridge rule that overwrites the Secrets Manager secret value directly.
    3. A KMS key rotation schedule on the key that encrypts the secret.
    4. A rotation schedule with a Lambda rotation function. Correct answer.

    Explanation

    Secrets Manager rotates a secret by invoking a Lambda rotation function on the schedule attached to the secret; the function talks to the database and updates both the database and the stored secret. Applications that call GetSecretValue then pick up the new credential.

  95. Question 95Security

    Which CloudTrail capability lets a developer demonstrate that delivered log files were not altered after delivery?

    1. CloudTrail Insights events
    2. CloudTrail Lake queries over the trailing 90 days
    3. An organization trail that applies to all accounts
    4. Log file integrity validation with digest files Correct answer.

    Explanation

    When log file integrity validation is enabled, CloudTrail delivers digest files containing hash values for the log files so that each file can later be verified as unmodified. The digest files are the evidence that tampering or deletion has not occurred.

  96. Question 96Security

    Which statement about IAM groups is correct?

    1. A group can be assigned an access key so applications can use its permissions.
    2. A user can belong to multiple groups and inherits the union of their permissions. Correct answer.
    3. A group can contain other groups to build a hierarchy of permissions.
    4. A group can be listed as the Principal in an S3 bucket policy.

    Explanation

    Groups are collections of IAM users, and a user who belongs to several groups receives the combined permissions of all of them. Groups are not identities that can be authenticated, so they cannot be a policy principal and cannot hold credentials.

  97. Question 97Security

    A developer stores a database password as a SecureString parameter in Systems Manager Parameter Store. Which service performs the encryption of the stored value?

    1. AWS KMS, using a key the account chooses Correct answer.
    2. Amazon S3 with SSE-S3, because parameters are stored in buckets
    3. AWS Secrets Manager, which backs Parameter Store
    4. An ACM private certificate authority

    Explanation

    SecureString parameters are encrypted with AWS KMS, using either the default alias/aws/ssm key or a customer managed key that the account selects. Decryption happens on retrieval and requires kms:Decrypt permission for the caller.

  98. Question 98Security

    A company tags IAM roles with project=blue and S3 objects with project=blue. Which policy design grants access only when the role's tag matches the object's tag?

    1. An SCP that compares the role tag with the bucket name.
    2. A permissions boundary on each role that lists every project tag explicitly.
    3. A resource-based policy that filters requests by aws:SourceIp.
    4. Attribute-based access control with aws:PrincipalTag and s3:ExistingObjectTag. Correct answer.

    Explanation

    Attribute-based access control compares tags carried in the request principal and the resource; aws:PrincipalTag supplies the role's tag and s3:ExistingObjectTag supplies the object's tag, so a single policy scales to new projects without edits. The condition fails when the tags differ, denying access.

  99. Question 99Security

    A developer calls sts:AssumeRole and passes an inline session policy. How are the effective permissions of the resulting session determined?

    1. The session policy is ignored unless the role's trust policy references it.
    2. The union of the role's identity policies and the session policy.
    3. The intersection of the role's identity policies and the session policy. Correct answer.
    4. The session policy replaces the role's identity policies for the duration of the session.

    Explanation

    Session policies only reduce permissions: the session can do what both the role's identity policies and the session policy allow, which is their intersection. They can never add permissions the role does not already have.

  100. Question 100Security

    An S3 gateway endpoint in a VPC has a policy that allows access only to the bucket reports-prod. An instance in that VPC uses the endpoint to request the bucket logs-archive, and the instance role allows s3:GetObject on logs-archive. What is the result?

    1. The request succeeds but is recorded in CloudTrail as an anomaly.
    2. The request is automatically rerouted over the public internet instead.
    3. The request is denied because the endpoint policy does not allow it. Correct answer.
    4. The request succeeds because the instance role allows s3:GetObject on the bucket.

    Explanation

    Traffic through an endpoint must be permitted by the endpoint policy as well as by the caller's identity policy. Because the endpoint policy does not allow logs-archive, the request through the endpoint is denied even though the instance role grants the action.

  101. Question 101Security

    Account A owns a Lambda function, and an S3 bucket in Account B must be able to invoke it. Which policy must the developer modify to allow the invocation?

    1. The execution role of the Lambda function in Account A.
    2. The resource-based policy of the Lambda function in Account A. Correct answer.
    3. The identity policy of the S3 bucket owner in Account B.
    4. The SCP applied to Account B in AWS Organizations.

    Explanation

    Lambda functions support a resource-based policy that grants other principals, including services acting on behalf of another account, permission to invoke the function. The execution role controls what the function can do, not who can invoke it.

  102. Question 102Security

    Users in Account B must read objects in a bucket owned by Account A. No SCP blocks S3 and both accounts are in the same organization. What combination is required?

    1. A resource-based policy on the S3 service in Account B trusting Account A.
    2. A bucket ACL in Account A granting READ to Account B, and nothing else.
    3. An IAM role in Account A assumed by Account B, plus a KMS grant for the bucket.
    4. A bucket policy granting Account B, plus an identity policy in Account B allowing the reads. Correct answer.

    Explanation

    Cross-account access requires permission on both sides: the resource owner authorizes the external principal through a bucket policy, and the caller's account must also allow the action through an identity policy. Neither side alone is sufficient.

  103. Question 103Security

    A CodeBuild project needs a database password at build time, and the password must not appear in the buildspec or the source repository. Which approach should the developer use?

    1. Commit an encrypted .env file to the repository and decrypt it during the build.
    2. Store the password in a plaintext environment variable in the project definition.
    3. Bake the password into a custom Docker image stored in Amazon ECR.
    4. Use a SECRETS_MANAGER environment variable type referencing the secret. Correct answer.

    Explanation

    CodeBuild resolves environment variables of type SECRETS_MANAGER at build time by fetching the value from Secrets Manager, so the credential never appears in the buildspec or repository and can be rotated centrally. Access is controlled by the build project's service role.

  104. Question 104Security

    A GitHub Actions workflow must call AWS APIs without storing long-term access keys in the repository or in GitHub secrets. Which mechanism should be used?

    1. Store access keys in GitHub encrypted secrets and load them into the job.
    2. Create an IAM user for CI and rotate its access keys every 90 days.
    3. Add an OIDC identity provider in IAM and call AssumeRoleWithWebIdentity. Correct answer.
    4. Store the keys in Parameter Store and fetch them with the AWS CLI in the job.

    Explanation

    Registering GitHub as an OpenID Connect identity provider lets the workflow present a short-lived OIDC token that IAM exchanges via AssumeRoleWithWebIdentity for temporary AWS credentials. The role's trust policy can restrict which repository and branch may assume it, eliminating stored keys entirely.

  105. Question 105Security

    A company distributes thousands of private video files from CloudFront and needs each authenticated subscriber to reach many files without requesting a separate URL per file. Which CloudFront mechanism fits?

    1. Signed URLs generated separately for each video file with a short expiry.
    2. An origin access control attached to the S3 origin.
    3. AWS WAF rules that match the subscriber's IP ranges.
    4. Signed cookies that cover multiple files at once. Correct answer.

    Explanation

    Signed cookies carry the authorization once and apply to every request that matches the cookie's path, which suits a subscriber who streams many files. Signed URLs authorize exactly one URL and would require issuing a new URL per file.

  106. Question 106Security

    Which service inspects HTTP requests to a CloudFront distribution, blocks SQL injection payloads, and rate-limits abusive clients before requests reach the origin?

    1. AWS Shield Standard
    2. AWS Network Firewall
    3. Amazon GuardDuty
    4. AWS WAF Correct answer.

    Explanation

    AWS WAF evaluates web requests against rule groups, including managed rule groups for injection attacks and rate-based rules, and it can be associated directly with a CloudFront distribution. Blocked requests are stopped at the edge before reaching the origin.

  107. Question 107Security

    Which service continuously analyzes VPC Flow Logs, DNS query logs, and CloudTrail events to detect compromised instances and credential misuse?

    1. Amazon Inspector
    2. AWS Config
    3. AWS Security Hub
    4. Amazon GuardDuty Correct answer.

    Explanation

    GuardDuty is a managed threat detection service that consumes VPC Flow Logs, DNS logs, and CloudTrail management and data events and raises findings for behaviors such as cryptocurrency mining or anomalous API calls. It requires no agent installation on instances.

  108. Question 108Security

    Which service identifies and classifies sensitive data such as personally identifiable information stored in S3 buckets?

    1. AWS Artifact
    2. Amazon Inspector
    3. Amazon Macie Correct answer.
    4. AWS Config

    Explanation

    Macie uses managed and custom data identifiers to sample and classify objects in S3 and reports findings when sensitive data such as names, credit card numbers, or credentials are found. It also flags buckets with risky exposure settings.

  109. Question 109Security

    An application decrypts tens of thousands of small objects per minute with the AWS Encryption SDK and is being throttled on KMS requests. Which change reduces KMS calls while keeping the same key management model?

    1. Move the objects to SSE-S3 so KMS is not involved.
    2. Enable the SDK's local data key cache to reuse data keys. Correct answer.
    3. Store the plaintext data keys next to the objects in the bucket.
    4. Request a KMS quota increase and keep calling Decrypt for every object.

    Explanation

    The Encryption SDK's data key cache keeps decrypted data keys locally so repeated objects protected under the same data key do not each trigger a KMS Decrypt call. A configurable TTL and message limit bound reuse while envelope encryption stays in place.

  110. Question 110Security

    A Lambda function's resource-based policy grants Amazon SNS permission to invoke it. A developer must ensure only one specific SNS topic in the same account can invoke the function. Which condition should be added to the policy statement?

    1. aws:MultiFactorAuthPresent set to true
    2. aws:PrincipalOrgID set to the organization ID
    3. aws:SourceArn set to the topic's ARN Correct answer.
    4. aws:SourceIp set to the published SNS IP ranges

    Explanation

    When a service invokes a resource on a caller's behalf, the request carries the source resource in aws:SourceArn, so constraining that key limits invocation to the named topic. This is the standard defense against the confused deputy problem for service principals.

  111. Question 111Security

    A developer creates a presigned S3 URL using temporary credentials from AssumeRole, setting the URL expiry to 12 hours. The role session duration is 1 hour. What is the behavior of the URL?

    1. It stays valid for the full 12 hours because the signature is independent of the credentials used to compute it.
    2. It works for 12 hours only if versioning is enabled on the bucket.
    3. It stops working after 1 hour, when the credentials used to sign it expire. Correct answer.
    4. It fails immediately because presigned URLs cannot be created with temporary credentials.

    Explanation

    A presigned URL is only as long-lived as the credential that signed it, so it becomes unusable when that session expires even if the requested expiry is later. Presigned URLs can be created from temporary credentials, but their effective lifetime is the shorter of the two.

  112. Question 112Security

    A role in Account B must read objects in Account A's bucket, and those objects are encrypted with SSE-KMS using an Account A customer managed key. Account A's bucket policy grants s3:GetObject to the role. What else must be in place?

    1. Nothing; S3 decrypts the objects automatically for any principal that can read them.
    2. A key policy in Account A and a kms:Decrypt identity policy in Account B. Correct answer.
    3. An AWS managed key in Account B that mirrors the Account A key.
    4. Only a kms:Decrypt statement in Account B's identity policy.

    Explanation

    KMS authorizes every Decrypt call against the key policy of the customer managed key as well as the caller's identity policy. Account A's key policy must allow the Account B role to use the key, and the role's own identity policy must permit kms:Decrypt; S3 permission alone is not enough.

  113. Question 113Security

    A SaaS vendor assumes a role in each customer's AWS account. Which mechanism prevents a malicious customer from pointing the vendor at another customer's resources through the vendor's role?

    1. A permissions boundary on the vendor's role.
    2. An external ID required by the role's trust policy. Correct answer.
    3. An IP restriction in the vendor's identity policy.
    4. MFA enforcement in the role's trust policy.

    Explanation

    The trust policy requires a unique external ID that the vendor supplies when assuming the role for a particular customer, tying each session to that customer and defeating the confused deputy problem. A customer who does not know the ID cannot induce the vendor to assume the role on their behalf.

  114. Question 114Security

    A company encrypts a dataset with a KMS customer managed key in us-east-1 and copies the ciphertext to eu-west-1, where an application must decrypt it without a cross-Region KMS call. Which key design satisfies this?

    1. An AWS managed key in each Region.
    2. A KMS multi-Region key replicated to both Regions. Correct answer.
    3. An asymmetric key pair exported to both Regions.
    4. A single-Region key with a cross-Region replica grant.

    Explanation

    Multi-Region keys are replicas that share the same key material and key ID across Regions, so ciphertext produced under the primary key can be decrypted locally with the replica. The application makes a KMS call in its own Region rather than a cross-Region one.

  115. Question 115Security

    An application runs on an Amazon EC2 instance and must call AWS APIs. The security team requires that no long-term credentials be stored on the instance or baked into its AMI. Which mechanism should the developer use?

    1. A KMS data key cached in memory by the application at startup
    2. An IAM user access key pair written into a configuration file on the instance
    3. An IAM role attached to the instance through an instance profile Correct answer.
    4. An SSH key pair created at launch and referenced by the application

    Explanation

    An instance profile delivers temporary credentials from an IAM role to the instance through the instance metadata service, and the credentials are automatically rotated before they expire. No access keys need to be written to disk or embedded in the AMI.

  116. Question 116Security

    A developer stores an Amazon RDS for MySQL database password in AWS Secrets Manager and wants the password changed every 30 days without writing or maintaining rotation code. What should the developer configure?

    1. A scheduled rule that creates a new secret version by calling the RDS API directly
    2. A SecureString parameter in Parameter Store with a 30-day rotation schedule
    3. Deletion protection on the secret with a 30-day recovery window
    4. Automatic rotation on the secret using the Secrets Manager rotation function provided for the RDS engine Correct answer.

    Explanation

    Secrets Manager supports automatic rotation by invoking a Lambda rotation function on a schedule, and AWS provides rotation function templates for supported engines such as RDS for MySQL. The rotation function updates both the database credential and the stored secret version.

  117. Question 117Deployment

    Which Elastic Beanstalk deployment policy launches a fresh set of instances in a new Auto Scaling group and only shifts traffic to them after they pass health checks?

    1. Immutable Correct answer.
    2. Rolling
    3. All at once
    4. Rolling with additional batch

    Explanation

    Immutable deployments create a new Auto Scaling group with the new application version and leave the original group serving traffic until the new instances are healthy, so a failed deployment never degrades the running environment.

  118. Question 118Deployment

    Where must Elastic Beanstalk customization files be placed inside an application source bundle?

    1. In a folder named config at the bundle root, using .yml files
    2. In a folder named .ebextensions at the bundle root, using .config files Correct answer.
    3. In the application's public web root directory
    4. In a folder named .elasticbeanstalk next to the application code

    Explanation

    Elastic Beanstalk reads customization directives from files with a .config extension placed in a top-level directory named .ebextensions within the source bundle.

  119. Question 119Deployment

    Which CodeDeploy lifecycle event runs last during an in-place deployment to EC2 instances?

    1. BeforeInstall
    2. ApplicationStart
    3. ValidateService Correct answer.
    4. AfterInstall

    Explanation

    For EC2/on-premises deployments the hooks run in the order BeforeInstall, AfterInstall, ApplicationStart, then ValidateService, which confirms the service is running correctly after it starts.

  120. Question 120Deployment

    How does AWS CodePipeline order execution within a pipeline?

    1. Execution order is determined only by manual approval actions
    2. Stages run in parallel, and actions within a stage run sequentially
    3. All stages and all actions run in parallel
    4. Stages run sequentially, and actions within a stage run in parallel Correct answer.

    Explanation

    A pipeline advances through its stages one after another, while actions placed in the same stage run concurrently unless run order is specified.

  121. Question 121Deployment

    Which file does AWS CodeBuild read by default to determine build phases and commands?

    1. pipeline.json at the root of the source
    2. template.yaml at the root of the source
    3. appspec.yml at the root of the source
    4. buildspec.yml at the root of the source Correct answer.

    Explanation

    CodeBuild looks for buildspec.yml in the source root unless a different path or inline build spec is supplied when the project is created.

  122. Question 122Deployment

    What does a CloudFormation change set provide before a stack update is executed?

    1. An automatic rollback of the stack to its previous state
    2. A copy of the stack created in a different region
    3. A conversion of the stack into a nested stack
    4. A preview of the resources that will be added, modified, or removed Correct answer.

    Explanation

    A change set calculates the difference between the current stack and the proposed template and parameters so the operator can review the impact before applying it.

  123. Question 123Deployment

    A developer wants 10 percent of Lambda invocations to go to a new function version while the remainder stays on the current version. What should be configured?

    1. A weighted alias with routing configuration across the two versions Correct answer.
    2. A Lambda layer attached to the new version
    3. Two separate functions registered behind an Application Load Balancer
    4. A reserved concurrency limit on the new version

    Explanation

    A Lambda alias can hold a routing configuration that assigns a percentage of invocation traffic to an additional version, enabling gradual rollout without changing the caller's target.

  124. Question 124Deployment

    An API Gateway REST API's methods have been edited. What must happen for the changes to be served at the stage's invoke URL?

    1. Manually invalidate the CloudFront distribution
    2. Restart the API Gateway service
    3. Create a new deployment and point the stage at it Correct answer.
    4. Enable caching on the stage

    Explanation

    API Gateway stages serve an immutable snapshot of the API, so edits take effect only after a new deployment is created and associated with the stage.

  125. Question 125Deployment

    Which approach gives an Elastic Beanstalk blue/green release with fast cutover and simple rollback?

    1. Change the instance type of the existing environment
    2. Terminate the environment and recreate it from a saved configuration
    3. Deploy with the all-at-once policy to the existing environment
    4. Create a second environment running the new version and swap the two environments' CNAMEs Correct answer.

    Explanation

    Two environments each with their own URL allow the new version to be validated in isolation; swapping the CNAMEs moves traffic instantly and swapping back restores the old version.

  126. Question 126Deployment

    What does CodeDeploy require in order to run a blue/green deployment to EC2 instances?

    1. A load balancer with two target groups, one for the original and one for the replacement instances Correct answer.
    2. A Route 53 private hosted zone for the instances
    3. An Auto Scaling group containing exactly one instance
    4. An ECS cluster using the Fargate launch type

    Explanation

    CodeDeploy provisions replacement instances into a second target group and shifts load balancer traffic from the original target group to it once the new instances pass health checks.

  127. Question 127Deployment

    Which lifecycle hooks are available in a CodeDeploy deployment to a Lambda function?

    1. BeforeInstall and AfterInstall
    2. ApplicationStart and ValidateService
    3. Start and End
    4. BeforeAllowTraffic and AfterAllowTraffic Correct answer.

    Explanation

    Serverless deployments hook into the traffic-shifting process, so validation logic runs in BeforeAllowTraffic and post-shift checks run in AfterAllowTraffic.

  128. Question 128Deployment

    In what order does CodeBuild execute the phases listed in a default buildspec?

    1. install, pre_build, build, post_build Correct answer.
    2. install, build, post_build, pre_build
    3. pre_build, install, build, post_build
    4. build, install, pre_build, post_build

    Explanation

    CodeBuild runs install first (runtime and dependencies), then pre_build commands, then build, and finally post_build commands before uploading artifacts.

  129. Question 129Deployment

    Which CloudFormation resource attribute keeps a resource and its data intact when the stack is deleted?

    1. DependsOn: Retain
    2. UpdateReplacePolicy: Delete
    3. StackPolicy: Deny
    4. DeletionPolicy: Retain Correct answer.

    Explanation

    DeletionPolicy controls what happens to a resource when its stack is deleted, and Retain leaves the resource and its contents in place.

  130. Question 130Deployment

    An in-place CodeDeploy deployment targets 10 EC2 instances and must never take more than half of them out of service at once. Which setting achieves this?

    1. A custom deployment configuration with minimum healthy hosts of 50% Correct answer.
    2. Automatic rollback enabled on the deployment group
    3. An AfterInstall hook that checks instance health
    4. A deployment group set to CodeDeployDefault.AllAtOnce

    Explanation

    For in-place deployments the minimum healthy hosts value determines how much of the fleet CodeDeploy leaves serving traffic, so 50% of 10 instances keeps 5 available.

  131. Question 131Deployment

    A team must have a person sign off before each production release in CodePipeline. Which construct adds that gate?

    1. A retry stage in the pipeline
    2. A manual approval action in a stage Correct answer.
    3. A pre_build phase in the buildspec
    4. A CloudWatch Events rule on the pipeline

    Explanation

    A manual approval action pauses the pipeline until an IAM principal with the right permissions approves or rejects it, optionally after sending an SNS notification.

  132. Question 132Deployment

    Which template element causes CloudFormation to interpret a template as an AWS SAM template?

    1. An Outputs section exporting the function ARN
    2. Transform: AWS::Serverless-2016-10-31 Correct answer.
    3. A Metadata section containing sam: true
    4. A Parameters section with the type AWS::Serverless::Function

    Explanation

    The Transform declaration instructs CloudFormation to expand SAM resources such as AWS::Serverless::Function into standard resources during stack operations.

  133. Question 133Deployment

    Which Elastic Beanstalk policy deploys a new version to existing instances in configurable batches while adding a temporary batch so capacity never falls below 100 percent?

    1. Rolling
    2. Rolling with additional batch Correct answer.
    3. All at once
    4. Immutable

    Explanation

    Rolling with additional batch launches an extra batch of instances first, then rolls the update through the existing instances, so the environment retains full capacity throughout.

  134. Question 134Deployment

    A CodeBuild project must read a value stored in SSM Parameter Store into an environment variable without embedding it in the buildspec. Which env key should be used?

    1. secrets-manager
    2. plaintext
    3. exported-variables
    4. parameter-store Correct answer.

    Explanation

    The parameter-store mapping resolves each named environment variable from an SSM Parameter Store parameter when the build starts, keeping the value out of the source repository.

  135. Question 135Deployment

    A team wants a Lambda function to run automatically each time code is pushed to a CodeCommit repository. What should they configure?

    1. A CloudWatch Logs subscription filter on the repository
    2. A repository trigger that targets the Lambda function or an SNS topic Correct answer.
    3. A scheduled rule in Amazon EventBridge that polls the repository
    4. A CodeBuild webhook bound to the repository

    Explanation

    CodeCommit repository triggers fire on events such as pushes and branch/tag creation and can invoke a Lambda function or publish to an SNS topic.

  136. Question 136Deployment

    A company reuses the same networking template for many applications so the definitions stay consistent. Which CloudFormation capability best supports this reuse?

    1. Change sets
    2. Nested stacks Correct answer.
    3. Drift detection
    4. Stack policies

    Explanation

    Nested stacks let a parent template reference a shared child template stored in S3, so common infrastructure is defined once and instantiated by many stacks.

  137. Question 137Deployment

    An ECS service behind an Application Load Balancer uses CodeDeploy blue/green deployments. What must the deployment group define?

    1. An Auto Scaling group attached to the ECS cluster
    2. An ECS capacity provider with managed scaling enabled
    3. One target group plus a Network Load Balancer
    4. Two target groups plus a production listener and an optional test listener Correct answer.

    Explanation

    CodeDeploy for ECS shifts traffic at the load balancer level, so it needs a target group for the original task set and one for the replacement task set, with listeners to route test and production traffic.

  138. Question 138Deployment

    A Lambda deployment package is 80 MB when zipped. How can it be deployed?

    1. Upload the .zip directly through the console or CLI create-function command
    2. Split the code across two functions that are each under 50 MB
    3. Upload the .zip to Amazon S3 and reference the object location when creating the function Correct answer.
    4. Embed the package in the CloudFormation template's Code property

    Explanation

    Direct uploads are limited to roughly 50 MB zipped, so larger packages must be staged in S3 and referenced by bucket, key, and optional version.

  139. Question 139Deployment

    A CodeDeploy deployment group is configured for automatic rollback on failure. Which revision does CodeDeploy redeploy during the rollback?

    1. The last revision that was successfully deployed to the group Correct answer.
    2. The very first revision ever deployed to the group
    3. A new revision generated from the failing deployment
    4. The newest revision available in the repository

    Explanation

    Rollback restores the last known good state by redeploying the revision that previously ran successfully on the deployment group.

  140. Question 140Deployment

    How can a developer stop a stack update from replacing a production database resource?

    1. Attach a stack policy that denies Update:Replace on that resource Correct answer.
    2. Set UpdateReplacePolicy to Delete on the database
    3. Set DeletionPolicy to Snapshot on the database
    4. Add a DependsOn attribute referencing the database

    Explanation

    Stack policies are JSON documents that deny specified update actions on specified resources, so Update:Replace can be blocked to protect the database during updates.

  141. Question 141Deployment

    How does an Elastic Beanstalk worker environment tier deliver messages from its SQS queue to the application?

    1. A daemon on each instance reads the queue and POSTs messages to the application over local HTTP Correct answer.
    2. The Elastic Beanstalk agent writes messages to a local file that the application reads
    3. SQS pushes messages to the instances through an SNS subscription
    4. The application polls the queue itself using the AWS SDK in a scheduled job

    Explanation

    The worker tier runs an SQS daemon on each instance that pulls messages from the environment's queue and delivers them to the application's HTTP endpoint on localhost.

  142. Question 142Deployment

    In an AWS CodeDeploy AppSpec file for an EC2/On-Premises deployment, which section identifies the source files in the revision that must be copied to the instance?

    1. hooks
    2. permissions
    3. files Correct answer.
    4. resources

    Explanation

    The files section maps each file in the revision to a destination path on the target instance, and CodeDeploy copies those files before running any lifecycle scripts. The hooks section lists the scripts that run at each lifecycle event.

  143. Question 143Deployment

    Which AWS CodeDeploy lifecycle event runs last during an EC2/On-Premises deployment?

    1. BeforeInstall
    2. ApplicationStart
    3. AfterInstall
    4. ValidateService Correct answer.

    Explanation

    For EC2/On-Premises deployments the lifecycle order is BeforeInstall, AfterInstall, ApplicationStart, and finally ValidateService. ValidateService confirms that the application is running and is the last event to execute.

  144. Question 144Deployment

    A deployment revision consists of a ZIP archive stored in an Amazon S3 bucket. Which revision type should the developer specify in the CodeDeploy deployment request?

    1. GitHub
    2. CodeCommit
    3. Bitbucket
    4. S3 Correct answer.

    Explanation

    CodeDeploy accepts revisions stored in Amazon S3 as a ZIP or tar archive, or revisions pulled from GitHub or Bitbucket. The revision type must match where the artifact actually lives.

  145. Question 145Deployment

    Which CodePipeline element groups one or more actions that execute at a single point in the release process?

    1. stage Correct answer.
    2. artifact
    3. action type
    4. transition

    Explanation

    A stage contains one or more actions that run in sequence or in parallel at a single point in the pipeline. Transitions control movement between stages, while action types define what an individual action does.

  146. Question 146Deployment

    Which buildspec section lists the files that CodeBuild uploads to the artifact store after a successful build?

    1. cache
    2. artifacts Correct answer.
    3. env
    4. phases

    Explanation

    The artifacts section declares which files are uploaded after a successful build, along with the artifact type and location. The phases section declares the commands, and the cache section declares paths to reuse.

  147. Question 147Deployment

    Which Elastic Beanstalk deployment policy deploys a new application version to all instances at the same time, causing a short period of downtime?

    1. All at once Correct answer.
    2. Rolling with additional batch
    3. Rolling
    4. Immutable

    Explanation

    The All at once policy sends the new version to every instance simultaneously, so the environment is briefly unavailable while instances restart. The other policies keep some capacity serving traffic during the deployment.

  148. Question 148Deployment

    A developer wants to share a large library across several Lambda functions without packaging it into each deployment package. Which Lambda feature should be used?

    1. Aliases
    2. Versions
    3. Environment variables
    4. Layers Correct answer.

    Explanation

    Layers package libraries and other dependencies separately so that multiple functions can reference the same content without bundling it into every deployment package. Versions and aliases manage immutability and traffic routing rather than shared code.

  149. Question 149Deployment

    A CodeDeploy deployment group targets EC2 instances and must take only one instance out of service at a time while keeping the rest available. Which built-in deployment configuration meets this requirement?

    1. CodeDeployDefault.OneAtATime Correct answer.
    2. CodeDeployDefault.LambdaCanary10Percent5Minutes
    3. CodeDeployDefault.HalfAtATime
    4. CodeDeployDefault.AllAtOnce

    Explanation

    CodeDeployDefault.OneAtATime deploys to a single instance at a time and leaves the remaining instances in service, preserving availability. The other built-in configurations either remove larger portions of the fleet from service or apply only to Lambda deployments.

  150. Question 150Deployment

    How does a CodeDeploy deployment group select EC2 instances to deploy to when those instances are not managed by a single Auto Scaling group?

    1. By the AMI ID used to launch the instances
    2. By EC2 tag key and value pairs that match the deployment group's tag groups Correct answer.
    3. By the instance profile name attached to the instances
    4. By the security group attached to the instances

    Explanation

    Without an Auto Scaling group, a deployment group selects targets through tag groups made of EC2 tag key and value pairs. The CodeDeploy agent on each matching instance then receives the revision.

  151. Question 151Deployment

    Which CodeDeploy setting stops an in-progress deployment and rolls it back when a specific Amazon CloudWatch alarm enters the ALARM state?

    1. Alarm configuration on the deployment group Correct answer.
    2. Trigger configuration
    3. Deployment configuration
    4. Load balancer configuration

    Explanation

    When a CloudWatch alarm is added to the deployment group's alarm configuration, CodeDeploy monitors it during the deployment and rolls back if it enters the ALARM state. Deployment configurations control how many instances are updated at a time.

  152. Question 152Deployment

    A security policy requires that artifacts exchanged between pipeline stages be encrypted with a customer managed AWS KMS key. Where is that key specified?

    1. In the pipeline's artifact store definition Correct answer.
    2. In the CodeBuild project's environment
    3. In the pipeline's source action
    4. In each stage transition

    Explanation

    The artifact store on the pipeline defines the S3 bucket and the KMS key used to encrypt artifacts that pass between stages. Individual actions and transitions do not carry their own encryption keys.

  153. Question 153Deployment

    Repeated builds of a CodeBuild project spend several minutes downloading the same dependencies. Which project feature should be enabled to reuse those files between builds?

    1. Reports
    2. Cache Correct answer.
    3. Secondary sources
    4. Artifacts

    Explanation

    The CodeBuild cache stores dependency directories or build outputs in Amazon S3 or locally so later builds restore them instead of downloading again. Artifacts are the build outputs, and reports hold test results.

  154. Question 154Deployment

    A CodeBuild build needs a database password stored in AWS Secrets Manager. Which buildspec configuration retrieves it at build time without storing it in plaintext?

    1. A plain environment variable in the env section
    2. A parameter-store entry in the env section that references the parameter
    3. An export command in the pre_build phase
    4. A secrets entry in the env section that references the secret Correct answer.

    Explanation

    Values from Secrets Manager are declared under secrets in the env section, and CodeBuild resolves them at build time without exposing them in the buildspec. The parameter-store entry is used for SSM Parameter Store values instead.

  155. Question 155Deployment

    One CloudFormation stack creates a VPC subnet and another stack must use that subnet. Which mechanism shares the value between the stacks?

    1. Store the subnet ID in a Mappings section of each template
    2. Add a DependsOn attribute to both templates so the values are shared
    3. Export it as a stack output and import it with Fn::ImportValue Correct answer.
    4. Pass the subnet ID as a parameter with a default value

    Explanation

    A stack can publish a value as an output with an export name, and another stack in the same account and region consumes it with Fn::ImportValue. Parameters and Mappings hold static template values and do not carry runtime values between stacks.

  156. Question 156Deployment

    A stack update fails partway through, after some resources have already been updated. What does CloudFormation do by default?

    1. Leaves the stack in its partially updated state
    2. Rolls the stack back to the last successfully applied state Correct answer.
    3. Deletes the entire stack
    4. Pauses the update and waits for operator input

    Explanation

    By default CloudFormation rolls back a failed update to the last successfully completed state so the stack returns to a known-good configuration. Rollback can be disabled with an option such as --disable-rollback, but it is on by default.

  157. Question 157Deployment

    A developer must install an operating system package on every instance of an Elastic Beanstalk environment when the environment is created. Where should the configuration be placed?

    1. In a .ebextensions directory at the root of the source bundle Correct answer.
    2. In a Procfile at the root of the source bundle
    3. In the .elasticbeanstalk/config.yml file in the workspace
    4. In the environment's saved configuration

    Explanation

    Elastic Beanstalk reads the .ebextensions directory at the root of the source bundle during environment creation and each deployment, and its config files can install packages and run commands. The other files listed hold runtime startup commands or local tooling settings.

  158. Question 158Deployment

    A Lambda function's deployment automation must invoke a specific published version through an ARN that never changes when new versions are published. What should the automation target?

    1. An alias ARN Correct answer.
    2. The numeric version ARN
    3. The $LATEST version ARN
    4. The function name without a qualifier

    Explanation

    An alias is a named pointer to a version, and the alias ARN stays constant while the alias is repointed to new versions. Version ARNs and $LATEST change with each publish, so callers would need updating.

  159. Question 159Deployment

    A REST API in API Gateway has a new deployment, and the team wants a small percentage of stage traffic to go to the new deployment before full rollout. Which feature provides this?

    1. Request throttling
    2. Usage plans
    3. Canary settings on the stage Correct answer.
    4. Stage variables

    Explanation

    Canary settings on a stage route a chosen percentage of stage traffic to the newly deployed version while the remainder stays on the current deployment, after which the team can promote or roll back. The other features affect configuration lookup or access control rather than splitting traffic between deployments.

  160. Question 160Deployment

    A CloudFormation template launches an EC2 instance that must not be marked complete until a bootstrap script finishes successfully. Which combination achieves this?

    1. DependsOn with UserData
    2. DeletionPolicy with a cfn-signal call in UserData
    3. UpdatePolicy with cfn-hup
    4. CreationPolicy with a cfn-signal call in UserData Correct answer.

    Explanation

    A CreationPolicy with a ResourceSignal count makes CloudFormation wait until the instance sends the expected number of cfn-signal success signals, typically from the end of UserData. If the signals do not arrive within the timeout, resource creation fails.

  161. Question 161Deployment

    An on-premises server must be used as a CodeDeploy target. What must be configured on that server?

    1. A VPC endpoint for CodeDeploy, with no AWS credentials on the server
    2. An EC2 instance profile role attached to the server's operating system
    3. The CodeDeploy agent installed without any AWS credentials
    4. An IAM user with CodeDeploy permissions on the server, plus tags that match the deployment group Correct answer.

    Explanation

    On-premises instances are registered with CodeDeploy using an IAM user that has the required CodeDeploy permissions, and they are matched to a deployment group by tags. There is no EC2 instance profile because the server is not an EC2 instance.

  162. Question 162Deployment

    In an AWS SAM template, an AWS::Serverless::Function resource has an Events property containing an Api event. What does the transform create for that event?

    1. Only a Lambda function URL, with no API Gateway resources created
    2. An Application Load Balancer listener and target group that forward to the function
    3. An implicit API Gateway REST API, its methods, and Lambda permissions Correct answer.
    4. An API Gateway usage plan and API key for the function

    Explanation

    During the SAM transform, an Api event expands into an implicit API Gateway REST API with its methods and deployment, plus the Lambda permission that allows API Gateway to invoke the function. The developer does not have to declare those resources separately.

  163. Question 163Deployment

    In a CodeDeploy AppSpec file for an Amazon ECS deployment, which section defines the container name, container port, and target groups used during the traffic shift?

    1. hooks
    2. permissions
    3. files
    4. resources Correct answer.

    Explanation

    The resources section of an ECS AppSpec names the ECS service, the load balancer target groups, and the container name and port used for the traffic shift. Lifecycle hooks such as BeforeAllowTraffic and AfterAllowTraffic are listed separately under hooks.

  164. Question 164Deployment

    An Auto Scaling group's launch template is changed in a CloudFormation template. Which attribute makes CloudFormation replace the instances in batches with a configurable pause between batches?

    1. UpdatePolicy with AutoScalingRollingUpdate Correct answer.
    2. CreationPolicy
    3. DependsOn
    4. DeletionPolicy

    Explanation

    UpdatePolicy with AutoScalingRollingUpdate replaces instances in the Auto Scaling group in batches and honors settings such as MinInstancesInService, MaxBatchSize, and PauseTime. CreationPolicy applies at creation time and DeletionPolicy at deletion time.

  165. Question 165Troubleshooting and Optimization

    An application invoking a Lambda function synchronously receives HTTP 429 responses from Lambda. Which exception name does Lambda return when the function's concurrency limit is exceeded?

    1. LimitExceededException
    2. ProvisionedThroughputExceededException
    3. TooManyRequestsException Correct answer.
    4. ThrottlingException

    Explanation

    Lambda returns TooManyRequestsException (HTTP 429) when an invocation is throttled because the function has reached its concurrency limit. The caller should retry with exponential backoff, and reserved or provisioned concurrency can prevent the condition. The other exception names are associated with different AWS services or account-level limits.

  166. Question 166Troubleshooting and Optimization

    Consumers process an SQS message twice. The consumer function completes in 45 seconds, but the queue's visibility timeout is 30 seconds. What is the most likely cause?

    1. The visibility timeout is shorter than the processing time. Correct answer.
    2. The message retention period is too short.
    3. The queue is a FIFO queue with content-based deduplication.
    4. The consumer is using short polling.

    Explanation

    A message becomes visible to other consumers when its visibility timeout expires, even if the first consumer is still processing it. The visibility timeout should be at least as long as the expected processing time, or the consumer should extend it with ChangeMessageVisibility. Message retention and polling style do not cause duplicate delivery in this scenario.

  167. Question 167Troubleshooting and Optimization

    A developer needs to filter and aggregate application log events by field values across multiple log streams in a CloudWatch log group. Which CloudWatch feature is designed for this?

    1. CloudWatch dashboards
    2. CloudWatch Logs metric filters
    3. CloudWatch Logs Insights Correct answer.
    4. CloudWatch Contributor Insights

    Explanation

    CloudWatch Logs Insights provides a query language that can filter, parse, and aggregate events across the streams in a log group. Metric filters turn log patterns into metrics but do not support ad hoc queries across many streams. Contributor Insights identifies top contributors rather than serving as a general log query tool.

  168. Question 168Troubleshooting and Optimization

    A team wants to filter X-Ray traces by tenantId in the X-Ray console and by using filter expressions. Which should they add to the segment?

    1. Metadata
    2. Subsegments
    3. Sampling rules
    4. Annotations Correct answer.

    Explanation

    Annotations are indexed key-value pairs that can be used in X-Ray filter expressions and console searches. Metadata is stored with the trace but is not indexed for filtering. Subsegments and sampling rules do not create searchable trace fields.

  169. Question 169Troubleshooting and Optimization

    After fixing a consumer bug, a developer must reprocess messages that accumulated in an SQS dead-letter queue. Which action is appropriate?

    1. Increase the source queue's visibility timeout.
    2. Delete the DLQ and recreate it with the same name.
    3. Enable long polling on the DLQ.
    4. Configure a redrive to move messages from the DLQ back to the source queue. Correct answer.

    Explanation

    SQS DLQ redrive moves messages from a dead-letter queue back to the source queue or to a custom target queue for reprocessing. Deleting the DLQ discards the messages instead of reprocessing them. Visibility timeout and long polling affect message handling but do not redrive DLQ messages.

  170. Question 170Troubleshooting and Optimization

    A DynamoDB-backed service intermittently receives ProvisionedThroughputExceededException responses during bursts. Which client-side approach improves resilience?

    1. Disable SDK retries and fail fast.
    2. Use a shorter HTTP keep-alive interval.
    3. Increase the SDK's socket timeout.
    4. Retry with exponential backoff and jitter. Correct answer.

    Explanation

    DynamoDB throttling is often transient, so retries with exponential backoff and jitter let the client recover without overwhelming the table. AWS SDKs implement this behavior by default. Failing fast or changing socket timeouts does not address capacity bursts.

  171. Question 171Troubleshooting and Optimization

    An API Gateway REST API integrates with a Lambda function that sometimes runs for 40 seconds, causing 504 responses. What is the maximum integration timeout for API Gateway REST APIs?

    1. 300 seconds
    2. 15 seconds
    3. 60 seconds
    4. 29 seconds Correct answer.

    Explanation

    API Gateway REST APIs have a maximum integration timeout of 29 seconds. Longer-running work should be moved to an asynchronous pattern, such as an SQS queue or Step Functions workflow. The other values exceed or fall below the documented REST API limit.

  172. Question 172Troubleshooting and Optimization

    A developer needs a custom CloudWatch metric with sub-minute granularity to diagnose a brief spike. What is the finest resolution CloudWatch supports for custom metrics?

    1. 5 seconds
    2. 1 second Correct answer.
    3. 10 seconds
    4. 30 seconds

    Explanation

    CloudWatch supports high-resolution custom metrics with a granularity of one second. Standard-resolution metrics have a one-minute granularity. Alarms on high-resolution metrics can also evaluate at 10-second or 30-second periods.

  173. Question 173Troubleshooting and Optimization

    A latency-sensitive Lambda function experiences cold-start delays after idle periods. Which feature keeps a requested number of execution environments initialized and ready?

    1. Dead-letter queues
    2. Asynchronous invocation
    3. Reserved concurrency
    4. Provisioned concurrency Correct answer.

    Explanation

    Provisioned concurrency pre-initializes execution environments so invocations do not incur cold-start initialization. Reserved concurrency sets a maximum concurrency ceiling but does not keep environments warm. Asynchronous invocation and dead-letter queues address delivery behavior, not startup latency.

  174. Question 174Troubleshooting and Optimization

    A DynamoDB table is throttled even though total consumed capacity is below provisioned capacity, because a few partition keys receive most of the traffic. What is the best remediation?

    1. Enable DynamoDB Streams on the table.
    2. Add a global secondary index on the same key.
    3. Raise the table's provisioned read capacity units.
    4. Use a higher-cardinality partition key. Correct answer.

    Explanation

    Throttling below total table capacity indicates a hot partition, which happens when a low-cardinality partition key concentrates traffic. Redesigning the key or using write sharding spreads requests across more partitions. Adding table capacity or indexes does not remove the per-partition concentration.

  175. Question 175Troubleshooting and Optimization

    A consumer polls an SQS queue and most ReceiveMessage calls return no messages, increasing cost and CPU usage. Which change reduces empty responses?

    1. Increase the message retention period.
    2. Set ReceiveMessage WaitTimeSeconds to 20. Correct answer.
    3. Reduce the visibility timeout.
    4. Enable content-based deduplication.

    Explanation

    Long polling with WaitTimeSeconds up to 20 lets SQS hold the request open until a message arrives or the wait expires. This reduces empty responses compared with short polling. Visibility timeout, deduplication, and retention do not change how long a receive call waits.

  176. Question 176Troubleshooting and Optimization

    A team wants X-Ray to trace a controlled, representative percentage of requests to manage cost. Which X-Ray feature controls the fraction of requests that are traced?

    1. Groups
    2. Annotations
    3. Sampling rules Correct answer.
    4. Service map

    Explanation

    X-Ray sampling rules define a reservoir size and a rate for sampling additional requests, which controls tracing volume and cost. Groups, annotations, and the service map organize or enrich trace data after sampling. They do not decide which requests are traced.

  177. Question 177Troubleshooting and Optimization

    An API Gateway REST API stage has caching enabled with a 300-second TTL. After backend data changes, clients must see fresh data immediately without disabling caching. What should be sent?

    1. A Cache-Control: max-age=0 header Correct answer.
    2. An If-None-Match header
    3. An Authorization header
    4. A larger Content-Length header

    Explanation

    API Gateway invalidates the cached entry for a request when the request includes Cache-Control: max-age=0. This allows a client to force a fresh response without changing the stage cache settings. Conditional, authorization, and content-length headers do not invalidate API Gateway cache entries.

  178. Question 178Troubleshooting and Optimization

    A Lambda function is CPU-bound and times out at 512 MB of memory. Which change most directly increases the available CPU?

    1. Move the function into a VPC.
    2. Increase the timeout to 15 minutes.
    3. Increase the configured memory to 1024 MB. Correct answer.
    4. Enable reserved concurrency.

    Explanation

    Lambda allocates CPU power in proportion to the configured memory, so increasing memory also increases CPU. Raising the timeout only gives the function more time at the same CPU level. Reserved concurrency and VPC placement do not increase CPU allocation.

  179. Question 179Troubleshooting and Optimization

    A developer must identify which SQL statements contribute most to database load on an RDS instance during a slowdown. Which tool is designed for this?

    1. AWS CloudTrail
    2. Performance Insights Correct answer.
    3. CloudWatch Logs Insights
    4. RDS Enhanced Monitoring

    Explanation

    RDS Performance Insights shows database load broken down by SQL statement, wait event, user, and host. Enhanced Monitoring provides operating-system metrics rather than per-SQL database load. CloudWatch Logs Insights and CloudTrail do not provide this database workload analysis.

  180. Question 180Troubleshooting and Optimization

    An Elastic Beanstalk environment's health turns red, but the EC2 instance status checks are passing. Which feature provides detailed application-level health causes?

    1. Enhanced health reporting Correct answer.
    2. CloudWatch dashboards
    3. Basic health reporting
    4. EC2 auto recovery

    Explanation

    Elastic Beanstalk enhanced health reporting evaluates application and environment metrics and reports causes such as high latency, elevated 5xx errors, or failed deployments. Basic health reporting relies primarily on EC2 and ELB health signals and provides less detail. Auto recovery and dashboards do not supply application-level health causes.

  181. Question 181Troubleshooting and Optimization

    A Kinesis Data Streams consumer's IteratorAgeMilliseconds metric keeps increasing. Which action addresses the root cause?

    1. Increase the number of shards in the stream. Correct answer.
    2. Increase the consumer's record processor timeout.
    3. Decrease the stream retention period.
    4. Enable enhanced fan-out for the producer.

    Explanation

    A rising iterator age means the consumer is falling behind the stream's incoming data rate. Adding shards increases the stream's capacity and allows more parallel consumer processing. Increasing a processor timeout, reducing retention, or changing producer fan-out does not provide more read capacity for the lagging consumer.

  182. Question 182Troubleshooting and Optimization

    An Amazon ECS task on Fargate stops with exit code 137. Which cause is most likely?

    1. The task cannot pull the image from Amazon ECR.
    2. The task's IAM role is missing permissions.
    3. The health check grace period is too short.
    4. The container exceeded its memory limit and was killed. Correct answer.

    Explanation

    Exit code 137 corresponds to 128 plus signal 9 (SIGKILL), which commonly indicates the container was killed after exceeding its memory limit. Raising the task memory or fixing the application's memory usage addresses the problem. IAM, health-check, and image-pull failures produce different error symptoms.

  183. Question 183Troubleshooting and Optimization

    A service using the AWS SDK experiences throttling during traffic spikes. The team wants the SDK to adjust retry rates based on the current load. Which retry mode should they use?

    1. Standard
    2. Manual
    3. Adaptive Correct answer.
    4. Legacy

    Explanation

    Adaptive retry mode adds client-side rate limiting that adjusts based on the throttling responses the client receives. Standard mode uses exponential backoff with jitter but does not dynamically limit the request rate. Legacy and manual approaches do not provide this load-aware behavior.

  184. Question 184Troubleshooting and Optimization

    A developer wants Lambda logs to automatically produce CloudWatch custom metrics without making separate PutMetricData calls. Which log format should be used?

    1. CloudWatch Embedded Metric Format Correct answer.
    2. Apache access logs
    3. Common Log Format
    4. JSON structured logs

    Explanation

    CloudWatch Embedded Metric Format embeds metric definitions and values inside log events, and CloudWatch extracts them as custom metrics. This avoids synchronous PutMetricData API calls from the function. Generic JSON, Common Log Format, and Apache logs do not define CloudWatch metrics automatically.

  185. Question 185Troubleshooting and Optimization

    A Lambda function in a private VPC subnet times out when calling DynamoDB, although it can reach resources inside the VPC. What is the most likely cause?

    1. A function timeout set to three seconds
    2. An execution role missing lambda:InvokeFunction
    3. Reserved concurrency configured as zero
    4. No NAT gateway or DynamoDB VPC endpoint route Correct answer.

    Explanation

    DynamoDB is reached through a public endpoint unless a gateway VPC endpoint is configured. A private subnet without a NAT gateway or DynamoDB VPC endpoint has no route to the service, so calls time out. IAM, concurrency, and timeout settings would produce different failure modes.

  186. Question 186Troubleshooting and Optimization

    A team runs millions of short workflows per day, each lasting under five minutes, and wants the lowest cost and highest throughput from Step Functions. Which workflow type fits?

    1. Callback
    2. Standard
    3. Express Correct answer.
    4. Activity

    Explanation

    Step Functions Express workflows are designed for high-volume, short-duration executions and are priced by requests, execution time, and memory rather than per state transition. Standard workflows provide exactly-once execution history and are better suited to long-running or audit-heavy processes. Activity and callback are integration patterns, not workflow types.

  187. Question 187Troubleshooting and Optimization

    An application uploading many small objects to a single S3 prefix receives 503 SlowDown errors. Which approach improves upload throughput?

    1. Enable S3 Transfer Acceleration.
    2. Distribute objects across multiple key prefixes and retry with backoff. Correct answer.
    3. Use a single sequential upload thread.
    4. Reduce the size of each object.

    Explanation

    S3 scales request rates by key prefix, so spreading objects across multiple prefixes lets S3 use more partitions. Retries with exponential backoff handle transient 503 SlowDown responses. Transfer Acceleration helps with distance-related latency, and sequential uploads or smaller objects do not resolve prefix request-rate pressure.

  188. Question 188Troubleshooting and Optimization

    Hundreds of Lambda invocations open new database connections to RDS, causing connection exhaustion. Which service should be placed between Lambda and RDS?

    1. AWS Global Accelerator
    2. RDS Proxy Correct answer.
    3. ElastiCache
    4. Route 53

    Explanation

    RDS Proxy pools and shares database connections so that many Lambda invocations do not each hold a separate database connection. This reduces connection churn and exhaustion. ElastiCache caches data, Route 53 provides DNS, and Global Accelerator improves network routing, but none pool database connections.

  189. Question 189Troubleshooting and Optimization

    A Lambda function decrypts a configuration secret with KMS on every invocation and begins receiving ThrottlingException from KMS. Which approach reduces KMS calls?

    1. Cache the secret or a data key Correct answer.
    2. Use a larger KMS key size
    3. Increase the function's memory size
    4. Enable automatic KMS key rotation

    Explanation

    KMS has request quotas, so repeatedly calling Decrypt for the same secret can exhaust them. Caching the plaintext secret or a data key in the execution environment reduces KMS requests. Memory size, key size, and automatic rotation do not lower the number of decryption calls.

  190. Question 190Troubleshooting and Optimization

    A developer needs to find which error messages occur most often in a Lambda function's CloudWatch log group over the past 24 hours. Which approach returns the result with the least effort?

    1. Enable X-Ray active tracing on the function and sort the resulting traces by duration.
    2. Create a CloudWatch dashboard showing the Invocations and Errors metrics for the function.
    3. Download every log stream with aws logs get-log-events and count messages locally with a script.
    4. Run a CloudWatch Logs Insights query using stats count(*) by @message over the log group for the last 24 hours. Correct answer.

    Explanation

    CloudWatch Logs Insights runs aggregation queries such as stats count(*) by @message directly against one or more log groups over a chosen time range. It is purpose-built for this kind of ad hoc log analysis and requires no export or custom tooling.

  191. Question 191Troubleshooting and Optimization

    A Lambda function is invoked asynchronously by S3 event notifications. Occasionally the function fails after all retries, and the team must preserve the failed event payload for later investigation. Which configuration meets this requirement with minimal custom code?

    1. Configure an on-failure destination or a dead-letter queue for the function. Correct answer.
    2. Attach an SQS queue to the function as an event source mapping.
    3. Enable X-Ray active tracing on the function to record failed invocations.
    4. Increase the function's timeout and memory so that retries are more likely to succeed.

    Explanation

    Asynchronous invocations are retried twice, and if they still fail the event is discarded unless a failure destination or dead-letter queue is configured. AWS writes the original event payload to that destination, which is exactly what the team needs for later investigation.

  192. Question 192Troubleshooting and Optimization

    Application logs written to CloudWatch Logs must be kept for one year, but they are rarely queried after the first 30 days. Which configuration reduces storage cost while preserving the logs?

    1. Set log group retention to 30 days and export the logs to Amazon S3 for long-term storage. Correct answer.
    2. Request an increase to the CloudWatch Logs stored-bytes quota so that the logs can be kept indefinitely.
    3. Set the log group retention period to one year and leave all logs in CloudWatch Logs for the full period.
    4. Delete the log group every 30 days and rely on the Lambda service logs for historical records.

    Explanation

    CloudWatch Logs storage is priced higher than S3 storage, so the standard pattern is a short retention window in CloudWatch plus export to S3 for archival. Retention automatically expires old events, and the exported objects remain queryable at lower cost.

  193. Question 193Troubleshooting and Optimization

    An SQS consumer occasionally processes the same message twice. Processing takes up to 2 minutes, the queue's visibility timeout is 30 seconds, and the consumer never extends it. What is the most likely cause and fix?

    1. The visibility timeout expires during processing, so the message is redelivered; set it above 2 minutes. Correct answer.
    2. The queue's message retention period is too short; raise it to the 14-day maximum.
    3. The consumer calls DeleteMessage before processing; move the delete to the end of processing.
    4. The queue is a FIFO queue, where duplicate delivery is expected; switch to a standard queue.

    Explanation

    While a message is being processed it is hidden only for the duration of the visibility timeout. If processing can take 2 minutes but the timeout is 30 seconds, the message becomes visible again and another consumer can pick it up, producing duplicates.

  194. Question 194Troubleshooting and Optimization

    Clients calling an API Gateway REST API receive 429 Too Many Requests responses even though the Lambda integration is healthy and fast. The API uses usage plans with throttling limits. Which action addresses the issue?

    1. Increase the Lambda function's memory size so that each invocation completes faster.
    2. Change the integration's timeout setting so that requests are allowed to run longer.
    3. Enable API Gateway stage caching so repeated requests are served from the cache instead of the backend.
    4. Raise the usage plan's throttle and burst limits, or move the clients to an API key with higher limits. Correct answer.

    Explanation

    When API Gateway itself returns 429, the caller has exceeded the throttle or burst limit configured on the usage plan or API key. Raising those limits, or using a key that has higher limits, restores throughput without any backend change.

  195. Question 195Troubleshooting and Optimization

    A team sets reserved concurrency of 100 on a low-priority Lambda function. Other functions in the same account start receiving ThrottleException errors even when the low-priority function is idle. Why?

    1. Reserved concurrency is a per-function quota that is shared with all other functions and must be set to zero.
    2. Reserved concurrency caps the function's memory allocation, which indirectly causes throttling.
    3. Reserved concurrency is carved out of the account's unreserved pool, leaving less capacity for other functions. Correct answer.
    4. Reserved concurrency disables the polling event source mappings configured on the other functions.

    Explanation

    Each account and Region has a total concurrency limit, and any reserved concurrency is subtracted from the unreserved pool that all other functions share. The reserved amount limits the low-priority function but also reduces the capacity available to every other function in the account.

  196. Question 196Troubleshooting and Optimization

    A DynamoDB table stores session records that are useful for only 24 hours, but the table keeps growing and queries increasingly read expired items. Which change removes expired items with the least operational overhead?

    1. Enable Time to Live on an expiration timestamp attribute in each item. Correct answer.
    2. Lower the table's provisioned write capacity so that storage growth slows down.
    3. Run a nightly Scan and delete old items with BatchWriteItem from a scheduled script.
    4. Enable DynamoDB Streams and unpublish expired items from a Lambda consumer on a schedule.

    Explanation

    Time to Live deletes items whose expiration attribute is in the past, in the background and without consuming write capacity. It requires only an attribute and a setting, with no scanning or scheduled compute.

  197. Question 197Troubleshooting and Optimization

    A developer wants every ERROR line written to a CloudWatch log group to be sent to a Lambda function for near-real-time alerting, without polling. Which feature should be used?

    1. A CloudWatch Logs subscription filter on the log group with the Lambda function as the destination. Correct answer.
    2. An EventBridge scheduled rule that invokes the function every minute to read new log events.
    3. A CloudWatch Logs metric filter combined with a CloudWatch alarm.
    4. A CloudWatch Logs agent installed inside the Lambda function's execution environment.

    Explanation

    Subscription filters stream matching log events in near real time to destinations such as Lambda, Kinesis Data Streams, or Firehose. A filter pattern can restrict delivery to lines containing ERROR, so polling is unnecessary.

  198. Question 198Troubleshooting and Optimization

    An RDS for MySQL instance shows high CPU in CloudWatch, but the team needs per-second OS-level metrics broken down by process on the DB instance host to identify the cause. Which feature provides this?

    1. CloudWatch basic monitoring at its 1-minute granularity.
    2. The RDS Performance Insights database load chart.
    3. CloudTrail data events recorded for the RDS instance.
    4. RDS Enhanced Monitoring configured with a granularity of 1 second. Correct answer.

    Explanation

    Enhanced Monitoring runs an agent on the DB instance and publishes OS metrics such as CPU, memory, and disk activity per process, at granularities down to 1 second. Standard CloudWatch metrics for RDS are host-level and much less granular.

  199. Question 199Troubleshooting and Optimization

    A containerized service on Amazon ECS with the Fargate launch type uses the X-Ray SDK, but traces never appear in the X-Ray console and the SDK logs a send failure. The task definition contains only the application container. What is the most likely cause?

    1. The X-Ray daemon must be reachable by the SDK, typically by running it as a sidecar container in the same task. Correct answer.
    2. The task IAM role is missing the AWSXRayDaemonWriteAccess policy, which is the only requirement.
    3. The SDK must open a TCP connection on port 443 to push segments directly to the X-Ray API.
    4. X-Ray tracing is not supported for tasks launched with the Fargate launch type.

    Explanation

    The X-Ray SDK does not call the X-Ray API itself; it sends segment data to a local daemon over UDP port 2000. On Fargate there is no host agent, so the standard design runs the daemon as a sidecar container in the same task definition.

  200. Question 200Troubleshooting and Optimization

    A Lambda-backed API Gateway REST API using Lambda proxy integration intermittently returns 502 Bad Gateway. The function's logs show successful execution and the handler returns a Python dictionary. What is the most likely cause?

    1. The returned payload does not match the proxy response format, for example a non-string body. Correct answer.
    2. Usage plan throttling on the API stage is rejecting the requests.
    3. The Lambda function's timeout is shorter than the API Gateway integration timeout.
    4. The function runs in a private subnet without a NAT gateway for outbound traffic.

    Explanation

    With Lambda proxy integration, the function must return a JSON object containing statusCode and a body that is a string, with optional headers. A response that deviates from that contract, such as a body holding a Python object, cannot be mapped and API Gateway returns 502.

AWS Developer flashcards

32 cards. Read the term and the definition here. The deck at the top of this page is optional.

Lambda async retry count
Asynchronous Lambda invocations are retried twice by default when the function errors, and the event is discarded after those retries or once the maximum event age is exceeded.
DynamoDB item size limit
A single DynamoDB item, including all attribute names and values, cannot exceed 400 KB, which caps how much data one partition-key record can hold.
SQS visibility timeout
After a consumer receives a message, SQS hides it for the visibility timeout; if the message is not deleted within that window it becomes visible again and can be delivered to another consumer.
SQS FIFO throughput limits
A FIFO queue processes up to 300 messages per second per message group without batching, rising to 3,000 per second when batches are used, while preserving strict ordering.
Step Functions Standard versus Express
Standard workflows can run up to one year and keep exactly-once execution history, while Express workflows run at most five minutes with at-least-once execution at much higher event rates.
API Gateway Lambda proxy integration
With AWS_PROXY integration the entire HTTP request, including headers, path, query string and body, is passed to Lambda as one event, and the Lambda response defines status code and headers.
Lambda memory and timeout
Lambda functions can be configured with 128 MB to 10,240 MB of memory and a maximum timeout of 15 minutes; CPU allocation scales proportionally with the chosen memory setting.
DynamoDB Streams retention
DynamoDB Streams records item-level changes for 24 hours, and consumers such as Lambda read them using a stream view type of keys only, new image, old image, or both.
IAM policy evaluation logic
AWS evaluates all applicable policies together: an explicit deny always wins, an allow in any policy grants access, and the absence of any allow results in an implicit deny.
IAM role temporary credentials
Assuming a role calls AWS STS, which returns short-lived credentials with an expiration; the caller never stores long-term access keys, and permissions come from the role's policies.
KMS envelope encryption
KMS encrypts data with a data key, and the plaintext data key encrypts the payload; the encrypted data key is stored with the ciphertext and decrypted only through KMS.
Cognito user pool versus identity pool
User pools handle sign-up, sign-in and issuing JSON web tokens, while identity pools exchange those tokens for temporary AWS credentials through STS so users can call AWS services directly.
Secrets Manager rotation
Secrets Manager can automatically rotate database and other credentials on a schedule by invoking a Lambda rotation function, without requiring application redeployment or hard-coded credential changes.
SSE-KMS S3 permission requirement
When uploading or downloading objects encrypted with SSE-KMS, the caller needs kms:GenerateDataKey and kms:Decrypt permissions on the key in addition to the relevant S3 object permissions.
Gateway versus interface endpoint
Gateway VPC endpoints route traffic to S3 and DynamoDB through route table entries, while interface endpoints use elastic network interfaces with security groups and support most other AWS services through PrivateLink.
Lambda resource-based policy
A Lambda resource-based policy grants other accounts or AWS services permission to invoke the function, and it is separate from the execution role, which controls what the function can access.
SAM template transform
Serverless Application Model templates declare resources such as AWS::Serverless::Function and include the AWS::Serverless-2016-10-31 transform, which CloudFormation expands into standard Lambda, IAM and API Gateway resources.
Lambda alias weighted routing
An alias points to one or two numbered versions and can send a percentage of traffic to a second version, enabling canary releases before shifting all traffic to the new version.
Elastic Beanstalk immutable deployment
Immutable deployments launch a fresh set of instances in a new auto scaling group, deploy and health-check the new version there, then swap the instances in, allowing fast rollback.
CodeDeploy AppSpec hooks
For EC2 and on-premises deployments, the AppSpec file defines lifecycle event hooks such as BeforeInstall, AfterInstall, ApplicationStart and ValidateService, each mapped to scripts in the revision bundle.
CodeBuild buildspec phases
A buildspec.yml file defines phases including install, pre_build, build and post_build, plus artifacts and cache sections that tell CodeBuild what to run and what output to publish.
CloudFormation change sets
A change set previews how a stack update will modify existing resources, letting you review replacements and deletions before executing the change so unintended data loss is avoided.
CodePipeline artifact store
CodePipeline stages pass output artifacts, stored in an S3 artifact bucket, to later stage actions; each action declares input and output artifacts that must match across the pipeline definition.
CDK synthesis output
The AWS CDK app is synthesized into a CloudFormation template during cdk synth or cdk deploy; constructs are reusable components, and L2 constructs provide sensible secure defaults.
Lambda throttle error code
When concurrency limits are exceeded, Lambda rejects invocations with a 429 TooManyRequestsException; asynchronous invocations are retried, while synchronous callers receive the error directly.
Provisioned concurrency purpose
Provisioned concurrency keeps a specified number of execution environments initialized and ready, eliminating cold starts for that capacity while it remains allocated and billed continuously.
Lambda destinations for async
For asynchronous invocations, Lambda can send success and failure records to destinations such as SQS, SNS, EventBridge or another Lambda, replacing the older dead-letter queue pattern.
API Gateway 502 response cause
A 502 from API Gateway with a Lambda proxy integration usually means the function returned a malformed response, such as a missing statusCode field or a non-serializable body.
X-Ray sampling rule
X-Ray sampling rules control what percentage of requests are traced and can match on request path, method, host or service name, keeping tracing volume and cost predictable.
CloudWatch Logs metric filter
A metric filter scans log events for a pattern, such as the word ERROR, and increments a custom CloudWatch metric each time the pattern matches, enabling alarms on log content.
DynamoDB exponential backoff
When DynamoDB returns ProvisionedThroughputExceededException, the SDK retries with exponential backoff and jitter, spreading requests so a throttled partition can recover instead of staying saturated.
SQS long polling benefit
Setting WaitTimeSeconds up to 20 on ReceiveMessage makes SQS hold the request open until a message arrives, reducing empty responses, request count and overall cost compared with short polling.

AWS Developer study guide

Development with AWS Services

What you must know

Lambda sits at the center of most developer questions: know the three invocation models. Synchronous (API Gateway, ALB) surfaces errors to the caller and never retries. Asynchronous (S3, SNS, EventBridge) retries twice and then routes to a dead-letter queue or destination. Poll-based (SQS, Kinesis, DynamoDB Streams) batches records, and partial batch failures need ReportBatchItemFailures. Remember the hard limits: 15-minute timeout, 10 GB memory, 512 MB to 10 GB of /tmp, and a 6 MB synchronous request payload ceiling.

For data, know DynamoDB key design, that Query needs a partition key while Scan reads everything, and that reads are eventually consistent unless you request otherwise (which doubles read capacity cost). Know SQS standard versus FIFO, visibility timeout, long polling, and DLQs; SNS fan-out; Step Functions for orchestration with built-in retries; and EventBridge rules for event routing.

Traps

Assuming Lambda retries a synchronous call; forgetting that async retries are automatic; treating SQS visibility timeout as message retention; using Scan for a lookup pattern; and ignoring idempotency when any retry path exists.

Rule of thumb

Set the queue visibility timeout to at least six times the consumer Lambda timeout so a message is not redelivered while it is still being processed. Then make the consumer idempotent: write to DynamoDB with a conditional put using attribute_not_exists(pk) so a duplicate delivery becomes a no-op instead of a double charge.

Security

What you must know

IAM evaluation logic is the backbone: an explicit Deny always wins, then an Allow must exist from an identity-based policy, a resource-based policy, a permissions boundary, a session policy, or an SCP. SCPs and permission boundaries only filter; they never grant. Roles are assumed through STS, and a role has two policies that are easy to confuse: the trust policy (who may assume it) and the permissions policy (what the role can do).

For encryption, know KMS customer managed keys versus AWS managed keys, that a key policy must allow a principal before an IAM policy can help, and the S3 encryption options (SSE-S3, SSE-KMS, SSE-C, client side). Know Secrets Manager (native rotation, RDS integration) versus SSM Parameter Store (cheaper, SecureString, no built-in rotation). Know Cognito user pools for authentication versus identity pools for issuing temporary AWS credentials, and security groups (stateful, allow-only) versus network ACLs (stateless, allow and deny).

Traps

Believing an SCP grants access; assuming an IAM policy in the caller account is enough for cross-account access; forgetting the KMS key policy; mixing up user pools and identity pools; and granting s3:* on * instead of scoping to a bucket ARN and prefix.

Rule of thumb

Cross-account access to an encrypted resource needs three independent grants: the caller identity policy, the trust or resource policy in the owning account, and the KMS key policy. If any one is missing you get AccessDenied, so check all three before changing anything else.

Deployment

What you must know

Know the CI/CD stack: CodePipeline stages and actions with artifacts passed through S3, CodeBuild buildspec phases (install, pre_build, build, post_build) and environment variables, and CodeDeploy applications, deployment groups, and the appsec file. For EC2, CodeDeploy supports in-place and blue/green and requires the CodeDeploy agent plus a service role. For Lambda, it offers canary, linear, and all-at-once traffic shifting. For ECS, blue/green targets two task sets behind a load balancer.

Know Elastic Beanstalk deployment policies (all at once, rolling, rolling with additional batch, immutable, and blue/green via URL swap) and CloudFormation fundamentals: templates, parameters, change sets, DeletionPolicy, stack policies, rollback on failure, and drift detection. Know SAM for serverless packaging and the CDK for programmatic infrastructure. For serverless releases, Lambda versions and aliases with weighted routing, plus API Gateway stages and canary settings, are the traffic-shifting tools.

Traps

Thinking $LATEST can receive weighted traffic (only published versions can); forgetting the CodeDeploy agent on EC2; assuming an in-place deployment gives zero downtime; and treating CloudFormation drift as an error rather than a detected difference.

Rule of thumb

Release in small, reversible steps: publish a Lambda version, point an alias at it with 10 percent weight, attach a CloudWatch alarm, and let CodeDeploy roll back automatically if the alarm fires. The same pattern applies to API Gateway canary stages and ECS blue/green.

Troubleshooting and Optimization

What you must know

Separate the observability tools clearly. CloudWatch holds metrics, logs, alarms, dashboards, Logs Insights queries, and metric filters. CloudTrail records API activity for auditing. X-Ray traces request paths with segments and subsegments and answers where latency lives. VPC Flow Logs capture network-level accepts and rejects. AWS Health reports service events.

Performance tuning starts with the right lever. Lambda memory also sets CPU share, so a slower function is often fixed by raising memory; cold starts improve with provisioned concurrency or SnapStart. Initialize SDK clients and database connections outside the handler so they are reused across invocations. DynamoDB throttling usually means a hot partition or insufficient capacity, not just low provisioned RCUs, and adaptive capacity helps but does not fix bad key design. S3 scales request rates per prefix, so spread keys and use multipart upload for large objects. API Gateway caches responses and has a 29-second integration timeout for REST APIs, which shows up as a 504 when a Lambda runs too long.

Traps

Confusing CloudWatch with CloudTrail; assuming X-Ray stores logs; retrying immediately on throttling; blaming capacity when the real cause is a hot partition; and misreading a 504 as a code error.

Rule of thumb

On any throttling error (HTTP 429, ProvisionedThroughputExceededException, SlowDown), retry with exponential backoff and jitter, cap the attempts, and send poison messages to a DLQ. Confirm with an X-Ray subsegment before optimizing anything else.

AWS Developer cheat sheet

Quick reference

Development with AWS Services

  • Lambda invocation model drives retries: synchronous callers (API Gateway, ALB) receive the error directly; asynchronous sources (S3, SNS, EventBridge) are retried twice by default.

  • DynamoDB Query requires the full partition-key value plus an optional sort-key condition; Scan reads every item, so model access patterns with GSIs and use Query where possible.

  • DynamoDB caps a single item at 400 KB including attribute names, and returns at most 1 MB per Query/Scan page, so paginate using LastEvaluatedKey.

  • SQS standard queues give at-least-once delivery and best-effort ordering; FIFO queues give exactly-once processing and ordering per message group at 300 msg/s without batching (3,000 with batching).

  • A received SQS message stays hidden for the visibility timeout (maximum 12 hours); if it is not deleted before the timeout it is redelivered. Retention defaults to 4 days, maximum 14.

  • SNS fan-out sends one published message to many SQS subscriptions, each receiving its own copy; FIFO topics can only target SQS FIFO queues.

  • Step Functions: Standard workflows run up to one year with exactly-once execution; Express workflows run at most five minutes with at-least-once execution at high event rates.

  • API Gateway integration types: AWS_PROXY (Lambda proxy), AWS (service integration with mapping templates), HTTP/HTTP_PROXY, and MOCK.

  • Lambda limits: 15-minute maximum timeout, 128 MB to 10,240 MB memory, 512 MB to 10,240 MB /tmp storage, and 4 KB total environment variables.

Quick reference

Security

  • IAM evaluation order is explicit Deny, then Allow, then implicit Deny: a matching deny in any identity or resource policy overrides every allow.

  • IAM roles are assumed via STS and return temporary credentials with an expiry; use roles for EC2, Lambda, ECS tasks and cross-account access instead of long-term access keys.

  • KMS envelope encryption uses a data key for the payload and the CMK to encrypt that data key; callers need kms:GenerateDataKey to encrypt and kms:Decrypt to decrypt.

  • Secrets Manager rotates credentials automatically through a scheduled Lambda rotation function; SSM Parameter Store SecureString encrypts values with KMS but has no native rotation.

  • Cognito user pools authenticate users and issue JWT tokens; identity pools exchange those tokens for temporary AWS credentials from STS.

  • S3 default encryption is SSE-S3; SSE-KMS adds CloudTrail key-usage auditing and per-key permissions; SSE-C requires the client to supply and manage the key.

  • Gateway VPC endpoints exist only for S3 and DynamoDB and work through route-table entries; interface endpoints (PrivateLink) use ENIs and security groups for other services.

  • Lambda has two permission surfaces: the execution role defines what the function may call, and the resource-based policy defines who may invoke it.

  • Enforce TLS on an S3 bucket with a bucket policy that denies requests where aws:SecureTransport is false.

Quick reference

Deployment

  • SAM templates use the AWS::Serverless-2016-10-31 transform; sam build, sam package and sam deploy generate and upload a CloudFormation template plus a code artifact in S3.

  • Lambda versions are immutable snapshots of code and configuration; aliases are mutable pointers to versions and support weighted routing for canary releases.

  • CodeDeploy traffic shifting for Lambda aliases uses Canary, Linear or All-at-once configurations that set the percentage shifted and the interval between steps.

  • Elastic Beanstalk deployment policies: All at once (downtime), Rolling, Rolling with additional batch, Immutable (launches a new group, safest) and Traffic splitting.

  • CodePipeline stages run in order; actions within a stage run sequentially or in parallel, and output artifacts pass between stages through an S3 artifact bucket.

  • CodeBuild buildspec.yml sections are version, env, phases (install, pre_build, build, post_build), artifacts and cache.

  • CloudFormation DeletionPolicy Retain keeps a resource after stack deletion; Snapshot backs up supported resources; UpdateReplacePolicy governs the same behaviour during replacement.

  • CloudFormation StackSets deploy one template across many accounts and regions from a stack set administrator account using target accounts and OUs.

  • AWS CDK apps synthesize to CloudFormation: cdk synth emits the template, cdk diff shows pending changes, and cdk deploy applies the stack.

Quick reference

Troubleshooting and Optimization

  • CloudWatch Lambda metrics include Invocations, Errors, Duration, Throttles, ConcurrentExecutions, IteratorAge (stream sources) and DeadLetterErrors.

  • Lambda throttling surfaces as 429 TooManyRequestsException; async invocations are retried, sync callers see the error, and reserved concurrency both caps and guarantees capacity for one function.

  • Provisioned concurrency pre-initializes execution environments and removes cold starts for that capacity, which is billed for as long as it is configured.

  • API Gateway default account throttling is 10,000 requests per second with a 5,000 burst per region, and the integration timeout is 29 seconds, so long work must move to an asynchronous pattern.

  • A 502 from API Gateway with a Lambda proxy integration almost always means a malformed response (missing statusCode or a non-serializable body); 504 means the integration timed out.

  • X-Ray needs xray:PutTraceSegments and xray:PutTelemetryRecords permissions and is enabled on Lambda through TracingConfig set to Active; the X-Ray daemon is required on EC2 and ECS.

  • DynamoDB ProvisionedThroughputExceededException means a table or partition limit was exceeded; SDK retries use exponential backoff with jitter, and DAX or on-demand capacity removes the ceiling.

  • CloudWatch Logs metric filters convert log patterns into metrics, and CloudWatch alarms on those metrics can trigger Auto Scaling policies or SNS notifications.

  • SQS long polling with WaitTimeSeconds up to 20 reduces empty receives; a Lambda event source mapping polls in batches (up to 10 messages) and scales pollers with backlog growth.

AWS Developer key terms

AWS Lambda

A managed compute service that runs your code in response to events or HTTP requests without you provisioning servers. You pay per invocation and duration, and the service scales capacity automatically.

Related: Lambda layer, Lambda reserved concurrency, Cold start
Lambda layer

A ZIP archive that holds libraries, custom runtimes, or shared code that multiple Lambda functions can reference. Layers keep deployment packages small and let you update shared dependencies in one place.

Related: AWS Lambda
Lambda reserved concurrency

A setting that caps how many concurrent invocations a single function can use and guarantees that capacity is not taken by other functions. It also shelters the rest of the account from that function's spikes.

Related: AWS Lambda, Cold start
Amazon DynamoDB

A fully managed NoSQL database that stores items by primary key and returns results in single-digit milliseconds. Capacity is either provisioned or on-demand, and tables replicate across Availability Zones automatically.

Related: DynamoDB Streams, ProvisionedThroughputExceededException
DynamoDB Streams

A time-ordered log of item-level changes in a DynamoDB table, retained for 24 hours. Lambda can consume the stream so your application reacts to inserts, updates, and deletes.

Related: Amazon DynamoDB, AWS Lambda
Amazon SQS

A managed message queue that decouples producers from consumers. Standard queues offer at-least-once delivery and high throughput; FIFO queues preserve order with exactly-once processing.

Related: Dead-letter queue, Visibility timeout
Dead-letter queue

A separate queue where SQS or SNS moves messages that failed repeated processing, so you can inspect or replay them without blocking the main flow. A redrive policy defines the maximum receive count.

Related: Amazon SQS, Visibility timeout
Visibility timeout

The period after a consumer receives an SQS message during which other consumers cannot see it. If the message is not deleted before it expires, it becomes visible again and may be delivered twice.

Related: Amazon SQS, Dead-letter queue
Amazon API Gateway

A managed service for publishing REST, HTTP, and WebSocket APIs. It handles routing, authorization, throttling, usage plans, and stages, and commonly integrates with Lambda or HTTP backends.

Related: AWS Lambda, Amazon Cognito user pool
AWS Step Functions

A workflow service that coordinates Lambda functions and other AWS calls as a state machine written in JSON (Amazon States Language). It tracks each step, retries failures, and supports long-running processes.

Related: AWS Lambda
Amazon S3 presigned URL

A URL signed with the credentials of the person who generated it, granting temporary permission to perform one specific S3 action, such as a GET or PUT on one object.

Related: S3 bucket policy
AWS SDK credential provider chain

The ordered search the AWS SDKs use to find credentials: environment variables, shared config and credentials files, container or EC2 instance roles, and other providers. Knowing the order explains many access-denied and missing-credentials errors.

Related: IAM role, AWS STS AssumeRole
IAM role

An identity with permission policies that trusted principals can assume to obtain temporary credentials. Roles are the standard way for EC2, Lambda, and cross-account access to reach AWS services without stored keys.

Related: AWS STS AssumeRole, IAM policy
IAM policy

A JSON document listing statements of Effect, Action, Resource, and optional Condition. Identity-based policies attach to users, groups, or roles; resource-based policies attach to resources such as buckets or queues.

Related: IAM role, S3 bucket policy
AWS STS AssumeRole

An AWS Security Token Service call that returns a temporary access key, secret key, and session token for an IAM role. It supports cross-account access, MFA requirements, and session tagging.

Related: IAM role, AWS SDK credential provider chain
Amazon Cognito user pool

A managed directory of user accounts that handles sign-up, sign-in, password policies, MFA, and token issuance (ID, access, and refresh tokens). API Gateway and load balancers can validate these tokens directly.

Related: Amazon Cognito identity pool, Amazon API Gateway
Amazon Cognito identity pool

A service that exchanges a login token from a user pool or external provider for temporary AWS credentials tied to an IAM role, giving app users scoped access to services like S3 or DynamoDB.

Related: Amazon Cognito user pool, IAM role
AWS KMS

A managed service for creating and controlling encryption keys. Keys never leave the service; you call KMS to encrypt and decrypt data keys, which is the basis of envelope encryption for S3, EBS, and DynamoDB.

Related: AWS Secrets Manager, Systems Manager Parameter Store
AWS Secrets Manager

A store for secrets such as database credentials and API keys. It supports automatic rotation via Lambda, fine-grained IAM access, and retrieval through SDK calls at application runtime.

Related: AWS KMS, Systems Manager Parameter Store
Systems Manager Parameter Store

A hierarchical store for configuration data and secrets. Parameters can be plaintext or SecureString, which is encrypted with KMS; it is cheaper than Secrets Manager but has no built-in rotation.

Related: AWS Secrets Manager, AWS KMS
S3 bucket policy

A resource-based JSON policy attached to a bucket that grants or denies access to the bucket and its objects for specified principals, including anonymous users. It is evaluated alongside IAM policies.

Related: IAM policy, Amazon S3 presigned URL
AWS CloudFormation

An infrastructure-as-code service that creates and updates AWS resources from JSON or YAML templates organized into stacks. It tracks resource state and can roll back a stack when an update fails.

Related: CloudFormation change set, AWS SAM
CloudFormation change set

A preview of what a stack update will add, modify, or delete before you execute it. Change sets help catch destructive replacements, such as a resource being recreated after an immutable property change.

Related: AWS CloudFormation
AWS SAM

The AWS Serverless Application Model: a CloudFormation transform with shorthand resource types for Lambda, API Gateway, and DynamoDB, plus a CLI for building, local testing, and deploying serverless applications.

Related: AWS CloudFormation, AWS Lambda
AWS Elastic Beanstalk

A platform-as-a-service that deploys and runs applications on EC2 or containers. You upload an application version and pick an environment tier and platform; Beanstalk handles provisioning, scaling, and health checks.

Related: AWS CodePipeline
AWS CodePipeline

A CI/CD orchestrator that runs stages such as source, build, test, and deploy in a defined order. Each stage contains actions performed by services like CodeCommit, CodeBuild, or CodeDeploy.

Related: AWS CodeBuild, AWS CodeDeploy
AWS CodeBuild

A managed build service that runs commands from a buildspec file in a fresh container image and reports artifacts, logs, and test results. Build projects define the environment, compute size, and source.

Related: AWS CodePipeline, AWS CodeDeploy
AWS CodeDeploy

A deployment service that installs application revisions on EC2 instances, Lambda functions, or ECS services using an AppSpec file and a deployment configuration that controls how traffic shifts.

Related: CodeDeploy deployment configuration, Blue/green deployment
CodeDeploy deployment configuration

A rule set describing how a deployment progresses, such as all-at-once, half-at-a-time, canary (for example 10 percent then the rest), or linear (for example 10 percent each minute), plus alarms that can trigger rollback.

Related: AWS CodeDeploy, Blue/green deployment
Blue/green deployment

A release technique that runs the new version in a separate environment or replacement fleet, shifts traffic to it once healthy, and keeps the old version available for fast rollback.

Related: AWS CodeDeploy, CodeDeploy deployment configuration
Amazon CloudWatch

The monitoring service for metrics, logs, and alarms. AWS services publish metrics automatically, your code can publish custom metrics, and alarms can trigger scaling, notifications, or other automated actions.

Related: CloudWatch alarm, CloudWatch Logs Insights
CloudWatch alarm

A rule that watches one metric against a threshold over a number of periods and changes state between OK, ALARM, and INSUFFICIENT_DATA, optionally invoking actions such as SNS notifications or scaling policies.

Related: Amazon CloudWatch
CloudWatch Logs Insights

A query language and console for searching and aggregating CloudWatch log groups. It supports filters, stats, and parsing commands to find errors and compute latency patterns across large log volumes.

Related: Amazon CloudWatch, AWS X-Ray
AWS X-Ray

A tracing service that records requests through distributed applications as segments and subsegments. It shows where latency and errors originate across API Gateway, Lambda, and downstream services.

Related: Amazon CloudWatch, AWS Lambda
AWS CloudTrail

A service that records AWS API activity as events, showing who called which action, from where, and when. Event history covers management events; trails deliver logs to S3 for long-term retention and analysis.

Related: Amazon CloudWatch, IAM role
Exponential backoff and jitter

A retry strategy where the wait between attempts grows exponentially and is randomized, so many clients do not retry at the same instant. AWS SDKs apply it automatically for throttling and transient errors.

Related: ProvisionedThroughputExceededException, Amazon SQS
ProvisionedThroughputExceededException

The DynamoDB error returned when a request exceeds the read or write capacity of a table or index. Clients should retry with backoff; persistent cases call for more capacity, caching, or better key distribution.

Related: Amazon DynamoDB, Exponential backoff and jitter
Cold start

The extra latency a Lambda function incurs when a new execution environment is created before your handler runs, including code download and initialization. Provisioned concurrency or smaller packages reduce it.

Related: AWS Lambda, Lambda layer

AWS Developer study plan

8 weeks · About 6 hours per week

Week 1

Development with AWS Services

  • Write least-privilege IAM policies for a Lambda execution role and verify each action against the CloudTrail-style access needs of the function

  • Deploy a Lambda function triggered by S3 object-created events and confirm invocation with test objects

  • Create a DynamoDB table with a partition key, sort key, and one global secondary index, then query it by both access patterns

  • Perform create, read, update, and delete operations on that table from application code using an AWS SDK

Your checkpoint

A deployed serverless project (function + table + bucket trigger) in your own account, plus a README table listing every AWS API call made and the IAM permission it required

Week 2

Development with AWS Services

  • Build an SQS queue with a dead-letter queue and a redrive policy, then force a message to fail and confirm it lands in the DLQ

  • Configure an SNS topic fanning out to at least two subscribers and publish a message that reaches both

  • Add request throttling, stage variables, and an authorizer to an API Gateway REST or HTTP API

  • Implement idempotent retry handling with exponential backoff and jitter in a consumer process

  • Choose between SQS, SNS, Kinesis, and Step Functions for four given workload descriptions and justify each choice in writing

Your checkpoint

An event-driven pipeline (S3 to Lambda to SQS to consumer) with a working DLQ, plus a one-page comparison sheet justifying queue-versus-stream-versus-orchestration choices for four scenarios

Week 3

Security

  • Trace the policy evaluation order for identity policies, resource policies, permission boundaries, and explicit denies across five conflicting scenarios

  • Encrypt and decrypt data using a KMS customer managed key, and explain when an envelope-encryption data key is preferred

  • Retrieve a database credential at runtime from Secrets Manager and from SSM Parameter Store, and state two tradeoffs between them

  • Configure a Cognito user pool with an app client and authenticate a test user to obtain tokens

  • Generate a presigned S3 URL with a short expiry and verify that access fails after expiry

Your checkpoint

A control-mapping worksheet that matches ten written risk scenarios to a specific AWS control and the exact policy or configuration that enforces it, plus working code that fetches a secret at runtime

Week 4

Security

  • Configure an interface VPC endpoint so a private-subnet workload reaches a service without traversing the internet

  • Harden a security group and network ACL pair, then prove with a connectivity test which rule blocks traffic

  • Implement the default credential provider chain order and demonstrate role assumption via STS

  • Apply encryption in transit and at rest to an application end to end and document where each key lives

Your checkpoint

A hardened reference environment (private subnet, endpoint, scoped security groups, KMS-encrypted storage) with a before-and-after connectivity test log

Week 5

Deployment

  • Define infrastructure as code for a two-resource stack and deploy it through a change set before applying

  • Build a pipeline with source, build, and deploy stages that promotes an artifact from staging to production

  • Configure a CodeDeploy deployment group using a blue/green strategy and roll back automatically on a failed health check

  • Compare in-place, rolling, blue/green, and canary strategies and select one for each of three stated availability requirements

Your checkpoint

A working CI/CD pipeline that takes a commit through build to a staging deploy, then demonstrates a deliberate rollback triggered by a failing health check

Week 6

Deployment

  • Package and deploy a container image to a managed container service and update it with a new image tag

  • Publish a Lambda version and shift traffic between two aliases to perform a canary release

  • Inject environment-specific configuration and secrets at deploy time without baking them into the artifact

  • Tag and version every deployable artifact so a specific running version can be traced back to a commit

Your checkpoint

A containerized service deployed with a versioned image and a documented rollback command, plus a second release performed with Lambda alias traffic shifting

Week 7

Troubleshooting and Optimization

  • Instrument an application with distributed tracing and identify the slowest segment of a multi-service request

  • Create CloudWatch alarms on error rate, latency, and throttle metrics and route notifications to a topic

  • Reproduce a function timeout and a throttling error, then fix each and record the root cause

  • Diagnose a hot-partition pattern in a DynamoDB table and redesign the key to distribute writes

  • Write a triage checklist that maps common error signatures to their likely cause and first diagnostic step

Your checkpoint

An operations runbook containing five reproduced failure signatures, their root causes, the fix applied, and the metric or log line that confirmed resolution

Week 8

Development with AWS Services & Security & Deployment & Troubleshooting and Optimization

  • Complete two full-length timed practice sets and score them without consulting notes

  • Log every missed item with the underlying concept gap rather than the question wording

  • Re-drill the three weakest concepts until you can explain each aloud without reference material

  • Re-time your pacing so you finish with at least ten minutes to spare

  • Verify environment cleanliness by tearing down unused billable resources created during the plan

Your checkpoint

A scorecard showing per-domain accuracy of at least 80 percent on both practice sets, plus a one-page list of residual weak concepts with the action taken for each

Milestones

Week 2: Explain aloud, without notes, when to use SQS versus Kinesis versus Step Functions, and show a working dead-letter queue that received a failed message

Week 4: Score at least 65 percent on a timed mixed practice set covering only domains 1 and 2, and resolve every missed item to a specific policy or configuration gap

Week 6: Perform a rollback of a deployed artifact on demand and state the exact command or console action required, without referring to documentation

Week 8: Reach at least 80 percent per-domain accuracy on two consecutive full-length practice sets with correct pacing

AWS Developer exam day

Your checklist

Government-issued photo ID

Bring the original physical ID (not a photocopy or photo on your phone). The name on it must match your exam registration exactly. Confirm the specific accepted ID types with the provider (needs_review).

Second form of identification

Some delivery partners request a second ID or a signature-bearing card. Requirements vary by location and delivery method, so confirm with the provider whether one is required (needs_review).

Appointment confirmation and registration ID

Have your appointment confirmation email, registration number, and the AWS certification account login accessible in case you need to verify details at check-in or with support.

Test-center logistics (if taking in person)

Confirm the address, parking/transit options, and the provider's recommended arrival time (commonly 15-30 minutes before the start; confirm with the provider). Do a dry run of the route if the location is unfamiliar.

System and equipment check (if online proctored)

Run the provider's system test on the exact machine and network you will use, ideally 48-24 hours ahead. Verify webcam, microphone, browser version, and upload/download speed, and keep a backup internet option (mobile hotspot) available.

Compliant workspace (if online proctored)

Use a quiet, private room with a door you can close, a clear desk, good lighting on your face, and the computer plugged in. Remove phones, smart watches, second monitors, notes, and anything on the walls that could be mistaken for reference material.

Scratch materials

Test centers typically supply a notepad and pen and may require you to return them. Online sessions may permit a small whiteboard or blank sheets depending on the proctor. Confirm what is allowed before exam day (needs_review).

A time-management plan

The exam has 65 questions in 130 minutes, roughly two minutes per question. Decide in advance that you will flag anything running past ~3 minutes and come back to it.

A short pre-exam review sheet

One page you wrote yourself covering the highest-yield areas: Lambda invocation models and concurrency, DynamoDB indexes and conditional writes, API Gateway integrations and stages, Cognito user vs. identity pools, SAM/CloudFormation, CodePipeline/CodeBuild/CodeDeploy, Elastic Beanstalk deployment policies, and X-Ray/SQS/SNS/Kinesis basics. Do not try to learn new topics from it on the morning of the exam.

Water and a snack for before/after

Scheduled breaks are limited, so eat and hydrate beforehand. Anything you bring into the testing room is subject to the provider's rules; confirm what can be kept at your desk (needs_review).

Provider support contact details

Save the phone number or chat link for exam-day technical support so you can reach a human quickly if the launch or check-in fails.

Plan the day

72 hours before

Re-read the official exam guide and confirm the domains and their weightings. Take one timed practice set and review only the explanations for questions you missed. Stop studying new services; instead, tighten your notes on the areas you keep getting wrong.

72 hours before

Verify that your registration name matches your ID exactly and that the appointment time, time zone, and delivery method (test center vs. online proctored) are what you expect. Resolve any discrepancy with the provider now, not on exam day.

72 hours before

If online proctored, run the system test on your final machine and network. If in person, confirm the address and plan your arrival buffer.

24 hours before

Do a light pass only: your one-page review sheet, service limits that commonly appear (Lambda timeout and memory, SQS visibility timeout and retention, DynamoDB item size), and deployment strategy names. No full-length practice exams the day before.

24 hours before

Prepare the logistics: ID out and ready, workspace cleared, laptop charged, webcam and mic tested, backup internet identified, clothes and pockets checked. Sleep a normal night; a rested recall beats an extra hour of cramming.

Morning of

Eat properly and avoid back-to-back caffeine. Log in or arrive early per the provider's guidance. Close all other applications, silence devices, and put your phone out of reach. Keep your ID visible for check-in.

During the test

Read every question to the end and watch for 'choose two' or 'choose three' and for 'MOST cost-effective' / 'LEAST operational overhead' qualifiers. Answer every question, since unanswered items can only hurt you. Flag long or ambiguous items and move on, then use remaining time to revisit flagged questions.

During the test

If the session freezes, disconnects, or the proctor intervenes, stop and contact support immediately rather than trying to fix it alone. Note the time so you can explain any lost minutes.

Rules to check

  • Your registration name must match your government-issued photo ID exactly. If it does not, contact the provider before exam day, as you may be turned away at check-in.

  • Only authorized materials are permitted in the testing environment. Phones, smart watches, notes, printed material, and a second screen are prohibited, and leaving the camera view during an online session can result in the session being voided.

  • There is generally no scheduled break on this associate-level exam and the timer keeps running once the exam starts. Confirm the current break policy for your delivery method with the provider.

  • The exam is scored on a scaled range of 100-1000, and the passing score for this exam is commonly stated as 720. Confirm the current passing standard on the official AWS certification page, as it can change.

  • There is no penalty for guessing. An unanswered question scores the same as a wrong answer, so never leave a blank.

  • Your result is typically shown provisionally at the end of the session, with official confirmation in your AWS certification account afterward. Confirm the exact reporting timeline with the provider.

  • If you do not pass, a waiting period applies before you may retake the exam. Confirm the current retake policy and any fee with the provider.

  • You agree not to disclose, reproduce, or discuss exam content. Do not post question text or attempt to reconstruct items afterward.

AWS Developer FAQ

How many AWS Developer practice questions are available?

The practice set has 200 AWS Developer questions. Each one includes the choices, the correct answer, and an explanation, and the set is free to read with no signup.

How many AWS Developer flashcards are available?

The flashcard set has 32 AWS Developer cards. Each card shows the term and its definition.

Which topics does the AWS Developer study material cover?

The AWS Developer study material has 4 sections, including Development with AWS Services, Security, and Deployment.

What format facts does the catalog list for the AWS Developer exam?

The catalog lists these item types: multiple choice and multiple response for the AWS Developer exam.