Created
February 9, 2020 11:23
-
-
Save elliottmurray/fd19cbcae6fe5100de427799614c19fe to your computer and use it in GitHub Desktop.
This file contains 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
HelloWorldFunctionRole: | |
Type: 'AWS::IAM::Role' | |
Properties: | |
RoleName: "managed-cr-role" | |
Path: '/' | |
AssumeRolePolicyDocument: | |
Version: '2012-10-17' | |
Statement: | |
- Effect: Allow | |
Action: | |
- sts:AssumeRole | |
Principal: | |
Service: | |
- 'lambda.amazonaws.com' | |
Policies: | |
- PolicyName: "LogPolicy" | |
PolicyDocument: | |
Version: 2012-10-17 | |
Statement: | |
- | |
Effect: Allow | |
Action: | |
- 'events:*' | |
- 'logs:CreateLogGroup' | |
- 'logs:CreateLogStream' | |
- 'logs:PutLogEvents' | |
Resource: | |
- !Sub "arn:aws:events:${AWS::Region}:${AWS::AccountId}:rule/MyCustomResource*" | |
- !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*" | |
- !Sub "arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:/aws/lambda/*:*" | |
- PolicyName: "AddPermission" | |
PolicyDocument: | |
Version: 2012-10-17 | |
Statement: | |
- Effect: Allow | |
Action: | |
- lambda:AddPermission | |
Resource: "*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment