DevOps Automation Tools & Scripting Techniques Flashcards
7 cards from real AWS practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 DevOps Automation Tools & Scripting Techniques flashcards as text
A DevOps engineer wants to validate a CloudFormation template for syntax errors before deploying it. Which AWS CLI command performs this check?
Answer: aws cloudformation validate-template --template-body file://template.yml
aws cloudformation validate-template checks the template for JSON/YAML syntax errors and CloudFormation-specific structural issues without deploying resources.
In AWS Step Functions, which state type is used to pause execution for a specific duration or until a specific timestamp before continuing?
Answer: Wait state
The Wait state suspends workflow execution for a specified number of seconds or until an absolute timestamp without consuming compute resources during the pause.
A team wants to enforce coding standards in their Python Lambda functions by running flake8 as part of the CI pipeline. Where in a CodeBuild buildspec.yml should this linting step run?
Answer: pre_build phase
Linting in pre_build runs code quality checks before the main build process, allowing the build to fail fast if code standards are not met.
A CloudFormation StackSet is used to deploy resources across 10 AWS accounts. The team wants at most 3 accounts to be updated simultaneously. Which parameter controls this?
Answer: --operation-preferences MaxConcurrentCount=3
--operation-preferences with MaxConcurrentCount=3 limits StackSet deployment parallelism so only 3 accounts are updated at any given time.
Which technique allows an AWS CodeDeploy blue/green deployment to automatically shift 10% of traffic to the new version, monitor for 10 minutes, then shift the remaining 90%?
Answer: Use a CodeDeploy deployment configuration with a Linear10PercentEvery10Minutes predefined configuration
CodeDeploy's Linear10PercentEvery10Minutes predefined deployment configuration incrementally shifts traffic in 10% blocks every 10 minutes for controlled rollouts.
A developer uses jq in a bash script to extract the InstanceId from the JSON output of aws ec2 describe-instances. Which jq expression correctly extracts the first instance ID?
Answer: .Reservations[0].Instances[0].InstanceId
The EC2 describe-instances response nests instances under Reservations arrays, so the correct path traverses Reservations[0].Instances[0].InstanceId.
When using AWS CDK, what is the purpose of the cdk.context.json file generated after running CDK commands?
Answer: It caches context lookups like VPC IDs and AMI IDs to avoid repeated API calls
cdk.context.json caches results of context lookups (VPC IDs, AZs, AMIs) so CDK does not make live AWS API calls on every synth, enabling reproducible builds.