Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the parameter 'statement-id' of 'add-permission' mean?

I'm working through the tutorial "Walkthrough 2: Handling Amazon S3 Events (Node.js)". I have a question about the CLI parameters:

 aws lambda add-permission \
--function-name CreateThumbnail \
--region us-west-2 \
--statement-id some-unique-id \
--action "lambda:InvokeFunction" \
--principal s3.amazonaws.com \
--source-arn arn:aws:s3:::sourcebucket \
--source-account bucket-owner-account-id \
--profile adminuser

What is the parameter --statement-id some-unique-id?

like image 785
JuanCrg90 Avatar asked Jul 07 '15 20:07

JuanCrg90


1 Answers

It's an arbitrary/opaque identifier that you essentially make up. In some situations, it's optional. In IAM policies, this is shown as the Sid. An example might be simply 1 or MyStringIMadeUp12345. It's typically used to describe or track the policy and has no meaning to AWS. Some services impose uniqueness constraints, meaning that each statement has to have a unique Sid.

http://docs.aws.amazon.com/IAM/latest/UserGuide/AccessPolicyLanguage_ElementDescriptions.html#Sid

like image 139
Michael - sqlbot Avatar answered Nov 09 '22 07:11

Michael - sqlbot