Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nidhi-canopas/24efe805baa75ecc9b28f038460c463c to your computer and use it in GitHub Desktop.

Select an option

Save nidhi-canopas/24efe805baa75ecc9b28f038460c463c to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: 2010-09-09
Description: Deploy serverless demo application.
Resources:
LambdaExecutionRole:
Type: AWS::IAM::Role
Properties:
RoleName:
Fn::Sub: "test-lambda-role"
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: "Allow"
Principal:
Service:
- "lambda.amazonaws.com"
Action: "sts:AssumeRole"
ManagedPolicyArns:
- "arn:aws:iam::aws:policy/AWSLambdaExecute"
- "arn:aws:iam::aws:policy/AmazonS3FullAccess"
- "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess"
- "arn:aws:iam::aws:policy/AmazonKinesisFullAccess"
Path: "/"
Outputs:
LambdaRoleARN:
Description: Role for Lambda execution.
Value:
Fn::GetAtt:
- LambdaExecutionRole
- Arn
Export:
Name:
Fn::Sub: "test-lambda-role"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment