1
00:00:00,300 --> 00:00:07,650
In this video, we are going to create a of a lambda function without using any blueprint function on

2
00:00:07,650 --> 00:00:08,970
a WS management console.

3
00:00:09,000 --> 00:00:10,680
So let's get started.

4
00:00:10,950 --> 00:00:16,020
Please open the Lambda page and count the functions and click the create function button.

5
00:00:16,590 --> 00:00:20,700
So as you remember that we have four options in the last time.

6
00:00:20,700 --> 00:00:23,290
When we create a lambda function, we use a blueprint.

7
00:00:23,310 --> 00:00:27,140
We create this box and use the word blueprint.

8
00:00:27,150 --> 00:00:29,880
But this time I would like to create from the secret.

9
00:00:29,880 --> 00:00:34,290
So that's why please click the order from scratch and scroll down.

10
00:00:34,740 --> 00:00:37,180
We should provide the basic information.

11
00:00:37,200 --> 00:00:39,630
The function name is a new function.

12
00:00:42,210 --> 00:00:45,440
And runtime should be the Node.js and scroll down.

13
00:00:45,450 --> 00:00:50,160
You can see the architecture live as it is and the permissions is important.

14
00:00:50,280 --> 00:00:57,360
And if you open the this box change default execution roll, you can see that we can select some of

15
00:00:57,360 --> 00:00:59,160
the execution roll options.

16
00:00:59,400 --> 00:01:04,740
As you remember that the default behavior is create a new role, basically lambda permission.

17
00:01:04,740 --> 00:01:09,600
When we select this, the Amazon Cloud Watch Permission policy is included in this role.

18
00:01:09,750 --> 00:01:16,230
So basically when we click the create function button, this will be create an eve execution role for

19
00:01:16,230 --> 00:01:17,340
our Lambda function.

20
00:01:17,340 --> 00:01:19,740
But we have also two more options.

21
00:01:19,740 --> 00:01:27,270
We can use an existing code if you have any existing role on IAM, you can see the list of the IAM execution

22
00:01:27,270 --> 00:01:33,840
roles and also maybe you remember that ADA has predefined execution rules that we can select in this

23
00:01:33,840 --> 00:01:34,410
stage.

24
00:01:34,410 --> 00:01:40,950
If you click the last section, which is the create any role from the ADA policy templates, you can

25
00:01:40,950 --> 00:01:45,660
see that we can create a new role with these policy templates.

26
00:01:45,660 --> 00:01:53,160
If you open this dropdown, you can see some of the policy templates which including the predefined

27
00:01:53,160 --> 00:01:58,440
roles, for example, S3 or simple microservice permission dynamo.

28
00:01:58,440 --> 00:02:05,040
DB If you scroll down again, you can see Psns or case folder permissions, which we will use during

29
00:02:05,040 --> 00:02:05,580
the course.

30
00:02:05,580 --> 00:02:11,130
But this is also a very good practice to use some of the permissions defined predefined from the ADA

31
00:02:11,850 --> 00:02:13,050
as soon as possible.

32
00:02:13,800 --> 00:02:14,080
Okay.

33
00:02:14,280 --> 00:02:21,210
Let me leave as it is the first one, which is the create any world with basic lambda permission and

34
00:02:21,210 --> 00:02:25,470
scroll on and there is also expand advanced settings.

35
00:02:25,470 --> 00:02:26,820
Let me create a lambda function.

36
00:02:26,820 --> 00:02:32,940
If we expand this advanced sections, if you scroll down, you can see some of the advanced sections.

37
00:02:32,940 --> 00:02:36,150
For example, the first one is the enabled code signing.

38
00:02:36,180 --> 00:02:42,090
We can use code signing configuration to ensure that the code has been signed or an improved source

39
00:02:42,210 --> 00:02:44,900
and we have also enabled function URLs.

40
00:02:44,910 --> 00:02:46,410
This is brand new feature.

41
00:02:46,410 --> 00:02:51,120
We can use function URLs to assign a HTTPS and point to our lambda function.

42
00:02:51,120 --> 00:02:59,010
We can enable takes to organize our lambda function or we can enable VPC Virtual Private Cloud to organize

43
00:02:59,010 --> 00:03:01,740
our network access operations.

44
00:03:02,850 --> 00:03:10,020
I don't select any advanced settings now and just click the create function to create this function.

45
00:03:11,050 --> 00:03:12,760
And wait for a while.

46
00:03:13,000 --> 00:03:18,790
This function will be created with the new role, which is the Lambda basic permission, including the

47
00:03:18,790 --> 00:03:20,010
Amazon Cloud Logs.

48
00:03:20,440 --> 00:03:27,220
And yes, our new function is created and we create this function from the scratch and this function

49
00:03:27,220 --> 00:03:28,210
is ready now.

50
00:03:28,300 --> 00:03:29,890
Function is created successfully.

51
00:03:29,890 --> 00:03:32,770
If you scroll down, we can read our function code.

52
00:03:32,890 --> 00:03:35,320
You can see our function code in here.

53
00:03:35,350 --> 00:03:40,630
This is the basic boilerplate function code when you create a new function from the secret.

54
00:03:40,660 --> 00:03:45,520
As you can see that we have got boilerplate plate function code which is basically return the hello

55
00:03:45,520 --> 00:03:47,770
from a helloworld message.
