File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ This will add a nested app stack with an output parameter `LayerVersionArn`, tha
5151 - !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn
5252` ` `
5353
54- Here is the list of IAM permissions that you need to add to your deployment IAM role to use the layer, keep in mind to replace the placeholders :
54+ Here is the list of IAM permissions that you need to add to your deployment IAM role to use the layer :
5555
5656` ` ` yaml
5757Version: '2012-10-17'
@@ -67,23 +67,29 @@ Statement:
6767 - serverlessrepo:CreateCloudFormationTemplate
6868 - serverlessrepo:GetCloudFormationTemplate
6969 Resource:
70+ # this is arn of the powertools SAR app
7071 - arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
7172 - Sid: S3AccessLayer
7273 Effect: Allow
7374 Action:
7475 - s3:GetObject
7576 Resource:
77+ # AWS publishes to an external S3 bucket locked down to your account ID
78+ # The below example is us publishing lambda powertools
79+ # Bucket: awsserverlessrepo-changesets-plntc6bfnfj
80+ # Key: *****/arn:aws:serverlessrepo:eu-west-1:057560766410:applications-aws-lambda-powertools-python-layer-versions-1.6.0/aeeccf50-****-****-****-*********
7681 - arn:aws:s3:::awsserverlessrepo-changesets-*/*
7782 - Sid: GetLayerVersion
7883 Effect: Allow
7984 Action:
8085 - lambda:PublishLayerVersion
8186 - lambda:GetLayerVersion
8287 Resource:
83- - arn:aws:lambda:YOUR_AWS_REGION:YOUR_AWS_ACCOUNT:layer:aws-lambda-powertools-python-layer*
84-
88+ - !Sub arn:aws:lambda:${AWS::Region}:${AWS::AccoundId}:layer:aws-lambda-powertools-python-layer*
8589` ` `
8690
91+ > Credits to [mwarkentin](https://github.com/mwarkentin) for providing the scoped down IAM permissions.
92+
8793The region and the account id for `CloudFormationTransform` and `GetCfnTemplat` are fixed.
8894
8995You can fetch the available versions via the API with :
You can’t perform that action at this time.
0 commit comments