Skip to content

Commit 5a18c93

Browse files
committed
invalidparameterexception arn validation failed handling
1 parent a24afae commit 5a18c93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aws_sra_examples/solutions/genai/bedrock_org/lambda/src/sra_cloudwatch.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ def create_oam_link(self, sink_arn: str) -> str:
481481
if error.response["Error"]["Code"] == "ConflictException":
482482
self.LOGGER.info(f"Observability access manager link for {sink_arn} already exists")
483483
return self.find_oam_link(sink_arn)[1]
484+
if error.response["Error"]["Code"] == "InvalidParameterException":
485+
self.LOGGER.info(f"Arn validation may have failed for {sink_arn}")
486+
return "error"
484487
self.LOGGER.info(self.UNEXPECTED)
485488
raise ValueError(f"Unexpected error executing Lambda function. {error}") from None
486489

0 commit comments

Comments
 (0)