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,260 points
1,249 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,460 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,020 points
6,151 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,020 points
1,157 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,020 points
729 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,460 points
2,518 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 23, 2020 in AWS by MD
• 95,460 points
3,066 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP