Forked from sdomagala/serverless-with-trust-policy-change.yml
Created
April 7, 2021 19:13
-
-
Save omar-dulaimi/47d1607b476956605255e755fbcc5df2 to your computer and use it in GitHub Desktop.
Change Trust Policy in Serverless IAM Role (or any other params other than policy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## all other serverless.yml configuration | |
| functions: | |
| # your functions | |
| provider: | |
| name: aws | |
| # your provider config | |
| resources: | |
| Resources: | |
| IamRoleLambdaExecution: # has to be this exact name, https://serverless.com/framework/docs/providers/aws/guide/resources/ | |
| Type: AWS::IAM::Role | |
| Properties: | |
| AssumeRolePolicyDocument: # OVERWRITE assume role policy, rest is populated by serverless | |
| Version: "2012-10-17" | |
| Statement: | |
| - Effect: Allow | |
| Principal: | |
| Service: | |
| - lambda.amazonaws.com | |
| AWS: | |
| - arn:aws:iam::123456789:root | |
| - arn:aws:iam::012345678:root | |
| Action: sts:AssumeRole |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment