How to create a Lambda function with AWS CLI

0 votes

Hi Team,

I have configured AWS CLI in the Windows system. I want to create a lambda function in AWS. How can I do that using AWS CLI?

Nov 5, 2020 in AWS by akhtar
• 38,180 points
256 views

1 answer to this question.

0 votes

Hi@akhtar,

To create a function, you need a deployment package and an execution role. The deployment package contains the function code. The execution role grants the function permission to use AWS services. The following create-function example creates a Lambda function named my-function.

$ aws lambda create-function \
    --function-name my-function \
    --runtime nodejs10.x \
    --zip-file fileb://my-function.zip \
    --handler my-function.handler \
    --role arn:aws:iam::123456789012:role/service-role/MyTestFunction-role-tges6bf4
answered Nov 5, 2020 by MD
• 95,220 points

Related Questions In AWS

0 votes
1 answer

How to create a S3 bucket using AWS CLI?

You can use the following command:- C:\Users\priyj_kumar>aws s3api ...READ MORE

answered Feb 15, 2019 in AWS by Priyaj
• 58,120 points
4,207 views
0 votes
1 answer

How to create a VPC using AWS CLI?

To create an Amazon VPC using AWS ...READ MORE

answered Feb 21, 2019 in AWS by Priyaj
• 58,120 points
525 views
0 votes
1 answer

How to create a subnet inside a VPC using AWS CLI?

To create a subnet inside a VPC ...READ MORE

answered Feb 21, 2019 in AWS by Priyaj
• 58,120 points
172 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to delete a Lambda function using AWS CLI?

Hi@akhtar, You can delete a Lambda function. To ...READ MORE

answered Nov 5, 2020 in AWS by MD
• 95,220 points
215 views
0 votes
1 answer

How to update aws lambda function using aws cli?

Hi@akhtar, You can update your Lambda function in ...READ MORE

answered Sep 22, 2020 in AWS by MD
• 95,220 points
923 views