From 10688f61b9a5cce4ab94d09a0f9e79c981b43f7e Mon Sep 17 00:00:00 2001 From: Stephen Liedig Date: Sat, 9 Sep 2023 21:43:44 +0800 Subject: [PATCH 1/5] chore: minor changes to template formatting --- .../integration/subscriber-policies.yaml | 5 ++- unicorn_contracts/template.yaml | 37 ++++++++----------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/unicorn_contracts/integration/subscriber-policies.yaml b/unicorn_contracts/integration/subscriber-policies.yaml index 1b0cc0a..929d627 100644 --- a/unicorn_contracts/integration/subscriber-policies.yaml +++ b/unicorn_contracts/integration/subscriber-policies.yaml @@ -15,12 +15,13 @@ Parameters: - prod Resources: - # Update this policy as you get new subscribers by adding their namespace to events:source + # This policy defines who can create rules on the event bus. Only principals subscribing to + # Contracts Service events can create rule on the bus. No rules without a defined source. CrossServiceCreateRulePolicy: Type: AWS::Events::EventBusPolicy Properties: EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsEventBus}}" - StatementId: !Sub "${AWS::StackName}-CreateRule" + StatementId: !Sub "OnlyRulesForContractServiceEvents-${Stage}" Statement: Effect: Allow Principal: diff --git a/unicorn_contracts/template.yaml b/unicorn_contracts/template.yaml index 8b695f3..01947f5 100644 --- a/unicorn_contracts/template.yaml +++ b/unicorn_contracts/template.yaml @@ -53,7 +53,7 @@ Globals: Environment: Variables: DYNAMODB_TABLE: !Ref ContractsTable - SERVICE_NAMESPACE: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebNamespace}}" + SERVICE_NAMESPACE: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}" POWERTOOLS_LOGGER_CASE: PascalCase POWERTOOLS_SERVICE_NAME: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}" POWERTOOLS_TRACE_DISABLED: "false" # Explicitly disables tracing, default @@ -106,6 +106,13 @@ Resources: ScalingConfig: MaximumConcurrency: 5 + ContractEventHandlerFunctionLogGroup: + Type: AWS::Logs::LogGroup + DeletionPolicy: Delete + UpdateReplacePolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${ContractEventHandlerFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] #### API GATEWAY REST API UnicornContractsApi: @@ -168,6 +175,14 @@ Resources: - sqs:GetQueueUrl Resource: !GetAtt UnicornContractsIngestQueue.Arn + # API GW Cloudwatch Log Group + UnicornContractsApiLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] + UnicornContractsApiGwAccountConfigRole: Type: AWS::IAM::Role Properties: @@ -221,26 +236,6 @@ Resources: - Key: namespace Value: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsNamespace}}" - - #### CLOUDWATCH LOG GROUPS - # Logs all invocations of ContractEventHandler Function - ContractEventHandlerFunctionLogGroup: - Type: AWS::Logs::LogGroup - DeletionPolicy: Delete - UpdateReplacePolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${ContractEventHandlerFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - # API GW CloudWatch Logs Group, logs all requests from API Gateway - UnicornContractsApiLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - #### DYNAMODB TABLE # Persist Contracts information in DynamoDB ContractsTable: From 8672e0315641b18e91985993fc887370a635a59a Mon Sep 17 00:00:00 2001 From: Stephen Liedig Date: Sun, 10 Sep 2023 08:48:03 +0800 Subject: [PATCH 2/5] chore: additional template updates and changes to subscriptions --- unicorn_contracts/template.yaml | 2 +- .../integration/subscriber-policies.yaml | 2 +- .../integration/subscriptions.yaml | 47 ++----- unicorn_properties/template.yaml | 117 +++++++++--------- .../integration/subscriber-policies.yaml | 2 +- unicorn_web/integration/subscriptions.yaml | 6 +- unicorn_web/template.yaml | 4 + 7 files changed, 81 insertions(+), 99 deletions(-) diff --git a/unicorn_contracts/template.yaml b/unicorn_contracts/template.yaml index 01947f5..1cb7085 100644 --- a/unicorn_contracts/template.yaml +++ b/unicorn_contracts/template.yaml @@ -273,7 +273,7 @@ Resources: Type: AWS::Events::EventBusPolicy Properties: EventBusName: !Ref UnicornContractsEventBus - StatementId: !Sub ContactsPublishEventsPolicy-${Stage} + StatementId: !Sub OnlyContactsServiceCanPublishToEventBus-${Stage} Statement: Effect: Allow Principal: diff --git a/unicorn_properties/integration/subscriber-policies.yaml b/unicorn_properties/integration/subscriber-policies.yaml index 469d548..32d3441 100644 --- a/unicorn_properties/integration/subscriber-policies.yaml +++ b/unicorn_properties/integration/subscriber-policies.yaml @@ -20,7 +20,7 @@ Resources: Type: AWS::Events::EventBusPolicy Properties: EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBus}}" - StatementId: !Sub "${AWS::StackName}-CreateRule" + StatementId: !Sub "OnlyRulesForPropertiesServiceEvents-${Stage}" Statement: Effect: Allow Principal: diff --git a/unicorn_properties/integration/subscriptions.yaml b/unicorn_properties/integration/subscriptions.yaml index 4b2a64f..0536820 100644 --- a/unicorn_properties/integration/subscriptions.yaml +++ b/unicorn_properties/integration/subscriptions.yaml @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 AWSTemplateFormatVersion: '2010-09-09' -Description: Defines the cross-service subscriptions for Unicorn Properties +Description: Defines the rule for the events (subscriptions) that Unicorn Properties wants to consume. Parameters: Stage: @@ -13,11 +13,13 @@ Parameters: - prod Resources: + + #### UNICORN CONTRACTS EVENT SUBSCRIPTIONS ContractStatusChangedSubscriptionRule: Type: AWS::Events::Rule Properties: - Name: properties.statuschanged-contract.pubevalcompleted - Description: Constract Status Changed subscription + Name: unicorn.properties-ContractStatusChanged + Description: Contract Status Changed subscription EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornContractsEventBusArn}}" EventPattern: source: @@ -28,35 +30,14 @@ Resources: Targets: - Id: SendEventTo Arn: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}" - RoleArn: !GetAtt UnicornContractsEventBusToUnicornPropertiesEventBusRole.Arn - - # This IAM role allows EventBridge to assume the permissions necessary to send events - # from the Unicorn Contracts event bus to the Unicorn Properties event bus. - # If the Unicorn Properties service wants receive events from other services, then add another policy - # the arn of the which includes the event bus arn where Unicorn Properties is creating the - # subscription (rule) - UnicornContractsEventBusToUnicornPropertiesEventBusRole: - Type: AWS::IAM::Role - Properties: - AssumeRolePolicyDocument: - Statement: - - Effect: Allow - Action: sts:AssumeRole - Principal: - Service: events.amazonaws.com - Policies: - - PolicyName: PutEventsOnUnicornPropertiesEventBus - PolicyDocument: - Statement: - - Effect: Allow - Action: events:PutEvents - Resource: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}" + RoleArn: !GetAtt UnicornPropertiesSubscriptionRole.Arn + #### UNICORN WEB EVENT SUBSCRIPTIONS PublicationApprovalRequestedSubscriptionRule: Type: AWS::Events::Rule Properties: - Name: properties.pubapprovalwf-web.pubapprovalrequested - Description: Publication Approval Requested Subscription + Name: unicorn.properties-PublicationApprovalRequested + Description: Publication evaluation completed subscription EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebEventBusArn}}" EventPattern: source: @@ -67,14 +48,12 @@ Resources: Targets: - Id: SendEventTo Arn: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}" - RoleArn: !GetAtt UnicornWebEventBusToUnicornPropertiesEventBusRole.Arn + RoleArn: !GetAtt UnicornPropertiesSubscriptionRole.Arn + # This IAM role allows EventBridge to assume the permissions necessary to send events - # from the Unicorn Web event bus to the Unicorn Properties event bus. - # If the Unicorn Properties service wants receive events from other services, then add another policy - # the arn of the which includes the event bus arn where Unicorn Properties is creating the - # subscription (rule) - UnicornWebEventBusToUnicornPropertiesEventBusRole: + # from the publishing event bus, to the subscribing event bus (UnicornPropertiesEventBusArn) + UnicornPropertiesSubscriptionRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: diff --git a/unicorn_properties/template.yaml b/unicorn_properties/template.yaml index 3232480..5f5a7d6 100644 --- a/unicorn_properties/template.yaml +++ b/unicorn_properties/template.yaml @@ -116,6 +116,15 @@ Resources: Type: SQS Destination: !GetAtt PropertiesServiceDLQ.Arn + # Log group for the ContractStatusChangedHandlerFunction + ContractStatusChangedHandlerFunctionLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${ContractStatusChangedHandlerFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] + # Listens to Contract status changes from ContractStatusTable to un-pause StepFunctions PropertiesApprovalSyncFunction: Type: AWS::Serverless::Function @@ -154,6 +163,15 @@ Resources: Type: SQS Destination: !GetAtt PropertiesServiceDLQ.Arn + # Log group for the PropertiesApprovalSyncFunction + PropertiesApprovalSyncFunctionLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${PropertiesApprovalSyncFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] + # Part of the ApprovalStateMachine, checks if a given Property has an existing Contract in ContractStatusTable ContractExistsCheckerFunction: Type: AWS::Serverless::Function @@ -164,12 +182,30 @@ Resources: - DynamoDBCrudPolicy: TableName: !Ref ContractStatusTable + # Log group for the ContractExistsCheckerFunction + ContractExistsCheckerFunctionLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${ContractExistsCheckerFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] + # Part of the ApprovalStateMachine, validates if all outputs of content checking steps are OK ContentIntegrityValidatorFunction: Type: AWS::Serverless::Function Properties: - CodeUri: src/ - Handler: properties_service.content_integrity_validator_function.lambda_handler + CodeUri: src/ + Handler: properties_service.content_integrity_validator_function.lambda_handler + + # Log group for the ContentIntegrityValidatorFunction + ContentIntegrityValidatorFunctionLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${ContentIntegrityValidatorFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] # Part of the ApprovalStateMachine, pauses the workflow execution and stores token in ContractStatusTable until contract is approved WaitForContractApprovalFunction: @@ -181,6 +217,14 @@ Resources: - DynamoDBCrudPolicy: TableName: !Ref ContractStatusTable + # Log group for the WaitForContractApprovalFunction + WaitForContractApprovalFunctionLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/lambda/${WaitForContractApprovalFunction}" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] #### STATE MACHINE ApprovalStateMachine: @@ -248,6 +292,14 @@ Resources: EventBusName: !GetAtt UnicornPropertiesEventBus.Name ServiceName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesNamespace}}" + # Store ApprovalStateMachineLogGroup workflow execution logs + ApprovalStateMachineLogGroup: + Type: AWS::Logs::LogGroup + UpdateReplacePolicy: Delete + DeletionPolicy: Delete + Properties: + LogGroupName: !Sub "/aws/states/${AWS::StackName}-ApprovalStateMachine" + RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] #### DEAD LETTER QUEUES # Store EventBridge events that failed to be DELIVERED to ContractStatusChangedHandlerFunction @@ -282,59 +334,6 @@ Resources: - Key: stage Value: !Ref Stage - - #### CLOUDWATCH LOG GROUPS - # Store Lambda execution logs for each Lambda function in Unicorn Properties Service - ContractStatusChangedHandlerFunctionLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${ContractStatusChangedHandlerFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - PropertiesApprovalSyncFunctionLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${PropertiesApprovalSyncFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - ContractExistsCheckerFunctionLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${ContractExistsCheckerFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - ContentIntegrityValidatorFunctionLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${ContentIntegrityValidatorFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - WaitForContractApprovalFunctionLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/lambda/${WaitForContractApprovalFunction}" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - # Store ApprovalStateMachineLogGroup workflow execution logs - ApprovalStateMachineLogGroup: - Type: AWS::Logs::LogGroup - UpdateReplacePolicy: Delete - DeletionPolicy: Delete - Properties: - LogGroupName: !Sub "/aws/states/${AWS::StackName}-ApprovalStateMachine" - RetentionInDays: !FindInMap [LogsRetentionPeriodMap, !Ref Stage, Days] - - #### DYNAMODB TABLE ContractStatusTable: Type: AWS::DynamoDB::Table @@ -371,7 +370,7 @@ Resources: Type: AWS::Events::EventBusPolicy Properties: EventBusName: !Ref UnicornPropertiesEventBus - StatementId: !Sub PropertiesPublishEventsPolicy-${Stage} + StatementId: !Sub OnlyPropertiesServiceCanPublishToEventBus-${Stage} Statement: Effect: Allow Principal: @@ -384,12 +383,12 @@ Resources: events:source: - !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesNamespace}}" - # Catchall rule used for development purposes. Logs all events matching any of the services' to CloudWatch Logs + # Catchall rule used for development purposes. Logs all events matching any of the services to CloudWatch Logs UnicornPropertiesCatchAllRule: Type: AWS::Events::Rule Properties: - Name: contracts.catchall - Description: Catch all events published by the contracts service. + Name: properties.catchall + Description: Catchall rule used for development purposes. EventBusName: !Ref UnicornPropertiesEventBus EventPattern: account: diff --git a/unicorn_web/integration/subscriber-policies.yaml b/unicorn_web/integration/subscriber-policies.yaml index 3a32423..c7aaa03 100644 --- a/unicorn_web/integration/subscriber-policies.yaml +++ b/unicorn_web/integration/subscriber-policies.yaml @@ -20,7 +20,7 @@ Resources: Type: AWS::Events::EventBusPolicy Properties: EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebEventBus}}" - StatementId: !Sub "${AWS::StackName}-CreateRule" + StatementId: !Sub "OnlyRulesForPropertiesServiceEvents-${Stage}" Statement: Effect: Allow Principal: diff --git a/unicorn_web/integration/subscriptions.yaml b/unicorn_web/integration/subscriptions.yaml index 16a8819..9d7a2bf 100644 --- a/unicorn_web/integration/subscriptions.yaml +++ b/unicorn_web/integration/subscriptions.yaml @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 AWSTemplateFormatVersion: '2010-09-09' -Description: Defines the cross-service subscriptions for Unicorn Web +Description: Defines the rule for the events (subscriptions) that Unicorn Properties wants to consume. Parameters: Stage: @@ -16,8 +16,8 @@ Resources: PublicationEvaluationCompletedSubscriptionRule: Type: AWS::Events::Rule Properties: - Name: web.pubapprovalwf-properties.pubapprovalrequested - Description: Publication Evaluation Completed Subscription + Name: unicorn.web-PublicationEvaluationCompleted + Description: PublicationEvaluationCompleted subscription EventBusName: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornPropertiesEventBusArn}}" EventPattern: source: diff --git a/unicorn_web/template.yaml b/unicorn_web/template.yaml index 031b2ca..a581dd8 100644 --- a/unicorn_web/template.yaml +++ b/unicorn_web/template.yaml @@ -94,6 +94,7 @@ Resources: - DynamoDBReadPolicy: TableName: !Ref WebTable + # Log group for the SearchFunction SearchFunctionLogGroup: Type: AWS::Logs::LogGroup UpdateReplacePolicy: Delete @@ -123,6 +124,7 @@ Resources: ScalingConfig: MaximumConcurrency: 5 + # Log group for the RequestApprovalFunction RequestApprovalFunctionLogGroup: Type: AWS::Logs::LogGroup UpdateReplacePolicy: Delete @@ -156,6 +158,7 @@ Resources: detail-type: - PublicationEvaluationCompleted + # Log group for the PublicationApprovedEventHandlerFunction PublicationApprovedEventHandlerFunctionLogGroup: Type: AWS::Logs::LogGroup UpdateReplacePolicy: Delete @@ -277,6 +280,7 @@ Resources: Value: !FindInMap [Constants, ProjectName, Value] - Key: namespace Value: !Sub "{{resolve:ssm:/uni-prop/${Stage}/UnicornWebNamespace}}" + # DeadLetterQueue for UnicornWebIngestQueue. Contains messages that failed to be processed UnicornWebIngestDLQ: Type: AWS::SQS::Queue From 468e746d28b9d191c3facb286a496b52f38ac2c4 Mon Sep 17 00:00:00 2001 From: Stephen Liedig Date: Sun, 10 Sep 2023 08:54:15 +0800 Subject: [PATCH 3/5] chore: additional template updates and changes to subscriptions --- unicorn_web/integration/subscriptions.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/unicorn_web/integration/subscriptions.yaml b/unicorn_web/integration/subscriptions.yaml index 9d7a2bf..a3880c0 100644 --- a/unicorn_web/integration/subscriptions.yaml +++ b/unicorn_web/integration/subscriptions.yaml @@ -13,6 +13,7 @@ Parameters: - prod Resources: + #### UNICORN PROPERTIES EVENT SUBSCRIPTIONS PublicationEvaluationCompletedSubscriptionRule: Type: AWS::Events::Rule Properties: @@ -31,10 +32,7 @@ Resources: RoleArn: !GetAtt UnicornPropertiesEventBusToUnicornWebEventBusRole.Arn # This IAM role allows EventBridge to assume the permissions necessary to send events - # from the Unicorn Contracts event bus to the Unicorn Properties event bus. - # If the Unicorn Properties service wants receive events from other services, then add another policy - # the arn of the which includes the event bus arn where Unicorn Properties is creating the - # subscription (rule) + # from the publishing event bus, to the subscribing event bus (UnicornWebEventBusArn) UnicornPropertiesEventBusToUnicornWebEventBusRole: Type: AWS::IAM::Role Properties: From 9dd5807a2823d1aa9fed02ae478326cc71be490c Mon Sep 17 00:00:00 2001 From: Stephen Liedig Date: Sun, 10 Sep 2023 22:38:18 +0800 Subject: [PATCH 4/5] fix: updated rule name --- unicorn_properties/template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unicorn_properties/template.yaml b/unicorn_properties/template.yaml index 5f5a7d6..6f093a4 100644 --- a/unicorn_properties/template.yaml +++ b/unicorn_properties/template.yaml @@ -195,8 +195,8 @@ Resources: ContentIntegrityValidatorFunction: Type: AWS::Serverless::Function Properties: - CodeUri: src/ - Handler: properties_service.content_integrity_validator_function.lambda_handler + CodeUri: src/ + Handler: properties_service.content_integrity_validator_function.lambda_handler # Log group for the ContentIntegrityValidatorFunction ContentIntegrityValidatorFunctionLogGroup: @@ -271,7 +271,7 @@ Resources: PubApproReqEvent: Type: EventBridgeRule Properties: - RuleName: properties.pubapprovalwf-web.pubapprovalrequested + RuleName: unicorn.properties-PublicationApprovalRequested EventBusName: !GetAtt UnicornPropertiesEventBus.Name Pattern: source: From 1c803355fa8b49da6cf72558c51b989a758d4e7e Mon Sep 17 00:00:00 2001 From: Stephen Liedig Date: Sun, 10 Sep 2023 23:57:20 +0800 Subject: [PATCH 5/5] fix: updated rule names --- unicorn_properties/template.yaml | 2 +- unicorn_web/template.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unicorn_properties/template.yaml b/unicorn_properties/template.yaml index 6f093a4..2e8100f 100644 --- a/unicorn_properties/template.yaml +++ b/unicorn_properties/template.yaml @@ -98,7 +98,7 @@ Resources: StatusChangedEvent: Type: EventBridgeRule Properties: - RuleName: properties.contstatuschangedhdr-contracts.contstatuschanged + RuleName: unicorn.properties-ContractStatusChanged EventBusName: !GetAtt UnicornPropertiesEventBus.Name Pattern: source: diff --git a/unicorn_web/template.yaml b/unicorn_web/template.yaml index a581dd8..40ed3ec 100644 --- a/unicorn_web/template.yaml +++ b/unicorn_web/template.yaml @@ -150,7 +150,7 @@ Resources: ApprovalEvent: Type: EventBridgeRule Properties: - RuleName: web.publicationapproved-properties.pubevalcompleted + RuleName: unicorn.web-PublicationEvaluationCompleted EventBusName: !Ref UnicornWebEventBus Pattern: source: