From 93fb34657b1565fc99078663002ef7084284cf44 Mon Sep 17 00:00:00 2001 From: "tobias.saunders" Date: Thu, 26 Jan 2023 16:22:35 +0000 Subject: [PATCH] wip resources for queues and lambda --- deploy-delete-user-data/template.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/deploy-delete-user-data/template.yaml b/deploy-delete-user-data/template.yaml index e88c20c690..378e89cbfc 100644 --- a/deploy-delete-user-data/template.yaml +++ b/deploy-delete-user-data/template.yaml @@ -90,8 +90,8 @@ Resources: #DeliveryPolicy: Endpoint: !GetAtt DeleteUserDataFunction.Arn Protocol: lambda - #RedrivePolicy: !Sub | #https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-configure-dead-letter-queue-redrive.html - # { "deadLetterTargetArn": "!Ref DeleteAccountSNSDeadLetterQueue" } + RedrivePolicy: !Sub "{ \"deadLetterTargetArn\": \"arn:aws:sqs:${AWS::Region}:${AWS::AccountId}:DeleteAccountSNSDLQ\" }" + TopicArn: !If - IsBuild @@ -108,8 +108,16 @@ Resources: Properties: TopicName: !Sub BuildOnlyDeleteAccountSNSTopic-${Environment} -# - #DLQ for SNS Subsciption +#DLQ for SNS Subsciption + DeleteAccountSNSDLQ: + Type: AWS::SQS::Queue + Properties: + MessageRetentionPeriod: 1209600 + #RedriveAllowPolicy: + # redrivePermission : byQueue + # sourceQueueArns : !Ref DeleteAccountSNSSubscription + QueueName: DeleteAccountSNSDLQ + #DLQ for Lambda #Alarm for DLQ #Alarm for other DLQ