表示モード
画像位置
文字位置
理解度の自動記録
Q1AWS Certified Devops Engineer Professional
Q1. An online payment service company has built an AWS Lambda function that processes orders received through an API.
The company deploys the Lambda function with AWS CodeDeploy as the final stage of its CI/CD pipeline.
A DevOps engineer notices that the order API returns intermittent errors for a few seconds immediately after each deployment.
After investigation, the engineer determines the cause is that database changes have not yet fully propagated before the Lambda function is invoked.
How can this problem be resolved?
Show answer
Correct answer: A. Configure a BeforeAllowTraffic hook in the AppSpec file to test the required database changes and wait for them to complete before traffic is shifted to the new version of the Lambda function.
In a Lambda deployment with AWS CodeDeploy, hooks in the AppSpec file let you run validation logic at each lifecycle stage.The BeforeAllowTraffic hook runs immediately before traffic is shifted to the new version, so it is the ideal place to embed validation that waits for the database changes to finish propagating.
This guarantees that dependencies are ready before the traffic shift and prevents the intermittent failures.
AfterAllowTraffic runs after the shift, so it does not help avoid the failures.
validateService is a hook for EC2/on-premises deployments and cannot be used in Lambda deployments.
Option C targets the pre-deployment phase and is not tied to traffic control.
Keep in mind that the only hooks available for Lambda are BeforeAllowTraffic and AfterAllowTraffic.
AWS CodeDeploy AppSpec “hooks” section
Q2AWS Certified Devops Engineer Professional
Q2. The production environment of a manufacturing SaaS company runs its application using AWS CodeDeploy blue/green deployments.
The deployment targets include an Amazon EC2 Auto Scaling group launched on Amazon Linux 2.
The code repository contains a proven appspec.yml file.
A DevOps engineer needs to run a script that downloads and installs a license file before the replacement instances begin to handle request traffic.
To do this, the engineer decides to add a hooks section to the appspec.yml file.
Which hook should be used to run the script that downloads and installs the license file?
Show answer
Correct answer: C. BeforeInstall
This question asks about the execution order of the CodeDeploy lifecycle hooks for EC2/on-premises deployments.In a blue/green deployment, the application installation process happens after the replacement instances launch but before they receive traffic.
The BeforeInstall hook runs before the new application version is installed, making it the ideal place to download and install the license file.
AfterBlockTraffic and BeforeBlockTraffic run around the point at which traffic is deregistered from existing instances, and do not fit this purpose.
DownloadBundle is a reserved event managed by the CodeDeploy agent, and you cannot specify a user script for it.
Accurately understanding the execution order of the hooks is the key exam takeaway.
AWS CodeDeploy AppSpec “hooks” section
Q3AWS Certified Devops Engineer Professional
Q3. A logistics company manages its AWS accounts and resources using a combination of AWS Organizations, AWS Control Tower, AWS Config, and Terraform.
The company needs to ensure that users in member accounts can deploy only AWS Lambda functions that are connected to a VPC.
Which solution meets this requirement with the least operational overhead?
Show answer
Correct answer: D. Create a new SCP with a condition that denies the creation of Lambda functions when lambda:VpcIds is null.
The requirement is to allow only VPC-connected Lambda functions with the least operational overhead.If you set a Null condition on lambda:VpcIds in a service control policy (SCP) to deny Lambda creation when there is no VPC connection, you can enforce it automatically and preventively across all member accounts, eliminating the need for manual remediation.
A custom AWS Config rule is detective; it cannot prevent the creation of non-compliant resources and requires after-the-fact remediation.
Control Tower proactive controls require building CloudFormation Hooks, which increases operational overhead.
Specifying allowed values is also an option, but a blanket deny based on a Null check is simpler and more reliable.
Keep in mind that SCPs are effective for preventive governance.
Service control policies (SCPs)
Q4AWS Certified Devops Engineer Professional
Q4. A DevOps engineer at an insurance company uses AWS Control Tower to operate multiple AWS accounts that support business, technical, and administrative departments.
The security team has asked the engineer to automate AWS Control Tower guardrails across the entire company.
The guardrails must be applied to all accounts under an OU in AWS Organizations.
The security team wants a solution that provides version control capabilities.
Being able to review versions and roll back as needed is also a requirement.
The solution must be managed within the security team’s own OU.
The security team wants to specify for themselves which types of guardrails are permitted.
They also want only new guardrails that they have approved to be applied.
Which solution meets these requirements in the most operationally efficient way?
Show answer
Correct answer: C. Create a separate AWS CloudFormation template for each required guardrail. Store the templates in an AWS CodeConnections-compatible Git repository. Define an AWS::ControlTower::EnableControl logical resource in the template for each OU in the organization. Configure an AWS CodePipeline pipeline in the security team’s account, and set up an Amazon EventBridge rule that starts the pipeline when a merge to the security team’s Git repository occurs.
The requirement is to automate Control Tower guardrails with version control, review, rollback, and approval governance, all at minimal operational overhead.By templating each guardrail as an AWS::ControlTower::EnableControl resource in CloudFormation and managing it in a CodeConnections-compatible Git repository, you can achieve version control, change review, and rollback with a standard Git workflow.
By targeting EnableControl at the OU level, you can apply it consistently to all accounts under that OU.
Furthermore, if EventBridge detects a merge to the repository and starts CodePipeline, only approved changes are deployed automatically.
Options that lack a pipeline and approval flow, or that use manual starts and account-level configuration, incur higher overhead.
The option that uses S3 as the source has no version-control or approval mechanism like Git.
A GitOps-style configuration is the most efficient.
About AWS Control Tower controls (guardrails)
Q5AWS Certified Devops Engineer Professional
Q5. A travel booking service company is about to deploy a new application that runs on Amazon EC2 instances.
The company needs a solution that can query both the application logs and the API activity of the AWS account.
Which solution meets these requirements?
Show answer
Correct answer: B. Use the Amazon CloudWatch agent to send logs from the EC2 instances to Amazon CloudWatch Logs. Configure AWS CloudTrail to deliver API logs to CloudWatch Logs. Query both log sets with CloudWatch Logs Insights.
The requirement is to query both the application logs and the AWS account’s API activity.The CloudWatch agent can send logs to CloudWatch Logs, and CloudTrail can also deliver API logs to CloudWatch Logs, so you can query both together with CloudWatch Logs Insights.
Because the CloudWatch agent cannot send logs directly to S3, a configuration that sends directly from the agent to S3 does not work.
A configuration that loads data into Redshift via Kinesis requires routing the data through an intermediary and has higher operational overhead.
Consolidating the log destination into CloudWatch Logs and analyzing with Logs Insights is the standard minimal-configuration pattern.
Analyzing log data with CloudWatch Logs Insights
Q6AWS Certified Devops Engineer Professional
Q6. A game streaming company uses an Amazon Aurora cluster as the data store for its application.
This Aurora cluster consists of a single DB instance only.
The application uses the cluster’s instance endpoint to read from and write to the database.
The company plans to apply updates to the cluster during an upcoming maintenance window.
During the maintenance window, the cluster must remain available with as little disruption as possible.
What should the DevOps engineer do to meet these requirements?
Show answer
Correct answer: C. Enable the Multi-AZ option on the Aurora cluster. Update the application to use the Aurora cluster endpoint for write operations and the Aurora cluster’s reader endpoint for reads.
The requirement is to keep the Aurora cluster available with as little disruption as possible during maintenance.If you enable Multi-AZ and place a standby (reader) instance in a different Availability Zone, failover during maintenance can minimize disruption.
Writes are directed to the cluster endpoint (primary), and reads to the reader endpoint.
With a single-instance configuration, an outage occurs during maintenance.
A configuration that mixes reads and writes on a custom ANY endpoint is not appropriate given Aurora’s characteristic that writes are limited to the primary.
Adding a replica for redundancy is the key point for improving availability.
High availability for Amazon Aurora
Q7AWS Certified Devops Engineer Professional
Q7. A healthcare organization uses AWS Key Management Service (AWS KMS) keys with manual key rotation to meet regulatory compliance requirements.
The security team wants to be notified if any key has not been rotated in more than 90 days.
Which solution achieves this?
Show answer
Correct answer: C. Develop a custom AWS Config rule that publishes to an Amazon Simple Notification Service (Amazon SNS) topic when a key becomes older than 90 days.
The requirement is to be notified when a KMS key has not been rotated for 90 days.A custom AWS Config rule can evaluate the number of days since a key’s last rotation and publish to an Amazon SNS topic when it exceeds 90 days, providing continuous compliance monitoring and notification.
KMS itself does not have a feature to notify SNS based on elapsed days.
Trusted Advisor does not provide a check that evaluates key rotation deadlines.
Security Hub is useful for aggregated security findings, but it does not directly perform an arbitrary 90-day rotation evaluation.
Keep in mind that a custom AWS Config rule is suited to continuous evaluation of custom requirements.
Evaluating resources with AWS Config rules
Q8AWS Certified Devops Engineer Professional
Q8. A media company runs applications on both Windows and Linux Amazon EC2 instances.
These instances run across multiple Availability Zones within an AWS Region.
Each application uses an Auto Scaling group.
The company needs a durable storage solution for the instances.
The solution must provide SMB for Windows and NFS for Linux.
It must also provide sub-millisecond latency.
All instances read and write data.
Which combination of steps meets these requirements? (Choose three.)
Show answer
Correct answer: A, B, D
The requirement is durable shared storage that provides SMB for Windows and NFS for Linux, with all instances reading and writing.A Multi-AZ Amazon FSx for NetApp ONTAP configuration supports both the SMB and NFS protocols and provides sub-millisecond low latency and high availability.
For Linux, use Amazon EFS with Multi-AZ mount targets alongside it to ensure concurrent NFS access and durability.
Updating the user data in each application’s launch template lets new instances launched by Auto Scaling automatically mount the file system.
gp3 EBS is not suitable for shared file access from multiple instances.
Instance refresh and individually updating mounts are not required to automate this requirement.
Keep in mind the selection criteria for shared file storage based on the use case.
What is Amazon FSx for NetApp ONTAP
Q9AWS Certified Devops Engineer Professional
Q9. A fintech company uses an AWS Organizations organization to manage multiple AWS accounts.
The company needs a solution that detects sensitive information in Amazon S3 buckets across all accounts.
When sensitive data is detected, all findings must be aggregated so that the company’s security officer can review them in a single location.
It must also move S3 objects that contain sensitive information to an S3 bucket used for quarantine.
Which solution meets these requirements with the least operational overhead? (Choose two.)
Show answer
Correct answer: A, C
The requirement is to detect sensitive information in S3 across the organization, aggregate the findings centrally, and quarantine the relevant objects, all at minimal operational overhead.Enabling Amazon Macie at the organization level automatically scans S3 across all accounts and Regions and uses machine learning to detect sensitive data such as PII.
Aggregating Macie’s findings into AWS Security Hub lets the security officer review them from a single dashboard.
Furthermore, using an EventBridge rule to trigger a Lambda function on a Macie finding, copying the target object to a quarantine S3 bucket and deleting the original, automates remediation as well.
Building custom detection logic is more complex, and an SCP cannot inspect or move data, making it inappropriate.
Keep in mind the standard configuration of Macie, Security Hub, and EventBridge integration.
What is Amazon Macie
Q10AWS Certified Devops Engineer Professional
Q10. A DevOps engineer is creating an AWS CloudFormation template that deploys a web service.
The web service runs on Amazon EC2 instances in a private subnet behind an Application Load Balancer (ALB).
The service must be able to accept requests from clients that have IPv6 addresses.
What should be done in the CloudFormation template to allow IPv6 clients to access the web service?
Show answer
Correct answer: D. Add an IPv6 CIDR block to the VPC and subnets used by the ALB. Create a listener on port 443, and specify the dualstack IP address type for the ALB. Create a target group, register the EC2 instances, and associate the target group with the ALB.
The requirement is to operate the private-subnet EC2 instances behind an ALB while accepting requests from IPv6 clients.If you add an IPv6 CIDR block to the VPC and the ALB’s subnets and set the ALB’s IP address type to dualstack, the ALB can accept requests over both IPv4 and IPv6 and forward them to the EC2 instances via the target group.
The ALB supports IPv6 termination and forwards to the backend over IPv4, so there is no need to assign IPv6 to the EC2 instances themselves.
You cannot assign an Elastic IP to an ALB.
Replacing it with an NLB is unnecessary for this requirement; the ALB’s dualstack support is sufficient.
The key point is IPv6 support through the load balancer’s dualstack setting.
About Application Load Balancers
