Cloud Technology and Services · Topic 1 of 11
Deploying and Operating in AWS
Learn the ways to access AWS (console, CLI, SDKs, APIs), infrastructure as code, cloud, hybrid and on premises models, and the tools used to operate.
- 4 min
- The console, CLI, SDKs and APIs are the main ways to access AWS. All use the AWS API underneath.
- Programmatic access needs access keys or temporary credentials from a role.
- CloudShell is a browser shell with the CLI already set up.
What it is
There are several ways to create and manage AWS resources. You can click through a web page, type commands, write code, or describe the whole environment in a template.
The exam asks you to pick the method that fits a task, and to recognise the three deployment models: cloud, hybrid and on premises.
It also expects you to know the difference between a one time action and a repeatable process.
How it works
Ways to access AWS
| Method | What it is | Good for |
|---|---|---|
| AWS Management Console | Web interface | Learning, exploring, one time tasks |
| AWS Command Line Interface (CLI) | Commands typed in a terminal | Scripts and quick repeatable tasks |
| Software development kits (SDKs) | Libraries for languages such as Python or Java | Applications that call AWS |
| AWS application programming interfaces (APIs) | The underlying web requests | The base that all other methods use |
| AWS CloudShell | A browser based shell with the CLI ready | Running commands without installing anything |
Every method ends up calling the same AWS APIs. Using the CLI or an SDK is called programmatic access, and it needs credentials such as access keys or a role.
An example of the AWS CLI listing your Amazon Simple Storage Service (S3) buckets:
aws s3 ls
Another example, listing virtual servers in a chosen Region:
aws ec2 describe-instances --region us-east-1
Infrastructure as code
Infrastructure as code (IaC) means defining your resources in text files and letting a tool build them. The same file creates the same environment every time.
AWS CloudFormation reads a template written in JSON (JavaScript Object Notation) or YAML (YAML Ain't Markup Language) and creates a stack, which is the group of resources the template describes. This small YAML template creates one S3 bucket.
Resources:
MyBucket:
Type: AWS::S3::Bucket
The AWS Cloud Development Kit (CDK) lets you describe the same infrastructure in a programming language, and it produces CloudFormation templates.
IaC makes environments repeatable, reviewable and easy to delete. It also lowers human error compared with clicking through the console.
Easier ways to deploy applications
AWS Elastic Beanstalk lets you upload application code while it handles capacity, load balancing and scaling. You still own the resources it creates.
Deployment models
| Model | Where resources run |
|---|---|
| Cloud | Entirely in AWS |
| On premises | Entirely in your own data center, also called a private cloud |
| Hybrid | A mix of AWS and your own data center, connected together |
Hybrid is common when a company moves in stages or must keep some data on site. AWS Direct Connect, AWS Site-to-Site virtual private network (VPN) and AWS Storage Gateway connect or extend on premises systems. AWS Outposts places AWS infrastructure inside your own data center.
Operating the environment
Deploying is the start. Day to day operation includes monitoring, patching and keeping a record of changes.
- Amazon CloudWatch collects metrics and logs and raises alarms.
- AWS Systems Manager helps you operate many servers at once, such as running commands and applying patches.
- AWS Service Catalog lets an organisation offer a list of approved products that teams can launch.
One time operations and repeatable processes
A one time task, such as testing an idea, suits the console. A process you will do again, such as building a test environment each week, should be scripted or defined in a template.
What to remember for the exam
- The console, CLI, SDKs and APIs are the main ways to access AWS. All use the AWS API underneath.
- Programmatic access needs access keys or temporary credentials from a role.
- CloudShell is a browser shell with the CLI already set up.
- CloudFormation builds resources from a JSON or YAML template. The CDK uses programming languages.
- Infrastructure as code gives repeatable, consistent and reviewable environments.
- Hybrid means AWS plus on premises resources working together.
- Elastic Beanstalk deploys an application while it manages the supporting infrastructure.
- Systems Manager operates and patches many servers. CloudWatch watches them.
"Repeatable", "consistent" and "template" in a question point to CloudFormation. "Run a command without installing anything" points to CloudShell.
Common mistakes
Using the console for repeated work. Manual clicks are slow and hard to repeat, which is the reason IaC exists.
Confusing the CDK and CloudFormation. The CDK is a way to write infrastructure in code, and it creates CloudFormation templates.
Treating hybrid as a failed migration. Hybrid is a normal and supported model.
Thinking the CLI needs no credentials. It needs a configured identity, just like any other programmatic access.
Elastic Beanstalk is not serverless. It creates real resources such as Elastic Compute Cloud (EC2) instances in your account that you can still see.
Check yourself
Which service creates AWS resources from a JSON or YAML template?
AWS CloudFormation.
What is a hybrid deployment?
A mix of AWS resources and on premises resources connected together.
Which tool gives a browser based shell with the AWS CLI ready to use?
AWS CloudShell.
Topic 1 of 11 in Cloud Technology and Services
Test yourself on Cloud Technology and Services
The full AWS CLF-C02 question bank has 832 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.