brabster / crucible

AWS CloudFormation templates built with Clojure
Eclipse Public License 1.0
72 stars 18 forks source link

Lambda Event Source Mapping spec incorrect #186

Closed justjohn2001 closed 4 years ago

justjohn2001 commented 4 years ago

There is a typo in ::starting-postition, and ::starting-position is an optional attribute. Proposed patch:

diff --git a/src/crucible/aws/lambda.clj b/src/crucible/aws/lambda.clj
index 38bd8c9..9b12cfa 100644
--- a/src/crucible/aws/lambda.clj
+++ b/src/crucible/aws/lambda.clj
@@ -65,13 +65,13 @@

 (s/def ::event-source-arn (spec-or-ref string?))

-(s/def ::starting-postition (spec-or-ref #{"TRIM_HORIZON" "LATEST"}))
+(s/def ::starting-position (spec-or-ref #{"TRIM_HORIZON" "LATEST"}))

 (s/def ::event-source-mapping (s/keys :req [::event-source-arn
-                                            ::function-name
-                                            ::starting-position]
+                                            ::function-name]
                                       :opt [::batch-size
-                                            ::enabled]))
+                                            ::enabled
+                                            ::starting-position]))

 (defresource event-source-mapping "AWS::Lambda::EventSourceMapping" ::event-source-mapping)
shooit commented 4 years ago

Resolved in https://github.com/brabster/crucible/pull/187