Skip to content

Commit 98971a4

Browse files
committed
Fix syntax for cloudtrail_org s3 and lambda lists
cloudtrail-org fails with: ``` This Custom::LambdaCustomResource resource is in a CREATE_FAILED state. Received response status [FAILED] from custom resource. Message returned: An error occurred (InvalidEventSelectorsException) when calling the PutEventSelectors operation: Value arn:aws:s3:::* for DataResources.Values is invalid. ``` and: ``` Received response status [FAILED] from custom resource. Message returned: An error occurred (InvalidEventSelectorsException) when calling the PutEventSelectors operation: Value arn:aws:lambda:* for DataResources.Values is invalid. ``` Fixing this by correcting the syntax.
1 parent f3c57b7 commit 98971a4

File tree

1 file changed

+2
-2
lines changed
  • aws_sra_examples/solutions/cloudtrail/cloudtrail_org/lambda/src

1 file changed

+2
-2
lines changed

aws_sra_examples/solutions/cloudtrail/cloudtrail_org/lambda/src/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,14 @@ def get_data_event_config(
144144
}
145145
event_list: list = []
146146
if enable_s3_data_events:
147-
s3_data_resource: DataResourceTypeDef = {"Type": "AWS::S3::Object", "Values": [f"arn:{aws_partition}:s3:::*"]}
147+
s3_data_resource: DataResourceTypeDef = {"Type": "AWS::S3::Object", "Values": [f"arn:{aws_partition}:s3:::"]}
148148
event_list.append(s3_data_resource)
149149
LOGGER.info("S3 Data Events Added to Event Selectors")
150150

151151
if enable_lambda_data_events:
152152
lambda_data_resource: DataResourceTypeDef = {
153153
"Type": "AWS::Lambda::Function",
154-
"Values": [f"arn:{aws_partition}:lambda:*"],
154+
"Values": [f"arn:{aws_partition}:lambda"],
155155
}
156156
event_list.append(lambda_data_resource)
157157
LOGGER.info("Lambda Data Events Added to Event Selectors")

0 commit comments

Comments
 (0)