Last updated: May 2026
DOP-C02 — AWS Certified DevOps Engineer – Professional
Test your knowledge with official exam-style questions
Questions and options are shuffled each attempt
▶AWS Certified DevOps Engineer – Professional — Practice Set 1: All Questions & Explanations
Full question text, answer options, and explanations for this practice set — a spoiler-free alternative is the interactive quiz above for scored, shuffled practice.
. A company runs a microservices application across 12 AWS accounts organized under AWS Organizations. Each team owns its own account and maintains an AWS CodePipeline pipeline that deploys to Amazon ECS on AWS Fargate. A new security policy requires that every container image deployed to production must pass a CVE scan with zero critical vulnerabilities. The scan results must be auditable for 7 years. Teams currently push images directly to Amazon ECR in their own accounts. The DevOps team needs to enforce this policy across all 12 accounts without requiring each team to modify their existing pipeline stages. Which solution MOST effectively enforces the policy with the LEAST operational overhead?
- A. Create a shared Amazon ECR repository in a central security account. Configure an AWS Organizations Service Control Policy (SCP) that denies the ecr:PutImage action in all member accounts unless the image tag contains a '-scanned' suffix. Teams must rename their image tags after passing a local scan step added to each team's CodePipeline.
- B. Enable Amazon ECR enhanced scanning (powered by Amazon Inspector) on all repositories across all accounts using an AWS Organizations delegated administrator. Configure an AWS EventBridge rule in the security account to catch Inspector findings of CRITICAL severity, then trigger an AWS Lambda function that calls the ecr:PutImageTagMutability and ecr:BatchDeleteImage APIs to quarantine non-compliant images. Store Inspector findings in Amazon S3 with a 7-year lifecycle policy for audit purposes.(correct)
- C. Deploy an AWS CodeBuild project in each team account that runs Trivy on every image pushed to ECR. Configure the CodeBuild project to write scan results to an Amazon DynamoDB table and fail the build if critical CVEs are found, blocking the CodePipeline pipeline from proceeding to the deploy stage.
- D. Use AWS Config with a custom rule backed by AWS Lambda that evaluates ECR image scan findings. Configure an AWS Systems Manager Automation runbook to quarantine images that fail the custom rule and store Config snapshots in Amazon S3 for 7-year audit retention.
Explanation: Amazon ECR enhanced scanning uses Amazon Inspector and can be delegated at the AWS Organizations level, enabling enforcement across all 12 accounts without any per-account or per-pipeline changes by the teams. The EventBridge and Lambda approach allows automated quarantine of non-compliant images after push, and storing findings in S3 with a lifecycle policy satisfies the 7-year audit requirement — all centrally managed. Option A requires every team to modify their pipeline and image tagging convention. Option C requires deploying and maintaining CodeBuild projects in all 12 accounts and does not provide centralized audit storage. Option D uses AWS Config for scanning enforcement, which is less native to ECR than Inspector and adds latency before images can be quarantined.
. A DevOps engineer is designing a deployment pipeline for a critical e-commerce application that processes 50,000 transactions per hour. The application runs on Amazon EC2 instances behind an Application Load Balancer. The business requires that any production deployment can be rolled back within 5 minutes if the error rate exceeds 1% on the new version. The deployment must not cause any downtime. Which deployment strategy using AWS CodeDeploy BEST meets these requirements?
- A. Use an AWS CodeDeploy in-place deployment with the AllAtOnce configuration and configure a CloudWatch alarm to trigger an automatic rollback if the 5xx error rate exceeds 1% during the deployment.
- B. Use an AWS CodeDeploy blue/green deployment with an Application Load Balancer. Set the traffic rerouting to immediate (AllAtOnce) and configure a deployment group rollback policy triggered by an Amazon CloudWatch alarm that monitors the ALB HTTPCode_Target_5XX_Count metric. Set the original instance termination wait time to 30 minutes.(correct)
- C. Use an AWS CodeDeploy canary deployment (CodeDeployDefault.ECSCanary10Percent5Minutes) with the traffic shifted 10% to the new version first, monitored by a CloudWatch alarm, and allow CodeDeploy to automatically complete or roll back after the bake period.
- D. Use an AWS CodeDeploy blue/green deployment with linear traffic shifting at 10% per minute and an AWS CloudWatch alarm on the error rate. Set the original instance termination wait time to 10 minutes to allow rollback.
Explanation: Blue/green deployment with immediate traffic rerouting (AllAtOnce) on an ALB provides zero-downtime deployment by spinning up the new fleet while the old one serves traffic, then cutting over instantly. Configuring an automatic rollback triggered by a CloudWatch alarm on 5xx errors allows rollback within the 5-minute SLA — CodeDeploy re-routes traffic back to the original (blue) environment in seconds. Keeping the original instances alive for 30 minutes ensures the rollback target is available. Option A uses in-place AllAtOnce, which causes downtime during deployment. Option C is an ECS canary pattern not directly applicable to EC2-backed ALB deployments. Option D's linear shifting would take 10 minutes to complete traffic shift, and rollback after full cutover would still require time to restore — the rollback window could exceed 5 minutes in worst-case scenarios.
. A company wants to implement a multi-account CI/CD pipeline where developers push code to AWS CodeCommit in a development account. The pipeline must build and test in the same development account, then deploy artifacts to a staging account and finally to a production account. The security team requires that production deployments require explicit human approval from a manager and that the pipeline never uses long-lived IAM credentials. Which combination of AWS services and configurations MOST securely implements this cross-account pipeline? (Choose TWO.)
- A. Create an AWS CodePipeline in the development account with cross-account actions that assume IAM roles in the staging and production accounts using AWS Security Token Service (AWS STS). Grant CodePipeline permission to call sts:AssumeRole on the target account roles.(correct)
- B. Store IAM access keys for the staging and production accounts in AWS Secrets Manager in the development account. Configure CodePipeline to retrieve these keys at runtime and use them for cross-account deployments.
- C. Add a manual approval action in AWS CodePipeline between the staging deploy stage and the production deploy stage, configured with an Amazon SNS topic that notifies the manager's email address for approval.(correct)
- D. Use an AWS Lambda function triggered by CodePipeline to send an approval email to the manager and wait for a callback token via the PutJobSuccessResult or PutJobFailureResult API before proceeding to production.
- E. Configure an AWS CloudFormation StackSet in the development account to deploy resources simultaneously to the staging and production accounts, eliminating the need for cross-account IAM role assumptions.
Explanation: Cross-account IAM role assumption via AWS STS is the AWS-recommended pattern for cross-account CodePipeline actions — it uses temporary credentials (no long-lived keys), and CodePipeline natively supports this through cross-account action configurations. Adding a manual approval action with an SNS notification to the manager satisfies the explicit human approval requirement using a built-in CodePipeline feature. Option B uses long-lived IAM credentials stored in Secrets Manager, which directly violates the 'never use long-lived credentials' requirement. Option D is a more complex and unnecessary workaround when CodePipeline's native approval action already provides this capability. Option E deploys to staging and production simultaneously rather than sequentially and does not incorporate a gated approval before production.
. A DevOps engineer needs to ensure that every AWS CodeBuild build for a Node.js application caches npm dependencies between builds to reduce build times from 8 minutes to under 3 minutes. The builds run on ephemeral build environments that do not retain state between runs. Which caching strategy provides the MOST significant improvement with the LEAST configuration effort?
- A. Configure Amazon S3 caching in the AWS CodeBuild project settings, specifying the /root/.npm directory as the cache path. CodeBuild will automatically upload the npm cache to S3 after each build and restore it at the start of the next build.(correct)
- B. Configure a local cache in AWS CodeBuild using LOCAL_SOURCE_CACHE mode. This caches the source code to avoid re-cloning the repository, which speeds up dependency installation.
- C. Use a custom Docker image stored in Amazon ECR that pre-installs all npm dependencies. Rebuild this Docker image weekly using a separate CodeBuild project to refresh dependencies.
- D. Mount an Amazon EFS file system to the CodeBuild build environment and configure npm to use a custom cache directory on the EFS mount point.
Explanation: AWS CodeBuild S3 caching allows specifying arbitrary directories (such as the npm cache at /root/.npm or node_modules) that are uploaded to Amazon S3 after each build and restored before the next build. This is the native, low-configuration way to persist npm dependency caches across ephemeral build environments and typically reduces build times by 50–80% for dependency-heavy projects. Option B caches the source code, not npm packages, so it does not reduce npm install time. Option C requires a separate pipeline and weekly rebuilds to keep the image current, adding significant operational complexity. Option D requires mounting and configuring EFS, which is more complex than S3 caching and not a recommended CodeBuild pattern for dependency caching.
. A company has a monolithic Java application that is being decomposed into microservices. During the transition, the team needs to run both the monolith and new microservices simultaneously and route traffic between them using feature flags. The application is deployed using AWS CodeDeploy to Amazon EC2 instances. The team wants to enable a specific new microservice for 5% of users based on a user attribute stored in an Amazon DynamoDB table, without modifying the application code or requiring a new deployment for each flag change. Which architecture MOST effectively supports this requirement?
- A. Configure AWS AppConfig to manage feature flag configurations. The application retrieves the flag state from AWS AppConfig on each request and routes to the monolith or microservice based on the flag and user attribute lookup in Amazon DynamoDB. Deploy AppConfig configuration changes without requiring a new CodeDeploy deployment.(correct)
- B. Deploy a second AWS CodeDeploy deployment group targeting 5% of instances. Route 5% of Application Load Balancer traffic to these instances using weighted target groups. The 5% traffic group runs the new microservice.
- C. Use Amazon CloudFront with Lambda@Edge to inspect request headers and redirect 5% of users to a microservice endpoint based on a user ID cookie. Store flag state in an Amazon ElastiCache cluster that Lambda@Edge reads on each request.
- D. Configure an AWS Systems Manager Parameter Store parameter containing the feature flag state. Modify the application to poll Parameter Store every 60 seconds and cache the flag value in memory. Route 5% of users to the microservice based on the cached value and a DynamoDB user attribute lookup.
Explanation: AWS AppConfig is the purpose-built AWS service for application configuration and feature flags. It supports dynamic configuration changes without redeployment, includes built-in deployment strategies (canary, linear) for gradual rollout, and integrates with AWS Lambda, EC2, and ECS applications via the AppConfig agent or SDK. The application can evaluate the flag per-request against DynamoDB user attributes with no code deployment needed for flag changes. Option B routes traffic at the instance level, not per-user, so user attribute-based routing is not possible with this approach. Option C uses Lambda@Edge and ElastiCache for per-user routing, which is architecturally complex and more appropriate for CDN-level routing, not internal service-to-service routing. Option D uses Parameter Store, which lacks AppConfig's deployment validation, rollback capabilities, and is not purpose-built for feature flag scenarios with per-user targeting.
. A company's AWS CodePipeline deployment to production failed after the AWS CloudFormation stack update began. The CloudFormation stack is now in an UPDATE_ROLLBACK_FAILED state due to a custom resource Lambda function that timed out during rollback. Production traffic is currently being served by the old stack resources that are still running. Which action should the DevOps engineer take FIRST to restore the ability to deploy new changes?
- A. Delete the CloudFormation stack and redeploy from scratch using the CodePipeline pipeline with the original template.
- B. Use the AWS CloudFormation ContinueUpdateRollback API (or console action) with the SkipResources parameter to skip the problematic custom resource and complete the rollback, then fix the underlying Lambda function.(correct)
- C. Manually update the stack using the AWS Management Console with the previous template version to override the failed rollback.
- D. Open an AWS Support ticket requesting AWS to manually reset the stack state from UPDATE_ROLLBACK_FAILED to UPDATE_COMPLETE.
Explanation: When a CloudFormation stack is in UPDATE_ROLLBACK_FAILED state, the ContinueUpdateRollback API with the SkipResources parameter allows skipping specific resources (in this case, the problematic custom resource Lambda) that are blocking the rollback. Once the rollback completes successfully, the stack returns to UPDATE_ROLLBACK_COMPLETE, and the team can fix the Lambda function before attempting the next deployment. Deleting the stack (Option A) would destroy all stack resources including production infrastructure. Manual template updates via the console (Option C) are not supported when the stack is in UPDATE_ROLLBACK_FAILED — CloudFormation will reject update operations in this state. AWS Support (Option D) cannot directly manipulate CloudFormation stack state; the ContinueUpdateRollback API is the correct self-service path.
. A company manages 200 AWS CloudFormation stacks across three AWS regions. The DevOps team discovers that 15 stacks have drifted from their templates due to manual changes made during an incident response last quarter. The team needs to detect all drifted resources, remediate them back to the desired state, and prevent future manual changes from causing drift. Which combination of actions MOST effectively addresses all three requirements? (Choose TWO.)
- A. Run AWS CloudFormation drift detection on all 200 stacks using the DetectStackDrift API. For drifted stacks, use the AWS CloudFormation console to view the drift results and manually update each resource to match the template definition.
- B. Run AWS CloudFormation drift detection using AWS Systems Manager Automation to detect drift across all stacks in all regions in parallel. For remediation, update the affected stacks by re-running the CloudFormation stack updates with the original templates, which will reconcile drifted resources.
- C. Enable AWS Config with the cloudformation-stack-drift-detection-check managed rule to continuously monitor all stacks for drift. Configure an AWS Systems Manager Automation remediation to run CloudFormation stack updates automatically when drift is detected.(correct)
- D. Configure AWS CloudTrail to log all API calls and create an Amazon CloudWatch alarm that triggers an AWS Lambda function whenever an API call modifies a resource that belongs to a CloudFormation stack (identified by the aws:cloudformation:stack-name tag).
- E. Apply an AWS Organizations Service Control Policy (SCP) that denies all AWS API write actions on resources that have the aws:cloudformation:stack-name tag, preventing direct manual modifications to CloudFormation-managed resources.(correct)
Explanation: AWS Config with the cloudformation-stack-drift-detection-check rule provides continuous, automated drift monitoring across all stacks without manual API invocation, and pairing it with an SSM Automation remediation creates a self-healing loop for drift correction. The SCP with a Deny on write actions for resources tagged with aws:cloudformation:stack-name prevents future manual changes at the organization level — this is the MOST preventative control that cannot be bypassed by individual accounts. Option A and B require periodic manual triggering of drift detection and manual remediation steps, which do not address the 'prevent future drift' requirement. Option D uses CloudWatch alarms to detect changes but only alerts — it does not prevent them. Option E combined with Option C addresses all three requirements: detection, remediation, and prevention.
. A company is migrating 300 EC2 instances to a new security baseline that requires TLS 1.2 enforcement, specific syslog configuration, and installation of a custom monitoring agent. The instances run a mix of Amazon Linux 2, Ubuntu 20.04, and Windows Server 2019. The security team requires that compliance status be reported within 15 minutes of any configuration change, and non-compliant instances must be automatically remediated within 30 minutes. Currently, there is no configuration management tooling in place. Which solution MOST efficiently meets all requirements?
- A. Install the AWS Systems Manager Agent on all 300 instances. Create AWS Systems Manager State Manager associations that apply AWS Systems Manager Documents (SSM Documents) to enforce the TLS, syslog, and agent configurations on each OS type. Use AWS Config with the ec2-managedinstance-association-compliance-status-check rule to report compliance. Configure Systems Manager Automation as a Config remediation action to re-apply the association on non-compliant instances.(correct)
- B. Deploy a self-managed Chef server in each AWS region. Write Chef cookbooks for TLS, syslog, and agent configuration for each OS type. Configure the chef-client daemon to run every 15 minutes on all instances to enforce configuration and report compliance back to the Chef server.
- C. Create AWS CloudFormation templates for each OS type that include the required configuration. Use AWS CloudFormation Stack Instances via StackSets to enforce configuration on all instances. Schedule hourly CloudFormation drift detection to identify non-compliant instances.
- D. Use AWS OpsWorks Stacks with custom layers for each OS type. Define lifecycle events for configuration enforcement and use the OpsWorks agent to continuously monitor and report compliance every 5 minutes.
Explanation: AWS Systems Manager State Manager with SSM Documents natively supports multiple OS types (Amazon Linux 2, Ubuntu, Windows Server) using OS-specific documents. State Manager associations enforce configuration on a schedule and report association compliance status, which AWS Config can continuously evaluate using the managed rule. The Config-to-SSM Automation remediation path can automatically re-apply configurations to non-compliant instances, satisfying the 30-minute remediation SLA. This is a fully managed, agentless (SSM agent is already installed on many AWS instances) solution. Option B requires deploying and maintaining self-managed Chef servers, which introduces significant operational overhead with no AWS-native integration for the 15-minute compliance reporting requirement. Option C uses CloudFormation for infrastructure provisioning, not OS-level configuration management, and hourly drift detection misses the 15-minute reporting requirement. Option D uses OpsWorks Stacks, which AWS announced end-of-life and is not a recommended new deployment target.
. A DevOps engineer is writing an AWS CloudFormation template that provisions an Amazon RDS MySQL database. The template is used in three environments: development, staging, and production. In production, the database must use Multi-AZ, have deletion protection enabled, and use a db.r6g.2xlarge instance class. In development, it must use a db.t3.micro with no Multi-AZ and no deletion protection. The same template must serve all three environments. Which CloudFormation feature BEST handles this environment-specific configuration?
- A. Create three separate CloudFormation templates, one per environment, each hardcoding the environment-specific values. Store all three templates in an Amazon S3 bucket and use AWS CodePipeline to select the correct template for each deployment.
- B. Use CloudFormation Parameters with a Mappings section. Define an EnvironmentType parameter (dev/staging/prod), create a Mappings block that maps each environment to its specific values (instance class, Multi-AZ, deletion protection), and reference the mapping values using the FindInMap intrinsic function in the RDS resource properties.(correct)
- C. Use CloudFormation Conditions with an 'IsProduction' condition derived from the EnvironmentType parameter. Apply the condition to the MultiAZ and DeletionProtection properties, and use a Conditions-based selection for the DBInstanceClass property.
- D. Store environment configurations in AWS Systems Manager Parameter Store. Add a CloudFormation custom resource that retrieves the correct values from Parameter Store at deploy time and passes them to the RDS resource as outputs.
Explanation: CloudFormation Mappings with FindInMap is the canonical pattern for environment-specific configuration in a single template. A Mappings block can store all environment-specific values (instance class, Multi-AZ boolean, deletion protection boolean) keyed by environment name, and FindInMap retrieves the correct value based on the EnvironmentType parameter. This is fully declarative, requires no external dependencies, and is evaluated at deploy time. Option A uses three templates, which creates duplication and divergence risk. Option C uses Conditions, which work for boolean properties but are cumbersome for selecting string values like instance class — Mappings handle both cases more cleanly. Option D adds unnecessary complexity with a custom resource and runtime dependency on Parameter Store when Mappings achieves the same result natively.
. A company stores database credentials for an Amazon RDS instance in an AWS CloudFormation template parameter as a NoEcho string. A security audit reveals that the credentials are visible in AWS CloudFormation stack events and can be retrieved from the stack's parameter history. The security team requires that credentials never be visible in any CloudFormation output or log. Which change to the architecture MOST effectively resolves this finding?
- A. Store the database credentials in AWS Secrets Manager before stack creation. In the CloudFormation template, use the dynamic reference {{resolve:secretsmanager:MyDBSecret:SecretString:password}} to retrieve the credential value at deploy time. The credential is never stored in template parameters or visible in stack events.(correct)
- B. Encrypt the credential using an AWS KMS key and store the encrypted ciphertext as a CloudFormation parameter value. Add a custom resource Lambda function to decrypt the value at deploy time and pass the plaintext to the RDS resource.
- C. Use AWS Systems Manager Parameter Store SecureString parameters and reference them in CloudFormation using {{resolve:ssm-secure:MyDBPassword:1}}. CloudFormation resolves SecureString values without exposing them in stack events.
- D. Enable AWS CloudTrail data events for the CloudFormation API and restrict access to CloudTrail logs using an S3 bucket policy. This ensures that even if credentials appear in stack events, only authorized personnel can view them.
Explanation: AWS Secrets Manager dynamic references ({{resolve:secretsmanager:...}}) are the recommended approach for injecting sensitive values into CloudFormation templates. The credential is stored and managed entirely in Secrets Manager and is never passed as a parameter value, which means it never appears in stack events, the AWS Management Console, or CloudFormation API responses. Option C using SSM SecureString is also a valid approach and AWS does protect these values from appearing in stack events, but Secrets Manager is specifically designed for database credentials, provides automatic rotation, and is the preferred choice for RDS credentials. Option B is overly complex — encrypting credentials for a CloudFormation parameter still requires passing a decrypted value through Lambda, which introduces additional risk. Option D does not prevent credentials from appearing in stack events; it only restricts who can see CloudTrail logs.
. A company runs a stateful web application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer. Sessions are stored locally on each EC2 instance. During a scale-in event, users whose sessions are on the terminating instance lose their session and are logged out. The application handles 10,000 concurrent users during peak hours and must not lose any active sessions during scaling events. Which architecture change MOST effectively resolves the session loss issue with MINIMAL application code changes?
- A. Configure connection draining (deregistration delay) on the Application Load Balancer target group to 3,600 seconds. This keeps the terminating instance registered long enough for all sessions to expire naturally before the instance is terminated.
- B. Enable sticky sessions (session affinity) on the Application Load Balancer target group. This ensures that requests from a specific user always route to the same EC2 instance, preventing session loss during scaling events that do not affect the user's specific instance.
- C. Configure an Auto Scaling lifecycle hook on the scale-in event. When a scale-in is triggered, move sessions from the terminating instance to Amazon ElastiCache for Redis using a custom script invoked via AWS Systems Manager Run Command. Once the script completes, signal the lifecycle hook to proceed with termination. Update the application to read from ElastiCache first before falling back to local session storage.
- D. Externalize all session storage to Amazon ElastiCache for Redis. Configure the application to read and write session data exclusively to ElastiCache instead of local instance storage. This makes all EC2 instances stateless, and session data persists through scale-in events.(correct)
Explanation: Externalizing session state to Amazon ElastiCache for Redis makes the EC2 instances completely stateless. Since no session data is stored locally, scale-in events never result in session loss — the terminating instance holds no unique user data. This is the canonical solution for session persistence in auto-scaling web applications. Option A keeps instances alive for up to an hour, which defeats the purpose of scale-in (cost and capacity management) and does not actually resolve the architectural problem. Option B sticky sessions prevent users from being routed to other instances, but if the specific instance their session is on is terminated, they still lose the session. Option C is a complex workaround using lifecycle hooks and SSM Run Command that requires application changes, custom scripts, and is error-prone; Option D requires application changes but is far simpler, more reliable, and architecturally correct.
. A company has an RTO of 15 minutes and RPO of 5 minutes for a mission-critical application that uses Amazon RDS for PostgreSQL (Multi-AZ), Amazon DynamoDB, and Amazon ECS on AWS Fargate across us-east-1. A regional disaster scenario requires the ability to fail over to us-west-2. The application currently has no disaster recovery setup. Which disaster recovery strategy MOST cost-effectively meets the RTO and RPO requirements?
- A. Implement an Active-Active multi-region setup. Deploy the full application stack in both us-east-1 and us-west-2 with Amazon Route 53 latency-based routing. Use Amazon RDS Global Database for PostgreSQL and Amazon DynamoDB Global Tables for real-time data replication between regions.
- B. Implement a Warm Standby strategy. Deploy a scaled-down (minimum capacity) version of the application stack in us-west-2 using Amazon ECS with a single Fargate task, Amazon RDS Global Database for PostgreSQL in the secondary region, and Amazon DynamoDB Global Tables. Use Amazon Route 53 health checks with failover routing. Scale up in us-west-2 upon failover.(correct)
- C. Implement a Pilot Light strategy. Replicate data continuously to us-west-2 using Amazon RDS Global Database for PostgreSQL and Amazon DynamoDB Global Tables. Store ECS task definitions and infrastructure as AWS CloudFormation templates in Amazon S3. On disaster, execute the CloudFormation stack and promote the RDS read replica to primary.
- D. Implement a Backup and Restore strategy. Take daily automated RDS snapshots and DynamoDB point-in-time recovery (PITR) backups and copy them to us-west-2 using AWS Backup. On disaster, restore from the latest backup and redeploy the application using CloudFormation.
Explanation: A Warm Standby strategy with scaled-down but running infrastructure in us-west-2 achieves the 15-minute RTO because the database (via RDS Global Database promotion, which takes ~1 minute) and application infrastructure are already running — only scaling is needed. RDS Global Database provides sub-second replication lag, meeting the 5-minute RPO. DynamoDB Global Tables provides continuous replication. Route 53 health checks with failover routing automate traffic redirection. Warm Standby is more cost-effective than Active-Active (Option A), which runs at full capacity in both regions at all times. Pilot Light (Option C) requires deploying compute infrastructure from scratch during failover, typically taking 30+ minutes, which violates the 15-minute RTO. Backup and Restore (Option D) typically takes hours, far exceeding both RTO and RPO requirements.
. A company's Auto Scaling group regularly fails to launch new EC2 instances during peak traffic events because the preferred Availability Zone runs out of capacity for the requested instance type (c5.4xlarge). The capacity errors cause the Auto Scaling group to remain at minimum capacity while traffic spikes go unserved. Which configuration change MOST effectively prevents this issue?
- A. Switch from a launch configuration to a launch template and enable the 'Capacity Rebalancing' feature in the Auto Scaling group to proactively replace Spot Instances before they are interrupted.
- B. Update the launch template to configure multiple instance types (c5.4xlarge, c5a.4xlarge, m5.4xlarge) using the attribute-based instance type selection or instance type overrides. Configure the Auto Scaling group with a 'balanced' Availability Zone distribution and the lowest-price or capacity-optimized allocation strategy.(correct)
- C. Increase the desired capacity of the Auto Scaling group to pre-scale before expected traffic peaks based on a scheduled scaling action. This ensures instances are launched before the capacity crunch occurs.
- D. Switch the EC2 instances to Reserved Instances for the c5.4xlarge type. Reserved Instance capacity reservations in the preferred Availability Zone guarantee instance launch capacity regardless of regional capacity constraints.
Explanation: Configuring multiple instance types (instance type overrides) in the Auto Scaling launch template allows the group to use alternative instance types with equivalent compute capacity when the preferred type is unavailable in a given Availability Zone. This directly addresses InsufficientInstanceCapacity errors. The capacity-optimized allocation strategy also directs launches to instance pools with the most available capacity. Option A addresses Spot Instance interruption, not On-Demand capacity shortages. Option C (scheduled scaling) helps anticipate peaks but does not resolve the capacity error — if c5.4xlarge capacity is exhausted, scheduled launches will still fail. Option D On-Demand Capacity Reservations (not Reserved Instances) guarantee capacity for a specific instance type, but using a Capacity Reservation locks you into a single instance type and incurs cost whether or not the capacity is used, whereas multiple instance types provide more flexibility.
. A DevOps engineer needs to configure an Amazon EC2 Auto Scaling group to automatically replace unhealthy instances. Currently, instances that fail application health checks remain in service because the Auto Scaling group only uses EC2 status checks. The application exposes an HTTP endpoint /health that the Application Load Balancer checks every 30 seconds. Which change MOST directly addresses this issue?
- A. Configure an Amazon CloudWatch alarm on the ALB HealthyHostCount metric and attach a scaling policy to terminate instances when the count drops below the desired count.
- B. Change the Auto Scaling group health check type from EC2 to ELB. This causes the Auto Scaling group to use the Application Load Balancer's health check results to determine instance health, and unhealthy instances (those failing the /health endpoint check) will be automatically replaced.(correct)
- C. Configure an AWS Lambda function triggered by an Amazon EventBridge rule that checks the ALB target group health every 5 minutes and calls the TerminateInstanceInAutoScalingGroup API for instances marked as unhealthy.
- D. Install the Amazon CloudWatch agent on each EC2 instance to push custom health metrics to CloudWatch. Create a CloudWatch alarm that triggers an Auto Scaling instance refresh when the custom metric indicates an unhealthy state.
Explanation: Changing the Auto Scaling group health check type from EC2 to ELB (in the ASG console or via the API HealthCheckType property) is the direct, single-configuration-change solution. When the health check type is ELB, the Auto Scaling group respects the ALB's /health endpoint check results, and instances that fail the ALB health check are marked unhealthy by the ASG and replaced automatically. Option A creates a CloudWatch alarm but scaling policies adjust capacity — they do not directly terminate specific unhealthy instances. Option C uses Lambda to poll and terminate instances, which adds operational complexity when the built-in ELB health check type achieves the same result natively. Option D adds unnecessary complexity with custom metrics when the ALB already performs the health check the team wants to use.
. A company runs a distributed microservices application on Amazon EKS. The application experiences intermittent latency spikes that only manifest when three specific microservices call each other in sequence. Standard Amazon CloudWatch metrics show no anomalies during the spikes. The engineering team has been unable to identify the root cause after two weeks of investigation. The team needs to trace the exact request path across all services, identify which service call introduces the latency, and correlate this with resource utilization on the specific pods at the time of the spike. Which combination of tools MOST effectively enables this analysis? (Choose TWO.)
- A. Instrument all microservices with the AWS X-Ray SDK or AWS Distro for OpenTelemetry (ADOT). Deploy the ADOT Collector as a DaemonSet on EKS to collect traces. Use the AWS X-Ray service map and trace analysis to identify which service segment contributes most to the latency.(correct)
- B. Enable Amazon CloudWatch Container Insights on the EKS cluster to collect CPU, memory, network, and disk I/O metrics at the pod, node, and cluster level. Use CloudWatch Metrics Insights to correlate resource utilization spikes on specific pods with the time windows identified in X-Ray traces.(correct)
- C. Deploy Amazon Managed Grafana with an Amazon Managed Service for Prometheus data source to visualize Kubernetes pod metrics. Create dashboards that correlate HTTP response times captured by Prometheus ServiceMonitors with the identified latency spike windows.
- D. Enable AWS CloudTrail data event logging for the EKS API server. Use Amazon Athena to query CloudTrail logs during the latency spike windows to identify API calls between microservices that have elevated response times.
- E. Configure Amazon VPC Flow Logs for the EKS worker node subnet and use Amazon Athena to analyze network-level packet flow data to identify which service-to-service network path has the highest round-trip times during latency spikes.
Explanation: AWS X-Ray (or ADOT for OpenTelemetry-native instrumentation) provides distributed tracing across all microservices, creating end-to-end trace visualizations that show exactly which service call in the sequence is contributing latency. The X-Ray service map and trace timeline pinpoint the slow segment with microsecond precision. CloudWatch Container Insights provides pod-level CPU, memory, and network metrics on EKS, which can be correlated with the specific time windows identified in X-Ray to determine if resource contention is the cause of the latency. Together, traces (A) and resource metrics (B) provide the full picture. Option C with Prometheus and Grafana is a valid alternative but requires more setup and is not native AWS tooling for this scenario. Option D CloudTrail logs EKS control plane API calls, not application-level request timing between microservices. Option E VPC Flow Logs provide byte/packet counts at the network level but cannot show application response times or service-level latency.
. A company's application logs are generated by hundreds of EC2 instances across multiple AWS regions and sent to Amazon CloudWatch Logs. The security team needs to receive an alert within 5 minutes whenever any application log entry contains the pattern 'UNAUTHORIZED_ACCESS' or 'PRIVILEGE_ESCALATION'. Currently, no alerting is configured. Which is the MOST operationally efficient way to implement this alerting?
- A. Create an Amazon CloudWatch Logs metric filter on each CloudWatch log group that matches the pattern 'UNAUTHORIZED_ACCESS' OR 'PRIVILEGE_ESCALATION'. Configure a CloudWatch alarm on the resulting custom metric that triggers when the count exceeds 0, with a period of 1 minute and a notification to an Amazon SNS topic subscribed to the security team's email.(correct)
- B. Configure a CloudWatch Logs subscription filter on each log group to forward all log events to an AWS Lambda function. The Lambda function scans each log event for the patterns and publishes a message to an Amazon SNS topic if a match is found.
- C. Export all CloudWatch Logs to Amazon S3 every 5 minutes using an AWS Lambda function. Create an Amazon Athena query that scans the S3 bucket for the patterns and schedules it to run every 5 minutes using Amazon EventBridge. Trigger an SNS notification if rows are returned.
- D. Install the Amazon CloudWatch agent on all EC2 instances, enable real-time log streaming to Amazon Kinesis Data Streams, then use an AWS Lambda consumer on the Kinesis stream to scan for the patterns and send SNS notifications.
Explanation: CloudWatch Logs metric filters are the native, purpose-built mechanism for creating metrics from log content. A metric filter with the pattern '?UNAUTHORIZED_ACCESS ?PRIVILEGE_ESCALATION' (using OR logic) across each relevant log group, combined with a 1-minute period CloudWatch alarm with a threshold of ≥1, delivers alerts within 1–2 minutes of a log event — well within the 5-minute SLA. This requires no additional compute and is fully managed. Option B using Lambda subscriptions processes every log event through Lambda, which is significantly more expensive and complex for a pattern-matching use case that metric filters handle natively. Option C's S3 export and Athena approach introduces up to 5 minutes of export delay plus query time, potentially exceeding the 5-minute SLA, and is operationally complex. Option D adds Kinesis Data Streams, which is appropriate for high-throughput log processing pipelines but is over-engineered for simple pattern alerting.
. A DevOps engineer receives an Amazon CloudWatch alarm indicating that an Amazon RDS Multi-AZ instance's WriteLatency metric has been above 50ms for the last 10 minutes. The application team reports that write-heavy batch jobs that run every 30 minutes are impacting production query performance. The team needs to automatically separate batch workloads from production writes without changing application connection strings. Which solution BEST addresses this with MINIMAL application changes?
- A. Create an Amazon RDS Proxy for the production database. Configure the RDS Proxy to pin batch application connections to a separate connection pool. This isolates batch workload connections from production connections at the proxy layer.
- B. Enable Amazon RDS Multi-AZ with two readable standbys (available for RDS Multi-AZ DB Cluster). Route read traffic from batch jobs to the readable standby endpoint. For write operations, keep both batch and production using the primary writer endpoint but implement connection pooling via RDS Proxy.
- C. Migrate the batch workload to use Amazon Aurora with an Aurora Replica. Configure the batch application to connect to the Aurora Reader endpoint (which automatically load-balances across replicas), keeping write operations isolated to the primary writer.(correct)
- D. Scale up the RDS instance to a larger instance class with more IOPS provisioned storage. The additional capacity will absorb both batch and production write workloads without latency impact.
Explanation: Migrating to Amazon Aurora and directing batch jobs to the Aurora Reader endpoint separates the read-heavy batch workload from the write path on the primary instance. Aurora Replicas share the same underlying storage as the primary and have near-zero replication lag, making this effective for batch jobs that primarily read data or can tolerate reader-replica execution. The Aurora Reader endpoint automatically routes connections across all replicas, and the production application continues using the writer endpoint without connection string changes. Option A RDS Proxy improves connection pooling but does not separate batch write operations from production — both still write to the same primary. Option B Multi-AZ readable standbys help with read offloading but batch jobs that perform writes still hit the primary writer. Option D scaling up treats the symptom rather than the root cause (workload isolation) and does not prevent future degradation as data grows.
. A company wants to implement automated remediation when an EC2 instance's CPU utilization exceeds 90% for more than 5 consecutive minutes. The remediation should first attempt to scale up the Auto Scaling group, and if that fails, send an alert to the on-call team. Which combination of AWS services implements this automated remediation pipeline with the LEAST custom code?
- A. Create an Amazon CloudWatch alarm that triggers when CPUUtilization > 90% for 5 minutes. Configure the alarm to invoke an AWS Systems Manager Automation runbook that first calls the Auto Scaling SetDesiredCapacity API and, if that step fails, sends a notification to an Amazon SNS topic.(correct)
- B. Create an Amazon CloudWatch alarm on CPUUtilization > 90%. Configure the alarm action to trigger an AWS Lambda function that calls the Auto Scaling API to scale up. Include try/except logic in the Lambda to send an SNS notification on failure.
- C. Create an Amazon EventBridge rule that triggers on the CloudWatch alarm state change (ALARM state). The EventBridge rule invokes an AWS Step Functions state machine that calls the Auto Scaling API as the first state and has an error handler state that publishes to Amazon SNS.
- D. Configure an Amazon CloudWatch alarm with two actions: a scale-out policy on the Auto Scaling group (primary action) and an SNS notification (secondary action). Both actions fire simultaneously when the alarm enters ALARM state.
Explanation: AWS Systems Manager Automation runbooks provide a managed, low-code orchestration mechanism for sequential remediation steps with built-in error handling. A runbook can call SetDesiredCapacity as the first step and use an OnFailure handler to publish to SNS — no custom code is required beyond configuring the runbook steps. Option B requires writing Lambda code for the orchestration logic, which violates the 'least custom code' requirement. Option C with Step Functions is a valid orchestration approach but requires defining state machine states and is more complex than an SSM Automation runbook for this use case. Option D fires both actions simultaneously rather than conditionally — the SNS notification fires even when scale-up succeeds, which does not match the 'if scale-up fails, then alert' requirement.
. A financial services company must ensure that all Amazon S3 buckets across 50 AWS accounts in an AWS Organizations structure never allow public access, that all objects are encrypted with customer-managed AWS KMS keys, and that bucket access logs are enabled. A new audit revealed 23 non-compliant buckets across 8 accounts. The compliance team needs continuous monitoring and must automatically remediate new violations within 10 minutes of detection. Which architecture MOST effectively implements continuous compliance enforcement across all accounts?
- A. Enable AWS Config in all 50 accounts using an AWS Organizations delegated administrator account. Enable the s3-bucket-public-read-prohibited, s3-bucket-server-side-encryption-enabled, and s3-bucket-logging-enabled managed rules as conformance pack deployed via StackSets. Configure automatic remediation using AWS Systems Manager Automation runbooks for each rule, triggered via Config remediation actions. Aggregate findings in the AWS Config aggregator in the security account.(correct)
- B. Write an AWS Lambda function that uses the AWS SDK to list all S3 buckets across all 50 accounts (using cross-account role assumption), check bucket policies, encryption configurations, and logging settings, and remediate violations. Schedule the Lambda using Amazon EventBridge to run every 5 minutes.
- C. Use Amazon Macie to detect public S3 buckets and unencrypted sensitive data across all accounts. Configure Macie findings to trigger AWS Security Hub, which then invokes AWS Lambda for automated remediation of public access settings and encryption configuration.
- D. Enable AWS Security Hub in all accounts with the AWS Foundational Security Best Practices standard, which includes S3 controls for public access and encryption. Configure Security Hub automation rules to trigger AWS Lambda functions for remediation and aggregate findings in a central security account.
Explanation: AWS Config managed rules with Organizations-level conformance pack deployment and SSM Automation remediation is the native, end-to-end compliance-as-code solution for this scenario. The delegated administrator can deploy conformance packs to all member accounts via StackSets in a single operation. Config triggers remediation actions within minutes of a rule evaluation (which is triggered by configuration changes, satisfying the 10-minute SLA). The Config aggregator provides cross-account compliance visibility in one pane. Option B using Lambda polling every 5 minutes is a fully custom solution with high maintenance overhead and does not use native compliance tooling. Option C Amazon Macie focuses on sensitive data classification, not configuration compliance; it detects sensitive data in public buckets but does not monitor encryption configuration or access logging compliance. Option D Security Hub aggregates findings but does not natively replace Config rules for configuration compliance assessment — Config is still the detection mechanism.
. A DevOps engineer needs to implement a secrets rotation strategy for an application that accesses an Amazon RDS database. The application runs on Amazon EC2 instances using an IAM instance role. The current implementation uses a hardcoded password in an environment variable. The new solution must rotate the database password every 30 days, ensure the application never has more than 5 seconds of database connectivity interruption during rotation, and store the rotation history for compliance auditing. Which solution BEST meets all requirements?
- A. Store the RDS password in AWS Secrets Manager. Enable automatic rotation with the built-in RDS rotation Lambda function and set the rotation schedule to 30 days. Configure the application to retrieve the secret from Secrets Manager using the AWS SDK on each database connection attempt, with caching of up to 5 seconds. Secrets Manager maintains the rotation history for audit purposes.(correct)
- B. Store the RDS password in AWS Systems Manager Parameter Store as a SecureString. Create an AWS Lambda function that generates a new password, updates the RDS instance password, and updates the Parameter Store parameter. Schedule the Lambda using Amazon EventBridge to run monthly. Configure the application to retrieve the parameter value at startup.
- C. Use AWS IAM database authentication for Amazon RDS. Configure the EC2 instance IAM role with rds-db:connect permission. The application generates a short-lived authentication token (valid for 15 minutes) instead of using a password. No password rotation is needed because IAM tokens expire automatically.
- D. Store the RDS password in AWS Secrets Manager with manual rotation. When rotation is needed, trigger the rotation using an AWS Lambda function. Store previous secret versions in AWS Secrets Manager with the AWSPREVIOUS label for compliance auditing. Use dual-password rotation to prevent connectivity interruption.
Explanation: AWS Secrets Manager with the built-in RDS rotation Lambda handles the dual-password rotation strategy automatically: it sets the new password on the database user first while the old password remains valid, then updates the secret, minimizing connectivity gaps to well under 5 seconds. The 30-day rotation schedule is configurable. Using the Secrets Manager SDK with a short cache TTL in the application ensures it picks up the new credential quickly. Secrets Manager maintains all secret versions (AWSCURRENT, AWSPREVIOUS, AWSPENDING) providing the rotation history for compliance. Option B Parameter Store lacks built-in database rotation Lambdas and the custom Lambda lacks the dual-password handshake logic to prevent connectivity interruption. Option C IAM database authentication is excellent and eliminates passwords entirely, but it is not supported for all RDS engine versions and the question specifies the need for a rotation history audit trail, which IAM auth does not provide. Option D is functionally similar to A but describes manual rotation, which does not meet the automatic 30-day rotation requirement.
. A company needs to ensure that all AWS Lambda functions deployed across their production accounts have the latest CVE patches applied within 48 hours of a patch being released. The functions use custom runtimes based on Amazon Linux 2 container images stored in Amazon ECR. The security team needs an automated pipeline that detects when a base image has CVEs above CVSS score 7.0, rebuilds affected functions, and deploys the updated images. Which solution MOST effectively automates this pipeline?
- A. Enable Amazon ECR enhanced scanning on all repositories. Configure an Amazon EventBridge rule that triggers when Amazon Inspector publishes a CRITICAL or HIGH severity finding for an ECR image. The EventBridge rule invokes an AWS CodePipeline pipeline that rebuilds the container image using AWS CodeBuild, pushes the updated image to ECR, and deploys the updated Lambda function using the UpdateFunctionCode API.(correct)
- B. Schedule a daily AWS Lambda function that calls the ECR DescribeImageScanFindings API for all images, filters for findings with CVSS score above 7.0, and sends an email via Amazon SES to the security team listing affected images. The team manually triggers CodePipeline for affected functions within 48 hours.
- C. Use AWS Systems Manager Patch Manager to apply patches to the Lambda function runtime environment. Configure a patch baseline that targets Amazon Linux 2 and schedule patching maintenance windows to run every 24 hours.
- D. Subscribe to the AWS Security Bulletins RSS feed using an AWS Lambda function. When a new bulletin is posted, trigger an AWS Step Functions state machine that rebuilds all Lambda container images regardless of whether they are affected, ensuring all functions are always patched within 24 hours.
Explanation: Amazon ECR enhanced scanning with Amazon Inspector continuously scans images and publishes findings as EventBridge events in near real-time when new CVEs are detected. The EventBridge-to-CodePipeline integration provides a fully automated, event-driven pipeline that rebuilds only affected images (those with new HIGH/CRITICAL findings) and deploys updated Lambda functions. This satisfies the 48-hour remediation SLA automatically without human intervention. Option B requires daily polling and manual intervention, which may not meet the 48-hour SLA and adds operational overhead. Option C AWS Systems Manager Patch Manager patches EC2 instances, not Lambda container images — Lambda containers are immutable and must be rebuilt, not patched in-place. Option D rebuilds ALL Lambda images for every security bulletin regardless of applicability, wasting build resources and potentially introducing changes to unaffected functions.
. A company's AWS CloudTrail is enabled in all regions, but the DevOps engineer discovers that the CloudTrail log files in Amazon S3 have been modified — specifically, some log files from six months ago have been deleted. The security team needs to determine whether any other log files have been tampered with and implement a control to detect future tampering. Which AWS feature directly addresses both requirements?
- A. Enable CloudTrail log file integrity validation. This creates a digest file every hour that contains SHA-256 hashes of all log files delivered in that period. Use the AWS CLI aws cloudtrail validate-logs command to verify the integrity of all historical log files and detect deletions or modifications.(correct)
- B. Enable Amazon S3 Object Lock on the CloudTrail S3 bucket in Compliance mode with a 7-year retention period. This prevents any deletion or modification of log files and retroactively protects existing log files from future tampering.
- C. Enable Amazon S3 Versioning on the CloudTrail bucket. Deleted objects become delete markers, allowing recovery of deleted log files by removing the delete marker. Enable an S3 Lifecycle policy to transition old versions to Amazon S3 Glacier for cost-effective long-term retention.
- D. Configure Amazon Macie on the CloudTrail S3 bucket to detect sensitive data access patterns. Macie will alert on unusual access patterns such as bulk deletions, which indicates potential log tampering.
Explanation: CloudTrail log file integrity validation is the specific AWS feature designed exactly for this use case. When enabled, CloudTrail creates signed digest files (SHA-256 hashes) every hour that reference each log file. The aws cloudtrail validate-logs CLI command uses these digests to verify whether log files have been deleted, modified, or tampered with since delivery. This addresses both requirements: detecting past tampering and detecting future tampering. Option B S3 Object Lock in Compliance mode prevents future deletions but cannot detect whether past files were tampered before the lock was applied (the question states files were already deleted). Option C S3 Versioning enables recovery of deleted files but does not provide a cryptographic integrity verification mechanism to detect modifications to existing files. Option D Amazon Macie classifies sensitive data — it does not perform cryptographic log integrity verification.
. A company runs a data processing pipeline on Amazon EC2 that processes 10 TB of data daily in batch jobs that start at 2:00 AM and must complete by 6:00 AM. The jobs run on r5.8xlarge instances (currently 20 On-Demand instances). The processing is stateless and can tolerate individual instance failures because jobs are checkpointed to Amazon S3 every 10 minutes. Total monthly EC2 spend for these batch jobs is $45,000. The DevOps engineer needs to reduce this cost by at least 70% without violating the 4-hour completion window. Which purchasing strategy achieves the MOST cost reduction?
- A. Purchase 20 Reserved Instances (r5.8xlarge) with a 1-year term, No Upfront payment plan. This provides approximately 40% savings over On-Demand pricing for the batch instances that run every day.
- B. Configure the batch processing Auto Scaling group to use Spot Instances with the 'capacity-optimized' allocation strategy and multiple instance type alternatives (r5.8xlarge, r5a.8xlarge, r5n.8xlarge, r4.8xlarge). Set a Spot interruption handler that checkpoints current job state to S3 and requeues the job. With 10-minute checkpoints and job requeuing, the pipeline can tolerate Spot interruptions and complete within the 4-hour window.
- C. Use AWS Batch with Spot Instances and configure Spot Instance retries. AWS Batch automatically handles Spot interruptions by requeuing jobs and launching replacement capacity. Configure the AWS Batch compute environment to use multiple instance types for better Spot availability.(correct)
- D. Use a mix of 5 On-Demand Reserved Instances and 15 Spot Instances. The 5 Reserved Instances serve as a stable baseline, and the 15 Spot Instances provide the bulk of capacity at reduced cost. This hybrid approach achieves approximately 60% savings.
Explanation: AWS Batch with Spot Instances is the MOST cost-effective solution for batch workloads that can tolerate interruptions. Spot Instances provide up to 90% discount over On-Demand pricing, which more than meets the 70% reduction target. AWS Batch natively handles Spot interruption retries by re-queuing jobs to replacement instances, and with 10-minute S3 checkpoints, the maximum work lost per interruption is 10 minutes — well within the 4-hour window. AWS Batch also supports multiple instance types, improving Spot availability. The combination of Spot pricing (90% savings) and AWS Batch's managed retry mechanism is purpose-built for this scenario. Option B achieves similar Spot savings but requires custom interruption handling code, whereas AWS Batch handles this natively. Option A Reserved Instances provide only 40% savings, not meeting the 70% target. Option D achieves approximately 60% savings, which does not meet the 70% requirement.
. A company has 120 Amazon EC2 instances across development, staging, and production environments. AWS Cost Explorer shows that the development and staging instances (60 instances total) run 24/7 but are only actively used Monday through Friday from 8:00 AM to 8:00 PM in the us-east-1 time zone. These instances are costing $18,000/month. The DevOps engineer needs to reduce costs without impacting developer productivity. Which solution achieves the MOST savings with the LEAST operational overhead?
- A. Create an AWS Lambda function that calls the EC2 StartInstances and StopInstances APIs on a schedule. Use two Amazon EventBridge scheduled rules: one at 8:00 AM Monday–Friday to start instances, and one at 8:00 PM Monday–Friday to stop instances. Tag all dev/staging instances with Environment=NonProd and use the tag to filter instances in the Lambda function.
- B. Use AWS Instance Scheduler, an AWS Solutions Library offering, to manage start/stop schedules for EC2 instances. Configure schedules for dev/staging instances using the scheduler's DynamoDB-backed configuration. Tag instances with the scheduler tag to enroll them. The scheduler handles timezone conversions and period definitions natively.(correct)
- C. Configure AWS Auto Scaling scheduled actions to scale the development and staging Auto Scaling groups to 0 instances at 8:00 PM and back to the desired count at 8:00 AM Monday through Friday.
- D. Purchase Convertible Reserved Instances for all 60 dev/staging instances with a 1-year term. This provides approximately 35–40% savings while instances run 24/7, reducing the $18,000/month spend without requiring any scheduling changes.
Explanation: AWS Instance Scheduler is an AWS Solutions Library solution that provides a complete, pre-built EC2 and RDS start/stop scheduling system with a DynamoDB configuration backend, support for complex schedules (weekdays only, specific hours, time zone-aware), and tag-based instance enrollment. It requires no custom Lambda code and handles edge cases (holidays, multi-region, etc.) out of the box — LEAST operational overhead. By running 60 instances only 60 hours/week instead of 168 hours/week, the savings are approximately 64% (~$11,500/month saved). Option A requires writing, deploying, and maintaining custom Lambda code, which is more operational overhead than the pre-built Instance Scheduler solution. Option C uses Auto Scaling scheduled actions but requires all 60 instances to be in Auto Scaling groups, which may not be the case, and does not cover instances outside of ASGs. Option D Reserved Instances for non-production environments that run only 12 hours/day on weekdays is wasteful — you pay for 24/7 capacity but only use 60 hours/week.
. A company is reviewing their AWS bill and notices that Amazon S3 data transfer costs have increased from $2,000/month to $14,000/month over the past 6 months. The application serves static assets (images, videos, JavaScript files) to a global user base from an S3 bucket in us-east-1. Users are distributed across North America, Europe, and Asia-Pacific. Which change MOST cost-effectively reduces S3 data transfer costs while improving performance for global users?
- A. Enable Amazon S3 Transfer Acceleration on the bucket. Transfer Acceleration uses the CloudFront edge network to accelerate uploads and downloads to S3. Data transfer costs using Transfer Acceleration are slightly higher than standard S3 data transfer but improve performance significantly.
- B. Create an Amazon CloudFront distribution with the S3 bucket as the origin. Configure CloudFront to cache static assets at edge locations. Data transferred from S3 to CloudFront is free (no S3 egress charges for CloudFront-to-origin traffic), and CloudFront data transfer rates to end users are lower than direct S3 data transfer rates for most regions.(correct)
- C. Replicate the S3 bucket to three regional buckets (eu-west-1, ap-southeast-1, us-east-1) using S3 Cross-Region Replication. Use Amazon Route 53 latency-based routing to direct users to the nearest regional bucket. This eliminates inter-region data transfer costs and reduces latency.
- D. Enable S3 Intelligent-Tiering on the bucket to automatically move infrequently accessed objects to cheaper storage tiers. This reduces storage costs but does not directly affect data transfer costs.
Explanation: Amazon CloudFront is the definitive solution for reducing S3 data transfer costs for globally distributed static content. Data transferred from S3 to CloudFront as origin fetches is free (no S3 egress charge), and CloudFront's data transfer rates to end users are lower than direct S3 transfer rates, particularly for non-US regions. Additionally, CloudFront caches assets at 450+ global edge locations, meaning most user requests are served from cache — dramatically reducing origin (S3) data transfer. The combination of free S3-to-CloudFront transfer, CloudFront caching, and lower CloudFront egress rates typically reduces total data transfer costs by 70–80%. Option A S3 Transfer Acceleration is designed for upload performance and costs MORE than standard transfer — it would increase costs. Option C replicating to three regional buckets incurs S3 Cross-Region Replication data transfer costs and storage costs in multiple regions, which is typically more expensive than CloudFront. Option D S3 Intelligent-Tiering reduces storage costs, not data transfer costs.