Create infrastructure to call lambda

This commit is contained in:
2020-05-14 04:39:51 -04:00
parent af8931e2db
commit d577cd02ef
6 changed files with 186 additions and 1 deletions

View File

@ -0,0 +1,40 @@
AWSTemplateFormatVersion: "2010-09-09"
Description: DT IAM stack
Parameters:
#------------------------
# Deployment Information
#------------------------
environment:
Type: String
Description: Name of the environment
Default: production
Resources:
DefaultLambdaRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action:
- sts:AssumeRole
Policies:
- PolicyName: LambdaLogging
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
Resource: "*"
Outputs:
DefaultRole:
Description: Default lambda role with logging policy
Value: !Ref DefaultLambdaRole