Ways to use AWS: console, CLI, SDKs, infrastructure as code

How you talk to AWS, from the Management Console, CLI, SDKs and CloudShell to infrastructure as code with CloudFormation and the CDK, and how your network reaches AWS.

GazeekAWS CLOUD PRACTITIONER·LESSON 14
LESSON 14

Ways to use AWS: console, CLI, SDKs, infrastructure as code

How you talk to AWS, from the Management Console, CLI, SDKs and CloudShell to infrastructure as code with CloudFormation and the CDK, and how your network reaches AWS.

0:00 / 5:08

After this lesson you can

  • Explain that the console, CLI and SDKs all call the same AWS APIs
  • Describe the AWS Management Console, AWS CLI, AWS SDKs and AWS CloudShell
  • Explain infrastructure as code with AWS CloudFormation and the AWS CDK
  • Choose between one-off operations and repeatable processes
  • Name the ways to connect to AWS - the public internet, AWS Site-to-Site VPN and AWS Direct Connect
Transcript

Ways to use AWS: console, CLI, SDKs, infrastructure as code

G'day mate. Space Llama here. Domain three, Cloud Technology and Services, is the biggest part of the exam. About a third of it. We start with the basics. How do you actually tell AWS to do something? We'll cover the console, the command line, the SDKs and CloudShell. Then infrastructure as code, with CloudFormation and the CDK. And finally, how your own network reaches AWS in the first place.

Everything is an API call

Here's the secret that makes the rest of this easy. Every AWS service is driven by an API, an application programming interface. When you launch a server, something sends a request to the EC2 API. The console, the CLI and the SDKs are just different ways of sending those requests. Each request is signed with your credentials, so AWS knows who's asking. And IAM, which you met in domain two, decides whether that call is allowed.

The AWS Management Console

The AWS Management Console is the website you sign in to. It's a web interface that runs in your browser. Nothing to install. It's the best place to learn and explore. You can see everything a service offers. But it's point and click, one task at a time. Build something in forty clicks, and nobody can repeat it exactly. Including you, next Tuesday.

Command line and code

The AWS Command Line Interface, or CLI, lets you run AWS commands in a terminal. One command can do the work of ten clicks. AWS CloudShell is a browser-based shell that you open right from the console. It's already signed in as you, with the CLI installed. Nothing to set up on your laptop. The AWS SDKs are libraries for programming languages like Python, Java and JavaScript. Your application uses them to call AWS directly. Say, to save a file to Amazon S3. All three are scriptable, so a task can be repeated the same way every time.

Infrastructure as code

Infrastructure as code takes this one step further. Instead of giving commands, you describe the resources you want in a template. AWS CloudFormation reads that template, written in JSON or YAML. It builds everything together as a stack, in the right order. Delete the stack, and it all goes away. The AWS Cloud Development Kit, or CDK, lets you write that description in a programming language, like TypeScript or Python. The CDK turns your code into a CloudFormation template. Either way, your infrastructure is repeatable, reviewable and kept in version control. The same template can build matching environments in another Region or account.

One-off vs repeatable

So which should you use? It depends on how often you'll do the thing. One-off operations suit the console, or a single CLI command. They're fine for learning, or for a quick look at something. But doing everything by hand at scale is how mistakes creep in. Repeatable processes use scripts, SDKs and infrastructure as code. You get the same result every time. That suits production, and any time you need several matching environments.

Connecting your network to AWS

Last thing. How does your own network reach AWS? Most people simply use the public internet. API calls travel over HTTPS, so they're encrypted. Got an office or data center? AWS Site-to-Site VPN builds an encrypted tunnel over the internet to your network in AWS. AWS Direct Connect is a private, dedicated connection from your premises to AWS. It doesn't use the public internet. That means more consistent performance, which suits hybrid setups that move a lot of data. We'll go deeper in the networking lesson. For now, just know the three names.

Recap

Let's recap. Every tool, from the console to the SDKs, calls the same AWS APIs. The console is for learning and one-off tasks. The CLI, CloudShell and the SDKs let you script and automate. CloudFormation and the CDK give you infrastructure as code. Repeatable, every time. And you reach AWS over the internet, a VPN, or Direct Connect.

Practice and what's next

That's the ways to use AWS. Not bad for a lesson with no rockets in it. Practice Cloud Technology and Services questions in Gazeek Flash's AWS app. It's free on the web and on Android, at flash.gazeek.com. Next up, compute. Servers, scaling and load balancers. See you there.

Gazeek Flash · free

Exam questions on your phone

Free questions on Cloud Technology and Services: quick-fire batches and timed exams, on the web or Android.