AWS Deployment and Management 5 — Questions and Answers
Question 1: In AWS CodePipeline, which artifact store type is used by default to pass artifacts between stages?
- Amazon EFS
- Amazon S3 (Correct answer)
- Amazon DynamoDB
- AWS CodeArtifact
Correct answer: Amazon S3
CodePipeline uses an Amazon S3 bucket as its default artifact store to pass source code, build outputs, and other artifacts between pipeline stages.
Question 2: Which AWS CloudFormation resource type allows you to run custom provisioning logic using Lambda functions during stack operations?
- AWS::CloudFormation::WaitCondition
- AWS::CloudFormation::CustomResource (Correct answer)
- AWS::CloudFormation::Stack
- AWS::CloudFormation::Macro
Correct answer: AWS::CloudFormation::CustomResource
AWS::CloudFormation::CustomResource (or Custom::*) invokes a Lambda function or SNS topic to perform custom provisioning logic not natively supported by CloudFormation.
Question 3: A company needs to ensure that all EC2 instances launched in their AWS account have a specific tag applied. Which service and feature enforces this?
- AWS Config with required-tags managed rule (Correct answer)
- AWS CloudTrail with tag validation
- AWS Trusted Advisor tag checker
- AWS Systems Manager Tag Manager
Correct answer: AWS Config with required-tags managed rule
AWS Config's required-tags managed rule continuously checks resources and flags non-compliant instances that are missing specified tags.
Question 4: What does the buildspec.yml file define in an AWS CodeBuild project?
- IAM permissions for the CodeBuild service role
- The sequence of commands and settings for the build process (Correct answer)
- The deployment configuration for CodeDeploy integration
- The source repository connection settings
Correct answer: The sequence of commands and settings for the build process
The buildspec.yml file is a collection of build commands and settings, organized into phases (install, pre_build, build, post_build), that CodeBuild uses to run a build.
Question 5: A solutions architect needs to deploy identical infrastructure across 15 AWS accounts in 3 regions. Which service is most appropriate?
- AWS CloudFormation nested stacks
- AWS CloudFormation StackSets (Correct answer)
- AWS Service Catalog
- AWS Control Tower customizations
Correct answer: AWS CloudFormation StackSets
CloudFormation StackSets enables deploying a single CloudFormation template across multiple accounts and regions in a single operation.
Question 6: Which lifecycle hook in AWS CodeDeploy runs validation tests AFTER traffic has been shifted to a new deployment but BEFORE the old instances are terminated?
- BeforeInstall
- AfterInstall
- BeforeAllowTraffic
- AfterAllowTraffic (Correct answer)
Correct answer: AfterAllowTraffic
The AfterAllowTraffic hook runs after traffic is routed to the replacement instances, allowing validation tests before the original instances are deregistered and terminated.
Question 7: A team wants AWS Elastic Beanstalk to automatically apply operating system and platform updates during a maintenance window. Which feature provides this?
- Scheduled Actions in Auto Scaling
- Managed Platform Updates (Correct answer)
- Rolling deployment with health checks
- Blue/Green environment swap
Correct answer: Managed Platform Updates
Elastic Beanstalk Managed Platform Updates automatically applies platform and OS patches during a weekly maintenance window you configure.
In AWS CodePipeline, which artifact store type is used by default to pass artifacts between stages?