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.
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.
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.
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.
AA. An Amazon Data Lifecycle Manager policy
BB. An AWS CloudFormation stack built from a saved template
CC. The AWS Command Line Interface (AWS CLI)
DD. AWS Trusted Advisor recommendations for the account
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.
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 →