WEBVTT
Kind: captions
Language: en

1
00:00:00.000 --> 00:00:07.095
Our store now knows where it will run on AWS. The next question is how the team actually works

2
00:00:07.095 --> 00:00:14.340
with AWS. This lesson covers task 3.1 in Domain 3: methods of deploying and operating in the AWS

3
00:00:14.340 --> 00:00:19.850
Cloud. We'll cover two ideas. First, the ways to access AWS: the console,

4
00:00:19.850 --> 00:00:27.247
the command line and software development kits. Second, how to choose between a one-time operation

5
00:00:27.247 --> 00:00:31.700
and a repeatable process built with infrastructure as code.

6
00:00:32.100 --> 00:00:39.098
Start with one key fact: every action in AWS is an API call. Whether the team clicks a button

7
00:00:39.098 --> 00:00:44.892
in the console, types a command, runs application code or deploys a template,

8
00:00:44.892 --> 00:00:52.719
the request reaches the same AWS service APIs, sent over HTTPS and signed with the caller's credentials.

9
00:00:52.719 --> 00:00:59.265
So these tools aren't different powers. They're different doors into the same building,

10
00:00:59.265 --> 00:01:02.200
and the right door depends on the task.

11
00:01:02.600 --> 00:01:09.829
The first door is the AWS Management Console, a web interface you sign in to with a browser.

12
00:01:09.829 --> 00:01:17.136
Say the team wants to try Amazon EC2. In the console, they pick options from menus and launch

13
00:01:17.136 --> 00:01:24.521
a test server without writing any code. It's ideal for exploring, learning and one-time tasks.

14
00:01:24.521 --> 00:01:31.986
The downside: clicks aren't saved as a recipe. Doing the same thing again means repeating every

15
00:01:31.986 --> 00:01:35.600
step by hand, and it's easy to miss a setting.

16
00:01:36.000 --> 00:01:43.671
The second door is the AWS Command Line Interface, the AWS CLI. You type commands in a terminal,

17
00:01:43.671 --> 00:01:51.182
like aws s3 cp to copy a file into a bucket. The CLI gives direct access to the public APIs of

18
00:01:51.182 --> 00:01:58.853
AWS services, and you can save commands in scripts to run again. Don't want to install anything?

19
00:01:58.853 --> 00:02:06.044
AWS CloudShell is a browser-based shell you open from the console. It's already signed in,

20
00:02:06.044 --> 00:02:09.800
has the CLI installed, and costs nothing extra.

21
00:02:10.200 --> 00:02:17.475
The third door is the AWS SDKs, software development kits that let developers call AWS from their

22
00:02:17.475 --> 00:02:24.675
own code, in languages such as Python, JavaScript, Java, .NET and Go. When a shopper checks out,

23
00:02:24.675 --> 00:02:30.225
the store's code uses the SDK for Python to save the receipt in Amazon S3.

24
00:02:30.225 --> 00:02:37.500
The SDK does the plumbing: it finds the credentials, signs each request and retries requests that

25
00:02:37.500 --> 00:02:43.200
fail for temporary reasons, so developers can focus on the store's features.

26
00:02:43.600 --> 00:02:50.272
Now the second idea: one-time operations versus repeatable processes. A one-time task,

27
00:02:50.272 --> 00:02:56.090
like exploring a new service, running a quick test or changing one setting,

28
00:02:56.090 --> 00:03:03.538
is fine in the console or with a single CLI command. But when the same setup must be built again

29
00:03:03.538 --> 00:03:10.209
and again, in development, test and production, in several Regions, or by many people,

30
00:03:10.209 --> 00:03:15.717
doing it by hand gets slow and risky. The more often you repeat a task,

31
00:03:15.717 --> 00:03:18.200
the more it pays to automate it.

32
00:03:18.600 --> 00:03:25.767
That's where infrastructure as code comes in, and on AWS the core service is AWS CloudFormation.

33
00:03:25.767 --> 00:03:31.664
You describe your resources in a template, a text file written in YAML or JSON.

34
00:03:31.664 --> 00:03:36.964
Our store's template lists a load balancer, web servers and a database.

35
00:03:36.964 --> 00:03:43.757
CloudFormation reads it and creates everything as a stack: a group of resources you create,

36
00:03:43.757 --> 00:03:50.700
update and delete as a single unit. Before an update, a change set previews what will change.

37
00:03:51.100 --> 00:03:58.000
Here's the payoff. The same template creates a development stack, a test stack and a production

38
00:03:58.000 --> 00:04:03.376
stack, and they come out identical every time, with no forgotten settings.

39
00:04:03.376 --> 00:04:09.768
Need the store in a second Region for disaster recovery? Deploy the same template there.

40
00:04:09.768 --> 00:04:15.797
And if an environment breaks, the team can rebuild it from the template in minutes,

41
00:04:15.797 --> 00:04:20.300
instead of trying to remember what someone clicked months ago.

42
00:04:20.700 --> 00:04:27.713
Because templates are text files, teams keep them in version control, review changes like application

43
00:04:27.713 --> 00:04:33.407
code and can go back to an earlier version. If creating or updating a stack fails,

44
00:04:33.407 --> 00:04:39.865
CloudFormation rolls back. Developers who prefer a programming language can use the AWS Cloud

45
00:04:39.865 --> 00:04:44.864
Development Kit, the CDK. They write TypeScript, Python, Java, C# or Go,

46
00:04:44.864 --> 00:04:51.600
and the CDK turns that code into a CloudFormation template and deploys it through CloudFormation.

47
00:04:52.000 --> 00:04:57.087
Here's how the exam asks about this. Explore a service or do a one-time task:

48
00:04:57.087 --> 00:05:01.843
the Management Console. Automate with commands and scripts: the AWS CLI.

49
00:05:01.843 --> 00:05:08.186
Call AWS from application code: the SDKs. Run CLI commands in a browser with nothing to install:

50
00:05:08.186 --> 00:05:13.405
CloudShell. Repeatable, consistent environments from templates: CloudFormation.

51
00:05:13.405 --> 00:05:20.011
Define infrastructure in a programming language: the CDK. Preview changes to a stack before applying

52
00:05:20.011 --> 00:05:21.200
them: change sets.

53
00:05:21.600 --> 00:05:28.661
To recap: every way of using AWS ends in an API call. The console is visual and best for one-time

54
00:05:28.661 --> 00:05:35.212
tasks; the CLI and CloudShell run commands and scripts; the SDKs put AWS inside your code.

55
00:05:35.212 --> 00:05:42.199
For repeatable, consistent environments, use infrastructure as code: CloudFormation turns a YAML

56
00:05:42.199 --> 00:05:47.950
or JSON template into a stack, and the CDK generates those templates from code.

57
00:05:47.950 --> 00:05:53.700
Next, we'll see who secures what in the cloud: the shared responsibility model.
