cfndsl 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTkxZDBlM2IyZDA4ZjY5YjBhMGQ1NTc2N2U0NDg1MWYzYTAxOGU1Ng==
4
+ ZWUwNGNmZjY0YTEwMzhjZWJmN2U2ZTM2NjhlYmQ1YzA5MjZiNGU2Ng==
5
5
  data.tar.gz: !binary |-
6
- ZjI0ZjM3N2IwYzE2ZDM1YjNmZGZmODJhNmYyMjFmY2NjNzZjMjQ4Yw==
6
+ NDAxMGMwN2IyMGEzYWViNjllZDM1ODIwZWIzMzFiNWE1NzFmZTljYw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGQwZTQyM2Y1MTc4Y2ExOTZlMTNiOTg0MTk2MmFmNTVmMGQ2NmZkM2VmNzdi
10
- Y2E4ZTAyODY2ZDQ1NDRhMTBlM2IyZWY4OTU1OWZmNjVmYjNiNDQ2NWUxMWM2
11
- YTI2YzcwOWQ2M2QxNjgyYzE3NGQ0MDE4MGZiOWM2Y2E0OGQ3MmY=
9
+ MmY1YTc2NjQ3NGU2ODAxZmMyNzczNDRmYmNiMDU1MzgxMmY0ZWM0ZjRjOGU4
10
+ N2JhODExMmUyYzc3N2JkODdlNDM2YWQxYWVkNzY4YWE0MTNiYzc5ZjFlZjAx
11
+ NjNiNmI2OTZmZTE2ZDZjOGI3OGQ0NjRhNTgwYTllZDRiNjIyYjk=
12
12
  data.tar.gz: !binary |-
13
- MmViOGQwNzgyMTBlZTQ0YjY4M2E0MTNjMGViMDRmMWRjOGU4MzMyMjE2Zjg4
14
- ZTFjZWViYmQ1OTQyNWYzZWQxYWE2N2NhMWQ2NzUyNWE2OTI2ZDJjZDliNDZj
15
- ZWUyNWMxMTUyMzAyMWI3YzFhNjVkZmUwZGJlZGE0NWY4NWE3ZDE=
13
+ ZDk3ZDNiMzg1YTI5ZGU5ZGFkMGYyY2I5ZTdlODgwODNlOWI3OTU3ZWY2ZDE2
14
+ MGY1ZDFjYWIxMGE3OWZjNTAzNjQwZWM4ZTZjYjFhOGQyOWRhZDY5ODgxNzNj
15
+ ZTg5NjQ3YTVjZjYwYWM5NGM5ZjM0MDIxYjc2MTBjNDViNDg5Y2Y=
@@ -615,7 +615,7 @@ Resources:
615
615
  Engine: String
616
616
  EngineVersion: String
617
617
  Iops: Number
618
- KmsKeyId: String
618
+ KmsKeyId: String
619
619
  LicenseModel: String
620
620
  MasterUsername: String
621
621
  MasterUserPassword: String
@@ -796,6 +796,29 @@ Resources:
796
796
  Ec2TagFilters: [ CDEc2TagFilters ]
797
797
  OnPremisesInstanceTagFilters: [ CDOnPremisesInstanceTagFilters ]
798
798
  ServiceRoleArn: String
799
+ "AWS::Lambda::Function" :
800
+ Properties:
801
+ Code: LambdaCode
802
+ Description: String
803
+ Handler: String
804
+ MemorySize: Integer
805
+ Role: String
806
+ Runtime: String
807
+ Timeout: Integer
808
+ "AWS::Lambda::Permission" :
809
+ Properties:
810
+ Action: [ String ]
811
+ FunctionName: String
812
+ Principal: String
813
+ SourceAccount: String
814
+ SourceArn: String
815
+ "AWS::Lambda::EventSourceMapping" :
816
+ Properties:
817
+ BatchSize: Integer
818
+ Enabled: Boolean
819
+ EventSourceArn: String
820
+ FunctionName: String
821
+ StartingPosition: String
799
822
 
800
823
  Types:
801
824
  String: String
@@ -1110,3 +1133,8 @@ Types:
1110
1133
  ConfigRuleSourceDetails:
1111
1134
  EventSource: String
1112
1135
  MessageType: String
1136
+ LambdaCode:
1137
+ S3Bucket: String
1138
+ S3Key: String
1139
+ S3ObjectVersion: String
1140
+ ZipFile: String
@@ -1,3 +1,3 @@
1
1
  module CfnDsl
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -0,0 +1,38 @@
1
+ CloudFormation {
2
+ DESCRIPTION ||= "lambda description"
3
+
4
+ Description DESCRIPTION
5
+
6
+ Parameter('Role') { Type "String" }
7
+
8
+ Resource('LambdaFunction') {
9
+ Type 'AWS::Lambda::Function'
10
+ Property('Handler','index.handler')
11
+ Property('Role',Ref('Role'))
12
+ Property('Code',{
13
+ S3Bucket: "lambda-functions",
14
+ S3Key: "amilookup.zip"
15
+ })
16
+ Property('Runtime','nodejs')
17
+ Property('Timeout','25')
18
+ }
19
+
20
+ Resource('EventSourceMapping') {
21
+ Type 'AWS::Lambda::EventSourceMapping'
22
+ Property('EventSourceArn', FnJoin('',["arn:aws:kinesis:", Ref('AWS::Region'), ":", Ref('AWS::AccountId'), ':stream/test']))
23
+ Property('FunctionName', FnGetAtt('LambdaFunction', 'Arn'))
24
+ Property('StartingPosition', 'TRIM_HORIZON')
25
+ }
26
+
27
+ Resource('LambdaInvokePermission') {
28
+ Type 'AWS::Lambda::Permission'
29
+ Property('FunctionName', FnGetAtt('LambdaFunction', 'Arn'))
30
+ Property('Action', [
31
+ 'lambda:InvokeFunction'
32
+ ])
33
+ Property('Principal', 's3.amazonaws.com')
34
+ Property('SourceAccount', Ref('AWS::AccountId'))
35
+
36
+ }
37
+
38
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfndsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Jack
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-28 00:00:00.000000000 Z
12
+ date: 2016-02-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -72,6 +72,7 @@ files:
72
72
  - sample/config-service.rb
73
73
  - sample/ecs.rb
74
74
  - sample/iam-policies.rb
75
+ - sample/lambda.rb
75
76
  - sample/s3.rb
76
77
  - sample/t1.rb
77
78
  - sample/t1.yaml