AWS Certified DevOps Engineer Professional Sample Questions

  1. Home
  2. AWS Certified DevOps Engineer Professional Sample Questions
AWS Certified DevOps Engineer Professional Sample Questions

The purpose of the AWS Certified DevOps Engineer Professional certification exam is to verify a candidate’s technical proficiency in setting up, running, and overseeing distributed application systems on the AWS platform. The article provides a list of AWS Certified DevOps Engineer Professional Sample Questions that cover core exam topics including –

Advanced Sample Questions

What is the primary difference between an EC2 instance and an EC2 Spot Instance?

  • A. EC2 instances are always available while EC2 Spot Instances are only available when demand is low.
  • B. EC2 instances are on-demand while EC2 Spot Instances are reserved.
  • C. EC2 instances are reserved while EC2 Spot Instances are on-demand.
  • D. EC2 instances are always available while EC2 Spot Instances are only available when demand is high.

Answer: A. 

Explanation: EC2 instances are always available while EC2 Spot Instances are only available when demand is low and are therefore often significantly cheaper. They are suitable for applications that are fault-tolerant and can be interrupted.

Which of the following is a method for configuring Auto Scaling on an EC2 instance?

  • A. Using an Amazon Machine Image (AMI)
  • B. Using EC2 Launch Templates
  • C. Using EC2 user data
  • D. All of the above

Answer: D.

Explanation: All of the above are methods for configuring Auto Scaling on an EC2 instance. The method that is best suited will depend on the specific needs and requirements of the application being scaled.

Which of the following is the most important factor in deciding when to trigger a scaling policy in an Auto Scaling group?

  • A. The number of requests being processed
  • B. The average latency of requests
  • C. The average CPU utilization
  • D. The number of active instances in the group

Answer: C. 

Explanation: The average CPU utilization is the most important factor in deciding when to trigger a scaling policy in an Auto Scaling group. High CPU utilization indicates that the existing instances are not able to handle the load and that additional instances are required to maintain application performance.

What is the primary advantage of using EC2 Auto Scaling over manual scaling?

  • A. EC2 Auto Scaling is more cost-effective
  • B. EC2 Auto Scaling is more reliable
  • C. EC2 Auto Scaling is more scalable
  • D. EC2 Auto Scaling is more efficient

Answer: D. 

Explanation: EC2 Auto Scaling is more efficient than manual scaling as it can automatically adjust the number of instances in response to changes in demand. This eliminates the need for manual intervention and ensures that resources are available when they are needed, improving application performance and reducing downtime.

What is the primary function of the Amazon CloudWatch Logs service?

  • A. To monitor EC2 instances
  • B. To store log files
  • C. To analyze log data
  • D. To aggregate log data

Answer: D. 

Explanation: The primary function of the Amazon CloudWatch Logs service is to aggregate log data from multiple sources, such as EC2 instances, and to make it easier to search and analyze log data. This can be useful for troubleshooting and performance optimization, as well as for compliance and security purposes.

What is the primary purpose of the AWS CloudFormation service?

  • A. To manage EC2 instances
  • B. To store and manage templates
  • C. To automate infrastructure deployment
  • D. To manage resource access

Answer: C.

Explanation: The primary purpose of the AWS CloudFormation service is to automate infrastructure deployment. This includes creating and updating resources such as EC2 instances, RDS databases, and S3 buckets. CloudFormation templates provide a simple way to describe the desired infrastructure and automate the deployment process.

What is the primary benefit of using AWS CodePipeline for software development and delivery?

  • A. Increased collaboration
  • B. Automated deployment
  • C. Improved performance
  • D. Enhanced security

Answer: B. 

Explanation: The primary benefit of using AWS CodePipeline for software development and delivery is automated deployment. CodePipeline automates the build, test, and deployment phases of the software development lifecycle, eliminating manual errors and reducing the time to market.

What is the primary use case for AWS Lambda?

  • A. To run applications
  • B. To execute scripts
  • C. To run background jobs
  • D. To run microservices

Answer: D. 

Explanation: The primary use case for AWS Lambda is to run microservices. Lambda is a serverless computing platform that enables developers to run small, self-contained units of code without having to provision or manage servers. This makes it ideal for running microservices, where only a small amount of computing resources are required for each request.

What is the primary benefit of using AWS Elastic Beanstalk for web application hosting?

  • A. Scalability
  • B. Cost savings
  • C. Easy deployment
  • D. Improved security

Answer: C. 

Explanation: The primary benefit of using AWS Elastic Beanstalk for web application hosting is easy deployment. Elastic Beanstalk is a fully managed platform for deploying, managing, and scaling web applications. With Elastic Beanstalk, developers can simply upload their application code and Elastic Beanstalk will handle the deployment and management of the underlying infrastructure.

What is the primary use case for AWS CloudTrail?

  • A. To monitor EC2 instances
  • B. To store log files
  • C. To monitor AWS resource activity
  • D. To analyze log data

Answer: C. 

Explanation: The primary use case for AWS CloudTrail is to monitor AWS resource activity. CloudTrail is a service that provides a unified log of all AWS resource activity, making it easy to track changes to resources and identify security threats. This information can be used to improve security and compliance, as well as to troubleshoot issues and optimize performance.

Basic Sample Questions

Q1) What does a circular dependency mean in AWS CloudFormation?

  • A.When a Template makes a reference to a previous iteration of itself.
  • B. When Nested Stacks are interdependent.
  • C. When a DependOn loop forms between Resources.
  • D. When a Template mentions a region, and the original Template is referenced.

Correct Answer: C

Explanation: Add a DependsOn attribute to resources in your template that depend on other resources to fix a dependency error. When necessary, dependencies must be explicitly declared so that AWS CloudFormation can construct or delete resources in the proper sequence. The Elastic IP must be dependent on the Internet gateway attachment, for instance, if you build an Elastic IP and a VPC with an Internet gateway in the same stack. See DependsOn Attribute for more details.

Refer: Troubleshooting CloudFormation

Q2) Regarding AWS CloudFormation, which of the following claims is accurate?

  • A. Custom resources using SNS have a default timeout of 3 minutes.
  • B. Custom resources using SNS do not need a <code>ServiceToken</code> property.
  • C. Custom resources using Lambda and <code>Code.ZipFile</code> allow inline nodejs resource composition.
  • D. Custom resources using Lambda do not need a <code>ServiceToken</code>property

Correct Answer: C

Explanation:The AWS::Lambda::Function resource has a property called Code that allows you to specify the source code for an AWS Lambda (Lambda) function. You can specify your source code as inline text or point to a file in an Amazon Simple Storage Service (Amazon S3) bucket (for nodejs runtime environments only).

Refer: What is AWS CloudFormation?

Q3) Which of the following claims is true in terms of compliance and security?

  • A. Access keys for AWS IAM Users never need to be rotated.
  • B. Neither AWS IAM Users nor AWS IAM Roles ever require you to rotate access keys.
  • C. None of the other claims are accurate.
  • D. Access keys for AWS IAM Roles never need to be rotated.

Correct Answer: D

Explanation: You do not need to rotate IAM Role Access Keys because AWS will do it on your behalf. Through the use of the security credentials linked to the role, the application is given access to the actions and resources that you have defined for the role. We automatically rotate these temporary security credentials. At least five minutes before the old credentials expire, we make fresh credentials available.

Refer: IAM roles for Amazon EC2

Q4) Which of the above parameters needs to be set in order to prevent file system damage when a user attaches an EBS volume to a new instance after detaching it from an existing one?

  • A. Unmount the volume first
  • B. Stop all the I/O of the volume before processing
  • C. Take a snapshot of the volume before detaching
  • D. Force Detach the volume to ensure that all the data stays intact

Correct Answer: A

Explanation: Users have two options when attempting to directly remove an EBS volume or end the instance. To prevent any file system harm, it is advised to first unmount the volume.

Q5) Which language cannot be used to build customised Ansible modules?

  • A. Python
  • B. C++
  • C. Bash
  • D. All of the languages listed are supported

Correct Answer: D

Explanation: Any language that can be run on the target system can be used to create Ansible modules. The module must only be able to send its results as JSON to STDOUT so that Ansible can read them.

Q6) Where in a playbook’s “vars” section should a variable that has been assigned be overridden?

  • A. Inventory group var
  • B. playbook host_vars
  • C. role defaults
  • D. extra vars

Correct Answer: D

Explanation: The additional vars command-line option has the highest precedence in Ansible’s variable precedence hierarchy.

Q7) When thinking about AWS Elastic Beanstalk, which of the following assertions is accurate?

  • A. Worker tiers pull jobs from SNS.
  • B. Worker tiers pull jobs from HTTP.
  • C. Worker tiers pull jobs from JSON.
  • D. Worker tiers pull jobs from SQS.

Correct Answer: D

Explanation:Each Amazon EC2 instance in the Auto Scaling group receives a daemon from Elastic Beanstalk that is responsible for processing Amazon SQS messages in the worker environment. Data is retrieved from the Amazon SQS queue by the daemon, which then transmits it to a user-configurable URL path on the local host by including it in the message body of an HTTP POST request. Application/json is the default content type for the message body in an HTTP POST request.

Refer: Elastic Beanstalk worker environments

Q8) How ought a playbook to be appropriately launched (in accordance with best practises)?

  • A. – hosts: all
  • B. …
  • C. ###
  • D. —

Correct Answer: D

Q9) Which of the following is the appropriate syntax to use when passing multiple variable names and values to a playbook’s command line?

  • A. ansible-playbook playbook.yml -e `host=”foo” pkg=”bar”‘
  • B. ansible-playbook playbook.yml -e `host: “foo”, pkg: “bar”‘
  • C. ansible-playbook playbook.yml -e `host=”foo”‘ -e `pkg=”bar”‘
  • D. ansible-playbook playbook.yml –extra-vars “host=foo”, “pkg=bar”

Correct Answer: A

Explanation: The command line parameter ‘-e’ or ‘—extra-vars’ is used to pass variables. They are space delimited and provided to the playbook as a single string. Variable values must be included in quotes due to the space delimeter. It is also possible to pass valid JSON or YAML, for example: ‘-e ‘”key”: “name”, “array”: [“value1”, “value2”]’.

Q10) Which deployment method, when using AWS Auto Scaling Groups and Auto Scaling Launch Configurations, provides the quickest time to live for individual servers?

  • A. Pre-baking AMIs with complete code and deployment setup.
  • B. Launching an instance while using a Dockerfile bootstrap.
  • C. Using bootstrapping scripts for UserData.
  • D. SSHing into fleets dynamically using AWS EC2 Run Commands.

Correct Answer: A

Explanation: Keep in mind that installing a complex application or a number of applications can make the bootstrapping process take longer. During rollouts, managing a fleet of applications with a variety of build tools and dependencies can be difficult. In order to benefit from auto scaling, your deployment service should be built to perform quicker rollouts. Prebaking involves integrating a sizeable percentage of your application artefacts into your basic AMI. Using EC2 instance artefacts like instance tags, instance metadata, and auto scaling groups, you can tailor application instals during the deployment process.

Q11) Which of the following statements about AWS OpsWorks is true?

  • A. Both layers and stacks have numerous levels.
  • B. Stacks and instances both have a large number of layers.
  • C. Stacks have numerous instances, and layers have many stacks.
  • D. Stacks have numerous instances, and instances have numerous layers.

Correct Answer: A

Explanation:The foundational element of AWS OpsWorks is the stack. It simply serves as a container for AWS resources like Amazon EC2 instances, Amazon RDS database instances, and more that should be logically handled together because they have a similar function. By including one or more layers, you can specify the components of the stack. A layer is a collection of Amazon EC2 instances that are used for a certain task, like hosting a database server or delivering apps. A single computing resource, like an Amazon EC2 instance, is represented by an instance.

Refer: What Is AWS OpsWorks?

Q12)What holds true for DynamoDB’s Local Secondary Key attributes?

  • A. Only one of the two keys—the sort key or the partition key—can be different from the table.
  • B. The table can only differ from the sort key.
  • C. The partition key and sort key may not match the table exactly.
  • D. The only key that can differ from the table is the partition key.

Correct Answer: B

Explanation: An index containing a partition key and a sort key that may differ from those in the table is refer to be a global secondary index. Because queries on the index can include all of the data in a database, across all partitions, it is refer to as a “global” secondary index.

Refer: Improving data access with secondary indexes

Q13) When deploying to a Docker swarm, which section of the docker-compose file contains settings for service deployment and operation?

  • A. VOLUME
  • B. USER
  • C. ADD
  • D. CMD

Correct Answer: D

Explanation: When a developer builds an image from a Dockerfile or when she commits it, the developer can set a number of default parameters that take effect when the image starts up as a container. Four of the Dockerfile commands cannot be overridden at runtime: FROM, MAINTAINER, RUN, and ADD. Everything else has a corresponding override in docker run. We’ll go through what the developer might have set in each Dockerfile instruction and how the operator can override that setting.

Q14) When deploying to a Docker swarm, which section of the docker-compose file contains settings for service deployment and operation?

  • A. services
  • B. build
  • C. deploy
  • D. args

Correct Answer: C

Q15) Which high-level language is use to define plays, tasks, and playbooks is fully supported by Ansible.

  • A. YAML
  • B. Python 
  • C. XML
  • D. JSON

Correct Answer: A

Explanation: This question may be a little deceptive. Ansible will accept plays, tasks, and playbooks in JSON because JSON is a subset of YAML, even if the Ansible Playbooks in this course are written in YAML. But YAML is the most popular and well-supported approach.

Q16) What does it mean if all of the EBS volumes connected to an active EC2 instance have 0 IOPS and a full I/O queue?

  • A. The I/O queue is buffer flushing.
  • B. Your EBS disk head(s) is/are seeking magnetic stripes.
  • C. The EBS volume is unavailable.
  • D. You need to re-mount the EBS volume in the OS.

Correct Answer: C

Explanation: This is how the EC2 and EBS SLA define “Unavailable.” Being unavailable and being available mean… When all of your attached volumes perform zero read write IO and there is pending IO in the queue for Amazon EBS.

Refer: Amazon Compute Service Level Agreement

Q17) What would be the best method for leveraging distribution-specific commands to run a single playbook across many Linux distributions?

  • A. Make fact-finding possible and adapt the distribution to the task by using the “when” conditional.
  • B. This is not feasible; a different playbook is need for each target Linux distribution.
  • C. In the tasks, use “ignore errors: true.”
  • D. Create your own checks for each command that is execute using the “shell” module.

Correct Answer: A

Q18) Which AWS CloudFormation status represents a failure state?

  • A. <code>UPDATE_COMPLETE_CLEANUP_IN_PROGRESS</code>
  • B. <code>DELETE_COMPLETE_WITH_ARTIFACTS</code>
  • C. <code>ROLLBACK_IN_PROGRESS</code>
  • D. <code>ROLLBACK_FAILED</code>

Correct Answer: D

Q19) Which of the following claims regarding the design of AWS Elastic Beanstalk is true?

  • A. Applications are deploy into a variety of contexts.
  • B. Applications and environments both have numerous deployments.
  • C. Environments and applications both have a wide variety of deployments.
  • D. Environments have multiple applications, and deployments have several environments.

Correct Answer: C

Explanation: Logic services are group by applications. Applications are a subset of environments, which often denote various deployment levels (dev, stage, prod, fo forth). Environments have deployments, which are pushes of code bundles for the environments to execute.

Refer: What is AWS Elastic Beanstalk?

Q20) What characteristics of DynamoDB’s Global Secondary Key exist?

  • A. Applications are deploy into a variety of contexts.
  • B. Applications and environments both have numerous deployments.
  • C. Environments and applications both have a wide variety of deployments.
  • D. Environments have multiple applications, and deployments have several environments.

Correct Answer: A

Explanation: An index containing a partition key and a sort key that may differ from those in the table is refer to be a global secondary index. Because queries on the index can include all of the data in a database, across all partitions, it is refer to as a “global” secondary index.

AWS Certified DevOps Engineer Professional free practice test
Menu