Master the basics of deploying applications with AWS CodeDeploy through this curated list of AWS CodeDeploy MCQ questions and answers. This guide focuses on setting up your CodeDeploy environment, including IAM configuration, CodeDeploy agent installation, and preparing deployment targets. Improve your knowledge of automated deployments in AWS with these multiple-choice questions.
MCQs
Prerequisites and IAM Configuration
What is the primary purpose of AWS CodeDeploy? a) Managing IAM policies b) Automating application deployments c) Creating S3 buckets d) Managing databases
Which IAM entity is mandatory for AWS CodeDeploy to function? a) IAM Role b) IAM Group c) IAM Policy d) IAM User
What permissions are required for the CodeDeploy service role? a) Full access to all AWS services b) Permissions to interact with deployment targets c) Permissions to create S3 buckets d) None
Which AWS service is commonly used to store deployment artifacts? a) Amazon S3 b) AWS Lambda c) Amazon EC2 d) AWS CloudTrail
What type of policy is attached to the service role in CodeDeploy? a) Inline policy b) Managed policy c) Session policy d) Organizational policy
What is the purpose of the “Trust Relationship” in the IAM role for CodeDeploy? a) To grant access to EC2 instances b) To allow CodeDeploy to assume the role c) To manage pipeline stages d) To enable multi-factor authentication
Which tool can be used to create IAM roles for CodeDeploy? a) AWS CLI b) AWS Management Console c) AWS CloudFormation d) All of the above
Installing and Configuring the CodeDeploy Agent
What is the function of the CodeDeploy agent? a) Managing IAM roles b) Executing deployment tasks on target instances c) Monitoring pipeline executions d) Automating database backups
Which operating systems are supported by the CodeDeploy agent? a) Windows b) Linux c) Both Windows and Linux d) Only macOS
How can the CodeDeploy agent be installed on EC2 instances? a) Using AWS CLI commands b) Through CloudFormation templates c) Manually downloading and installing d) All of the above
Which command checks the status of the CodeDeploy agent? a) codedeploy-agent check b) service codedeploy-agent status c) aws deploy status d) agentctl status
What happens if the CodeDeploy agent is not running on a target instance? a) Deployments will fail for that instance b) The pipeline will skip that stage c) The deployment will complete with warnings d) The instance will be terminated
Where are CodeDeploy agent logs typically stored? a) /var/log/codedeploy-agent b) /opt/aws/logs c) /home/ec2-user/codedeploy d) /etc/codedeploy/logs
How can you update the CodeDeploy agent? a) Using AWS CLI b) Reinstalling the agent c) Through AWS Systems Manager d) Any of the above
What is the default port used by the CodeDeploy agent? a) 22 b) 80 c) 443 d) 8080
Preparing Deployment Targets
Which type of instance is commonly used as a deployment target? a) Amazon RDS instance b) Amazon EC2 instance c) AWS Lambda function d) Amazon S3 bucket
What is a key prerequisite for deployment targets? a) Instances must have the CodeDeploy agent installed and running b) Instances must be part of a load balancer c) Instances must be in a private subnet d) Instances must have an EBS volume attached
What is a deployment group in AWS CodeDeploy? a) A collection of IAM roles b) A set of deployment rules c) A group of instances or targets for a deployment d) A set of S3 buckets
How can deployment targets be identified? a) Using instance IDs b) By specifying Auto Scaling groups c) Through tag-based identification d) All of the above
What is the purpose of tag-based identification in CodeDeploy? a) To organize S3 buckets b) To select target instances based on tags c) To monitor deployments d) To manage IAM roles
Which protocol is used to communicate with the CodeDeploy agent? a) HTTP b) HTTPS c) FTP d) SSH
What is a common use case for deployment configurations? a) Rolling updates b) Blue/green deployments c) Canary deployments d) All of the above
What is the purpose of a “Minimum Healthy Hosts” setting? a) To specify the minimum number of healthy instances required during a deployment b) To define the backup configuration for targets c) To monitor instance performance d) To configure agent logs
How can you test deployment targets before deploying? a) Running a pre-deployment test script b) Verifying instance connectivity c) Ensuring the CodeDeploy agent is running d) All of the above
What tool can be used to automate the preparation of deployment targets? a) AWS Systems Manager b) AWS CloudTrail c) AWS Cost Explorer d) Amazon QuickSight
Answer Key
Qno
Answer
1
b) Automating application deployments
2
a) IAM Role
3
b) Permissions to interact with deployment targets
4
a) Amazon S3
5
b) Managed policy
6
b) To allow CodeDeploy to assume the role
7
d) All of the above
8
b) Executing deployment tasks on target instances
9
c) Both Windows and Linux
10
d) All of the above
11
b) service codedeploy-agent status
12
a) Deployments will fail for that instance
13
a) /var/log/codedeploy-agent
14
d) Any of the above
15
c) 443
16
b) Amazon EC2 instance
17
a) Instances must have the CodeDeploy agent installed and running
18
c) A group of instances or targets for a deployment
19
d) All of the above
20
b) To select target instances based on tags
21
b) HTTPS
22
d) All of the above
23
a) To specify the minimum number of healthy instances required during a deployment