1
00:00:00,600 --> 00:00:05,900
In this section we are getting started with a CDK application.

2
00:00:05,910 --> 00:00:08,700
We are developing our first CDK project.

3
00:00:09,550 --> 00:00:15,610
So we will start with a cbdc application and development path and step by step together.

4
00:00:16,030 --> 00:00:21,940
So in this video we are going to getting started with a double CDK and we are developing our first CD

5
00:00:22,120 --> 00:00:25,120
application for infrastructure as code.

6
00:00:25,690 --> 00:00:30,010
So we have set up our development environment and ready to writing a CD.

7
00:00:30,010 --> 00:00:31,120
Kay Applications.

8
00:00:31,940 --> 00:00:40,340
Basically we are going to learn about the structure of the HDC project, how to use a construct library

9
00:00:40,340 --> 00:00:43,730
in order to define a resources using code.

10
00:00:43,820 --> 00:00:50,540
How to synthesize and deploy collection of the resource using the Cdcc Toolkit Command Line.

11
00:00:50,720 --> 00:00:57,860
So we will use all these Cdcc synthesise and deploy commands using the Cdcc toolkit, and we are going

12
00:00:57,860 --> 00:00:59,330
to create this kind of application.

13
00:00:59,330 --> 00:01:05,390
If you can see the image on the slide, we when we are creating a cdcc application, we will have one

14
00:01:05,390 --> 00:01:14,090
stack and we can create a constructs which constructs include a Lambda S3 or some are these components

15
00:01:14,210 --> 00:01:15,680
from the application.

16
00:01:15,710 --> 00:01:21,110
After that, this will be exported to the cloud formation with creating a template file and cloud formation

17
00:01:21,110 --> 00:01:24,950
create and resources on the A account.

18
00:01:26,390 --> 00:01:29,150
So let's see how we can do that.

19
00:01:29,450 --> 00:01:37,550
The standard of the Cdcc development workflow is similar to developing with creating React JS application.

20
00:01:37,640 --> 00:01:43,820
As you remember that in the front end applications we can use React JS and the similar workflow like

21
00:01:43,820 --> 00:01:46,450
creating a JS and CDK application.

22
00:01:46,460 --> 00:01:55,040
But of course there is some extra steps, but the main idea is the familiar of the development application

23
00:01:55,040 --> 00:01:56,500
and the CDK application.

24
00:01:56,520 --> 00:02:00,380
What is using it can be used NPM packages and so on.

25
00:02:01,190 --> 00:02:04,490
So let me break down what we are going to do one by one.

26
00:02:05,090 --> 00:02:10,520
The first one is creating the application from the template provided by the CDK application.

27
00:02:10,790 --> 00:02:17,630
So we are going to create a template of the CDK application with using the CDK init command.

28
00:02:17,900 --> 00:02:23,840
And the second step is the adding some code to the application to create resources within the stack.

29
00:02:23,990 --> 00:02:30,110
As you can see this image, we are going to adding some code for adding a squiz S3 for creating these

30
00:02:30,110 --> 00:02:32,120
kind of constructs into the code.

31
00:02:32,120 --> 00:02:36,710
This is the second step and the third step is willing the application.

32
00:02:37,040 --> 00:02:37,910
It is optional.

33
00:02:37,910 --> 00:02:39,110
It is not necessary.

34
00:02:39,200 --> 00:02:43,160
The CDK toolkit already do it for our service.

35
00:02:43,160 --> 00:02:47,960
If if you forget but it is optional, you can also build the application.

36
00:02:48,350 --> 00:02:55,430
The fourth step is synthesize takes in the application in order to create an a cloud formation template.

37
00:02:55,700 --> 00:03:00,380
We are in the fourth step and this is the here you can see this arrow.

38
00:03:00,410 --> 00:03:07,460
We are basically synthesize the ZETEC in the CDK application in order to create cloud formation templates.

39
00:03:07,460 --> 00:03:14,360
And the last step is to deploy, deploy one or more steps to your aid account that we configured before.

40
00:03:14,360 --> 00:03:19,640
So that means after we are creating the cloud formation template, we are deploying the application

41
00:03:19,640 --> 00:03:23,210
using the cloud formation to the target icon.

42
00:03:23,330 --> 00:03:26,180
So we will follow all these steps together.

43
00:03:27,890 --> 00:03:35,480
CDK has some steps that we can follow the best practices when developing our CDK application, and we

44
00:03:35,480 --> 00:03:39,710
can say that the build step creates the syntax and the type errors.

45
00:03:40,040 --> 00:03:46,070
And also the synthesised step is quite logical errors in defining your resources.

46
00:03:46,070 --> 00:03:53,390
We will also see that when we are synthesizing these application, we can face some errors that we are

47
00:03:53,390 --> 00:03:54,380
going to fix.

48
00:03:55,250 --> 00:03:59,610
Another best practice is the deployment may find permission issues.

49
00:03:59,620 --> 00:04:06,040
So so when we are deploying with the CDCC deployed command, it is required some permissions and we

50
00:04:06,040 --> 00:04:09,160
give that permissions on the CDK toolkit.

51
00:04:09,400 --> 00:04:13,690
And as always, you go back to the code and find the problem, fix it.

52
00:04:13,690 --> 00:04:16,270
Then we'll synthesize and deploy again.

53
00:04:16,270 --> 00:04:22,990
This is the lifecycle of the CDK that we are already know in the last sections, so we will follow these

54
00:04:22,990 --> 00:04:25,780
lifecycle when developing the CDK application.

55
00:04:26,020 --> 00:04:34,450
In the next video, I will walk through creating and deploying a simple a CDK application from initializing

56
00:04:34,450 --> 00:04:39,160
the project to the deploying the resulting a cloud formation templates.

57
00:04:39,550 --> 00:04:46,000
The application contains one stack which contains one resource, which is the Amazon S3 bucket.

58
00:04:46,000 --> 00:04:49,540
So that means in the next video we are creating a CDK application.

59
00:04:49,540 --> 00:04:56,620
It will has one stack and we are going to create S3 bucket and we synthesize and see that cloud formation

60
00:04:56,620 --> 00:04:57,460
template file.

61
00:04:57,490 --> 00:04:59,620
Maybe we can deploy it to the target environment.
