Sha256: 0bb5b697d599defbd6e5d5889269c63649040a29b1918c0d40fdacc18b285169
Contents?: true
Size: 1.07 KB
Versions: 31
Compression:
Stored size: 1.07 KB
Contents
# frozen_string_literal: true CloudFormation do DESCRIPTION ||= 'lambda description' Description DESCRIPTION Parameter('Role') { Type 'String' } Resource('LambdaFunction') do Type 'AWS::Lambda::Function' Property('Handler', 'index.handler') Property('Role', Ref('Role')) Property('Code', S3Bucket: 'lambda-functions', S3Key: 'amilookup.zip') Property('Runtime', 'nodejs') Property('Timeout', '25') end Resource('EventSourceMapping') do Type 'AWS::Lambda::EventSourceMapping' Property('EventSourceArn', FnJoin('', ['arn:aws:kinesis:', Ref('AWS::Region'), ':', Ref('AWS::AccountId'), ':stream/test'])) Property('FunctionName', FnGetAtt('LambdaFunction', 'Arn')) Property('StartingPosition', 'TRIM_HORIZON') end Resource('LambdaInvokePermission') do Type 'AWS::Lambda::Permission' Property('FunctionName', FnGetAtt('LambdaFunction', 'Arn')) Property('Action', ['lambda:InvokeFunction']) Property('Principal', 's3.amazonaws.com') Property('SourceAccount', Ref('AWS::AccountId')) end end
Version data entries
31 entries across 31 versions & 1 rubygems