Skip to content

Commit 52b45a2

Browse files
committed
fix kms key alias Arn format
1 parent 3388407 commit 52b45a2

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
@@ -775,7 +775,7 @@ def deploy_metric_filters_and_alarms(region, accounts, resource_properties):
775775
CFN_RESPONSE_DATA["deployment_info"]["resources_deployed"] += 1
776776
# Add KMS resource records to sra state table
777777
add_state_table_record("kms", "implemented", "alarms sns kms key", "key", f"arn:aws:kms:{region}:{acct}:key/{alarm_key_id}", acct, region, alarm_key_id, alarm_key_id)
778-
add_state_table_record("kms", "implemented", "alarms sns kms alias", "alias", f"arn:aws:kms:{region}:{acct}:{ALARM_SNS_KEY_ALIAS}", acct, region, ALARM_SNS_KEY_ALIAS, alarm_key_id)
778+
add_state_table_record("kms", "implemented", "alarms sns kms alias", "alias", f"arn:aws:kms:{region}:{acct}:alias/{ALARM_SNS_KEY_ALIAS}", acct, region, ALARM_SNS_KEY_ALIAS, alarm_key_id)
779779

780780
else:
781781
LOGGER.info("DRY_RUN: Creating SRA alarm KMS key")
@@ -786,7 +786,7 @@ def deploy_metric_filters_and_alarms(region, accounts, resource_properties):
786786
LOGGER.info(f"Found SRA alarm KMS key: {alarm_key_id}")
787787
# Add KMS resource records to sra state table
788788
add_state_table_record("kms", "implemented", "alarms sns kms key", "key", f"arn:aws:kms:{region}:{acct}:key/{alarm_key_id}", acct, region, alarm_key_id, alarm_key_id)
789-
add_state_table_record("kms", "implemented", "alarms sns kms alias", "alias", f"arn:aws:kms:{region}:{acct}:{ALARM_SNS_KEY_ALIAS}", acct, region, ALARM_SNS_KEY_ALIAS, alarm_key_id)
789+
add_state_table_record("kms", "implemented", "alarms sns kms alias", "alias", f"arn:aws:kms:{region}:{acct}:alias/{ALARM_SNS_KEY_ALIAS}", acct, region, ALARM_SNS_KEY_ALIAS, alarm_key_id)
790790

791791

792792
# 4b) SNS topics for alarms

0 commit comments

Comments
 (0)