Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save italopessoa/38900505d40a3d6dee3c0a4962eb0226 to your computer and use it in GitHub Desktop.
Save italopessoa/38900505d40a3d6dee3c0a4962eb0226 to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: 2010-09-09
Description: 'Create lambda function to access DynamoDB, CloudFormation and CloudWatch'
Resources:
HelloWorldExecutionRole:
Type: 'AWS::IAM::Role'
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service: lambda.amazonaws.com
Action: 'sts:AssumeRole'
HelloWorldLambdaCloudFormationItaloTemplate:
Type: 'AWS::Lambda::Function'
Properties:
Handler: index.helloworld
Role:
Fn::GetAtt:
- HelloWorldExecutionRole
- Arn
Description: Hello World Lambda CloudFormation Italo Template description
Code:
S3Bucket: helloworldlambdacloudformationitalobucket
S3Key: HelloWorldLambdaItalo.zip
Runtime: nodejs8.10
Timeout: 25
Outputs:
Role:
Value: !Ref HelloWorldExecutionRole
Lambda:
Value: !Ref HelloWorldLambdaCloudFormationItaloTemplate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment