diff --git a/integration/resources/templates/combination/function_with_msk.yaml b/integration/resources/templates/combination/function_with_msk.yaml index 6b72c36e16..91f3a0992d 100644 --- a/integration/resources/templates/combination/function_with_msk.yaml +++ b/integration/resources/templates/combination/function_with_msk.yaml @@ -60,6 +60,7 @@ Resources: MyMskEvent: Type: MSK Properties: + Enabled: false StartingPosition: LATEST Stream: Ref: MyMskCluster diff --git a/integration/resources/templates/combination/function_with_msk_trigger_and_confluent_schema_registry.yaml b/integration/resources/templates/combination/function_with_msk_trigger_and_confluent_schema_registry.yaml index dedc27203e..44fad6ec90 100644 --- a/integration/resources/templates/combination/function_with_msk_trigger_and_confluent_schema_registry.yaml +++ b/integration/resources/templates/combination/function_with_msk_trigger_and_confluent_schema_registry.yaml @@ -60,6 +60,7 @@ Resources: MyMskEvent: Type: MSK Properties: + Enabled: false StartingPosition: LATEST Stream: Ref: MyMskCluster diff --git a/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml b/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml index c449edbc4f..6e79110756 100644 --- a/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml +++ b/integration/resources/templates/combination/function_with_msk_trigger_and_s3_onfailure_events_destinations.yaml @@ -27,6 +27,11 @@ Resources: logs:CreateLogStream, logs:PutLogEvents, s3:ListBucket] Effect: Allow Resource: '*' + - Action: [s3:PutObject, s3:ListBucket] + Effect: Allow + Resource: + - arn:aws:s3:::*/* + - arn:aws:s3:::* ManagedPolicyArns: - !Sub arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole Tags: @@ -60,6 +65,7 @@ Resources: MyMskEvent: Type: MSK Properties: + Enabled: false StartingPosition: LATEST Stream: Ref: MyMskCluster diff --git a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml index 05b0b3e54d..4c2bcf7e92 100644 --- a/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml +++ b/integration/resources/templates/combination/function_with_msk_using_managed_policy.yaml @@ -33,6 +33,7 @@ Resources: MyMskEvent: Type: MSK Properties: + Enabled: false StartingPosition: LATEST Stream: Ref: MyMskCluster diff --git a/samtranslator/internal/schema_source/aws_serverless_function.py b/samtranslator/internal/schema_source/aws_serverless_function.py index 260d2eae7b..bd60e740bc 100644 --- a/samtranslator/internal/schema_source/aws_serverless_function.py +++ b/samtranslator/internal/schema_source/aws_serverless_function.py @@ -411,6 +411,7 @@ class HttpApiEvent(BaseModel): class MSKEventProperties(BaseModel): ConsumerGroupId: Optional[PassThroughProp] = mskeventproperties("ConsumerGroupId") + Enabled: Optional[PassThroughProp] # TODO: it doesn't show up in docs yet FilterCriteria: Optional[PassThroughProp] = mskeventproperties("FilterCriteria") KmsKeyArn: Optional[PassThroughProp] # TODO: add documentation MaximumBatchingWindowInSeconds: Optional[PassThroughProp] = mskeventproperties("MaximumBatchingWindowInSeconds") diff --git a/samtranslator/schema/schema.json b/samtranslator/schema/schema.json index b6541cf061..d879a60730 100644 --- a/samtranslator/schema/schema.json +++ b/samtranslator/schema/schema.json @@ -275792,6 +275792,9 @@ "DestinationConfig": { "$ref": "#/definitions/PassThroughProp" }, + "Enabled": { + "$ref": "#/definitions/PassThroughProp" + }, "FilterCriteria": { "allOf": [ { diff --git a/schema_source/sam.schema.json b/schema_source/sam.schema.json index 169a78c7f1..f1d47e9aaf 100644 --- a/schema_source/sam.schema.json +++ b/schema_source/sam.schema.json @@ -2397,6 +2397,9 @@ "DestinationConfig": { "$ref": "#/definitions/PassThroughProp" }, + "Enabled": { + "$ref": "#/definitions/PassThroughProp" + }, "FilterCriteria": { "allOf": [ {