Created
November 13, 2020 02:39
-
-
Save nukopy/b8dd0930d07e2fcf7094ea34856478d2 to your computer and use it in GitHub Desktop.
CFn template
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
Resources: | |
# IAM Policy | |
PolicyLambdaBasicExecution: | |
Type: AWS::IAM::ManagedPolicy | |
Properties: | |
ManagedPolicyName: !Sub "${Prefix}-policy-lambda-basic-execution" | |
PolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Action: | |
- logs:CreateLogGroup | |
- logs:CreateLogStream | |
- logs:PutLogEvents | |
Resource: "*" | |
Users: | |
- !Ref IAMUser | |
# Roles: | |
# - 本当はここにロールを置きたいけど,ロールが作成されていないので渋々 IAM ユーザ[email protected] を指定している | |
# IAM Role | |
RoleLambdaEntryPoint: | |
Type: AWS::IAM::Role | |
Properties: | |
RoleName: !Sub "${Prefix}-role-lambda-entry-point" | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow | |
Principal: | |
Service: lambda.amazonaws.com | |
Action: sts:AssumeRole | |
ManagedPolicyArns: | |
- !Ref PolicyLambdaBasicExecution |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment