How to add permissions to an existing Lambda function

0 votes

Hi Guys,

I have created one lambda function from CLI. I want to grant the Amazon SNS service permission to the lambda function. How can I do that?

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

1 answer to this question.

0 votes

Hi@akhtar,

You can grant an AWS service or another account permission to use a function. The following add-permission example grants the Amazon SNS service permission to invoke a function named my-function.

$ aws lambda add-permission \
    --function-name my-function \
    --action lambda:InvokeFunction \
    --statement-id sns \
    --principal sns.amazonaws.com
answered Nov 5, 2020 by MD
• 95,240 points

Related Questions In AWS

0 votes
2 answers

How do I add python libraries to an AWS lambda function for Alexa?

If you get lucky (it depends what ...READ MORE

answered Nov 3, 2020 in AWS by anonymous
11,498 views
0 votes
1 answer

How to add IAM role to an existing instance in aws?

As of AWS CLI v1.11.46,  you can ...READ MORE

answered Sep 6, 2018 in AWS by Archana
• 4,150 points
919 views
0 votes
1 answer
0 votes
1 answer

How to link AWS Lambda function to Amazon CloudWatch ?

In order to create Log Group and ...READ MORE

answered Jul 20, 2018 in AWS by datageek
• 2,530 points
768 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to setup an alarm when Lambda function fails in AWS?

Hi@akhtar, To create an Alarm for Lambda function, ...READ MORE

answered Apr 2, 2020 in AWS by MD
• 95,240 points
827 views
0 votes
1 answer

How to add AWS tags to an existing repository in AWS CodeCommit?

Hi@akhtar, You can add or update tags for a resource ...READ MORE

answered Nov 25, 2020 in AWS by MD
• 95,240 points
81 views