Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samtranslator/model/eventsources/pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ def to_cloudformation(self, **kwargs):
if self.ConsumerGroupId:
consumer_group_id_structure = {"ConsumerGroupId": self.ConsumerGroupId}
if self.resource_type == "MSK":
lambda_eventsourcemapping.AmazonManagedKafkaConfig = consumer_group_id_structure
lambda_eventsourcemapping.AmazonManagedKafkaEventSourceConfig = consumer_group_id_structure
elif self.resource_type == "SelfManagedKafka":
lambda_eventsourcemapping.SelfManagedKafkaConfig = consumer_group_id_structure
lambda_eventsourcemapping.SelfManagedKafkaEventSourceConfig = consumer_group_id_structure
else:
raise InvalidEventException(
self.logical_id,
Expand Down
4 changes: 2 additions & 2 deletions samtranslator/model/lambda_.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ class LambdaEventSourceMapping(Resource):
"FunctionResponseTypes": PropertyType(False, is_type(list)),
"SelfManagedEventSource": PropertyType(False, is_type(dict)),
"FilterCriteria": PropertyType(False, is_type(dict)),
"AmazonManagedKafkaConfig": PropertyType(False, is_type(dict)),
"SelfManagedKafkaConfig": PropertyType(False, is_type(dict)),
"AmazonManagedKafkaEventSourceConfig": PropertyType(False, is_type(dict)),
"SelfManagedKafkaEventSourceConfig": PropertyType(False, is_type(dict)),
}

runtime_attrs = {"name": lambda self: ref(self.logical_id)}
Expand Down
2 changes: 1 addition & 1 deletion tests/translator/output/aws-cn/function_with_msk.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"Topics": [
"MyDummyTestTopic"
],
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"Topics": {
"Ref": "TopicsValue"
},
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
]
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"Topics": [
"MyDummyTestTopic"
],
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"Topics": {
"Ref": "TopicsValue"
},
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
]
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down
2 changes: 1 addition & 1 deletion tests/translator/output/function_with_msk.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"Topics": [
"MyDummyTestTopic"
],
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"Topics": {
"Ref": "TopicsValue"
},
"AmazonManagedKafkaConfig": {
"AmazonManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
]
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": "consumergroup1"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
}
}
},
"SelfManagedKafkaConfig": {
"SelfManagedKafkaEventSourceConfig": {
"ConsumerGroupId": {
"Ref": "ConsumerGroupValue"
}
Expand Down