Skip to content

Commit 4a410bd

Browse files
committed
handle getting params for sns
1 parent f87dda0 commit 4a410bd

File tree

1 file changed

+2
-2
lines changed
  • aws_sra_examples/solutions/genai/bedrock_org/lambda/src

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,15 +1508,15 @@ def lambda_handler(event, context):
15081508
LOGGER.info(f"ResourceType: {RESOURCE_TYPE}")
15091509
else:
15101510
LOGGER.info("ResourceType not found in event.")
1511-
get_resource_parameters(event)
15121511
if "Records" not in event and "RequestType" not in event:
15131512
raise ValueError(
15141513
f"The event did not include Records or RequestType. Review CloudWatch logs '{context.log_group_name}' for details."
15151514
) from None
15161515
elif "Records" in event and event["Records"][0]["EventSource"] == "aws:sns":
1517-
# elif event.get("Records") and event["Records"][0]["EventSource"] == "aws:sns":
1516+
get_resource_parameters(json.loads(event["Records"][0]["Sns"]["Message"]))
15181517
process_sns_records(event)
15191518
elif "RequestType" in event:
1519+
get_resource_parameters(event)
15201520
if event["RequestType"] == "Create":
15211521
LOGGER.info("CREATE EVENT!!")
15221522
create_event(event, context)

0 commit comments

Comments
 (0)