Course menuCLF-C02

Exams / CLF-C02 / Study guide / Deploying and operating on AWS

Deploying and operating on AWS: CLF-C02 study notes and practice questions

What to know about Deploying and operating on AWS for the CLF-C02 exam, from the Cloud Technology and Services domain (34% of the exam guide), then 2 free questions to test it. Part of the CLF-C02 study guide.

Last verified against current AWS documentation ·How we write our questions

What to know for the exam

Questions on this topic ask how people and programs access AWS, and how resources can be created repeatably.

Ways to access AWS

Method Best for
AWS Management Console Interactive work in a web browser; the AWS Console Mobile Application for quick checks on a phone
AWS CLI Commands and scripts from a terminal
AWS SDKs Calling AWS from application code in languages such as Python, Java or JavaScript
AWS CloudFormation Infrastructure as code: templates that create and update whole environments the same way every time
AWS CDK Infrastructure as code written in programming languages, which produces CloudFormation
AWS CloudShell A browser-based shell with the CLI already set up

Infrastructure as code

CloudFormation and the CDK let you describe resources in files. Benefits: environments are consistent and repeatable, changes can be reviewed and versioned, and you can delete and recreate a whole environment quickly.

Managed deployment services

  • AWS Elastic Beanstalk deploys a web application from your code and handles capacity, load balancing and health monitoring.
  • AWS Systems Manager manages and patches fleets of servers, runs commands and stores parameters.

Deployment models

Model Meaning
Cloud Everything runs in the cloud
Hybrid Some resources on premises, connected to the cloud
On premises (private cloud) Resources in your own data center, sometimes with AWS tools such as AWS Outposts

Connectivity options

The public internet, AWS Site-to-Site VPN (encrypted tunnels over the internet) and AWS Direct Connect (a private dedicated connection).

Common traps

  • Console for repeatable setups. Use CloudFormation for anything you need to recreate exactly.
  • CLI vs SDK. The CLI is for people and scripts in a terminal; SDKs are for application code.

Try the 2 practice questions

A developer is building a Node.js service.

Each time a customer places an order, the code must save a receipt to Amazon S3 and write the order to Amazon DynamoDB.

Which way of working with AWS is designed for this?

Choose one answer.

  1. A. The AWS Management Console, opened in a web browser for each order
  2. B. An AWS SDK for JavaScript, called from the service's own code
  3. C. An AWS CloudFormation template that creates the bucket and the table
  4. D. AWS Trusted Advisor recommendations for the account
Show the answer and explanation

Answer: B

  • A. Wrong: The console is a web interface for people to use by hand. Application code cannot use it to save receipts or write orders on every purchase.
  • B. Right: Correct. The AWS SDKs are language-specific libraries that let application code call AWS APIs directly, so each order can save a receipt and write to DynamoDB. Learn more: What is covered in the AWS SDKs and Tools Reference Guide (opens in a new tab)
  • C. Wrong: CloudFormation creates and updates infrastructure from templates. It runs when stacks are deployed, not on every order at runtime.
  • D. Wrong: Trusted Advisor gives best-practice recommendations about the account. It does not give application code a way to call AWS services.

Explanation

AWS offers several ways to work with its services. The console suits people doing interactive tasks, the AWS CLI suits scripts, and CloudFormation suits repeatable infrastructure. The AWS SDKs let application code call AWS APIs from its own runtime logic, which is what this service needs.

Study

Each week an administrator repeats 20 steps in the AWS Management Console: she takes snapshots of several Amazon EBS volumes, tags them and deletes old snapshots.

She wants a shell script on a Linux server to run these steps on a schedule, without writing an application.

What should she use?

Choose one answer.

  1. A. An Amazon Data Lifecycle Manager policy
  2. B. An AWS CloudFormation stack built from a saved template
  3. C. The AWS Command Line Interface (AWS CLI)
  4. D. AWS Trusted Advisor recommendations for the account
Show the answer and explanation

Answer: C

  • A. Wrong: Data Lifecycle Manager automates the creation, retention and deletion of EBS snapshots and EBS-backed AMIs. It cannot run her other steps or her own script. Learn more: Amazon Data Lifecycle Manager for Amazon EBS snapshots (opens in a new tab)
  • B. Wrong: CloudFormation creates and updates stacks of resources from templates. It is not designed for a script that takes snapshots and tidies up old resources on a schedule.
  • C. Right: Correct. The AWS CLI runs AWS commands from a shell, so a script can take snapshots, tag them and delete old ones. A scheduler such as cron can run that script each week.
  • D. Wrong: Trusted Advisor recommends best practices and does not run administration tasks. It cannot take snapshots or tidy up resources.

Explanation

The AWS CLI runs the same kinds of operations as the console from a shell script, so the administrator can automate the snapshots, tags and clean-up. Data Lifecycle Manager automates only EBS snapshot and AMI retention, CloudFormation provisions resources from templates, and Trusted Advisor gives recommendations.

Study

Want more on Deploying and operating on AWS? The 5 full-length practice sets have 10 more Deploying and operating on AWS questions, 325 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets

Study Deploying and operating on AWS

More Cloud Technology and Services topics