Sha256: b61d04c54557940b76ae1ddbe022b03fdb03330d6d7b228e82f7e170bac1960c
Contents?: true
Size: 1.06 KB
Versions: 15
Compression:
Stored size: 1.06 KB
Contents
CloudFormation do DESCRIPTION ||= 'lambda description'.freeze 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
15 entries across 15 versions & 1 rubygems