Skip to content

Instantly share code, notes, and snippets.

@kevinhooke
Created February 17, 2023 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinhooke/d2f71ddfe938c9fa8a95a918d8f5ba4e to your computer and use it in GitHub Desktop.
Save kevinhooke/d2f71ddfe938c9fa8a95a918d8f5ba4e to your computer and use it in GitHub Desktop.
AWS CloudFormation template for an IAM role
Resources:
roleResourceName:
Type: AWS::IAM::Role
Properties:
RoleName: role-name
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- lambda.amazonaws.com
Action: sts:AssumeRole
Path: /
Policies:
- PolicyName: iam-role-policy-name
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Action:
- logs:CreateLogGroup
- logs:CreateLogStream
- logs:PutLogEvents
- logs:DescribeLogStreams
Resource:
- arn:aws:logs:region:account:log-group:/aws/lambda/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment