Skip to content

Commit e16c874

Browse files
author
Alex Melnyk
committed
docs: add minimal permission set for using layer
1 parent 8d5986a commit e16c874

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

docs/content/index.mdx

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,41 @@ 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:
55+
56+
```yaml
57+
Version: '2012-10-17'
58+
Statement:
59+
- Sid: CloudFormationTransform
60+
Effect: Allow
61+
Action: cloudformation:CreateChangeSet
62+
Resource:
63+
- arn:aws:cloudformation:us-east-1:aws:transform/Serverless-2016-10-31
64+
- Sid: GetCfnTemplate
65+
Effect: Allow
66+
Action:
67+
- serverlessrepo:CreateCloudFormationTemplate
68+
- serverlessrepo:GetCloudFormationTemplate
69+
Resource:
70+
- arn:aws:serverlessrepo:eu-west-1:057560766410:applications/aws-lambda-powertools-python-layer
71+
- Sid: S3AccessLayer
72+
Effect: Allow
73+
Action:
74+
- s3:GetObject
75+
Resource:
76+
- arn:aws:s3:::awsserverlessrepo-changesets-*/*
77+
- Sid: GetLayerVersion
78+
Effect: Allow
79+
Action:
80+
- lambda:PublishLayerVersion
81+
- lambda:GetLayerVersion
82+
Resource:
83+
- arn:aws:lambda:YOUR_AWS_REGION:YOUR_AWS_ACCOUNT:layer:aws-lambda-powertools-python-layer*
84+
85+
```
86+
87+
The region and the account id for `CloudFormationTransform` and `GetCfnTemplat` are fixed.
88+
5489
You can fetch the available versions via the API with:
5590

5691
```bash

0 commit comments

Comments
 (0)