Sha256: a79bbd4430cc2e117537919c99269faf0d6c86ec650b386138535ededb448461

Contents?: true

Size: 1.04 KB

Versions: 51

Compression:

Stored size: 1.04 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

51 entries across 51 versions & 1 rubygems

Version Path
cfndsl-0.16.13 sample/lambda.rb
cfndsl-0.16.12 sample/lambda.rb
cfndsl-0.16.11 sample/lambda.rb
cfndsl-0.16.10 sample/lambda.rb
cfndsl-0.16.9 sample/lambda.rb
cfndsl-0.16.8 sample/lambda.rb
cfndsl-0.16.7 sample/lambda.rb
cfndsl-0.16.6 sample/lambda.rb
cfndsl-0.16.5 sample/lambda.rb
cfndsl-0.16.3 sample/lambda.rb
cfndsl-0.16.2 sample/lambda.rb
cfndsl-0.16.1 sample/lambda.rb
cfndsl-0.15.3 sample/lambda.rb
cfndsl-0.15.2 sample/lambda.rb
cfndsl-0.15.1 sample/lambda.rb
cfndsl-0.15.0 sample/lambda.rb
cfndsl-0.14.0 sample/lambda.rb
cfndsl-0.13.1 sample/lambda.rb
cfndsl-0.13.0 sample/lambda.rb
cfndsl-0.12.11 sample/lambda.rb