File tree 1 file changed +9
-3
lines changed
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
51
51
- !GetAtt AwsLambdaPowertoolsPythonLayer.Outputs.LayerVersionArn
52
52
` ` `
53
53
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 :
55
55
56
56
` ` ` yaml
57
57
Version: '2012-10-17'
@@ -67,23 +67,29 @@ Statement:
67
67
- serverlessrepo:CreateCloudFormationTemplate
68
68
- serverlessrepo:GetCloudFormationTemplate
69
69
Resource:
70
+ # this is arn of the powertools SAR app
70
71
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
71
72
- Sid: S3AccessLayer
72
73
Effect: Allow
73
74
Action:
74
75
- s3:GetObject
75
76
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-****-****-****-*********
76
81
- arn:aws:s3:::awsserverlessrepo-changesets-*/*
77
82
- Sid: GetLayerVersion
78
83
Effect: Allow
79
84
Action:
80
85
- lambda:PublishLayerVersion
81
86
- lambda:GetLayerVersion
82
87
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*
85
89
` ` `
86
90
91
+ > Credits to [mwarkentin](https://github.com/mwarkentin) for providing the scoped down IAM permissions.
92
+
87
93
The region and the account id for `CloudFormationTransform` and `GetCfnTemplat` are fixed.
88
94
89
95
You can fetch the available versions via the API with :
You can’t perform that action at this time.
0 commit comments