File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
infrastructure/terraform/components/dl Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ module "mesh_download" {
3838 lambda_env_vars = {
3939 SSM_PREFIX = " /dl/${ var . environment } /mesh"
4040 EVENT_PUBLISHER_EVENT_BUS_ARN = aws_cloudwatch_event_bus.main.arn
41- EVENT_PUBLISHER_DLQ_URL = module.sqs_event_publisher_dlq.queue_url
41+ EVENT_PUBLISHER_DLQ_URL = module.sqs_event_publisher_errors.sqs_queue_url
4242 ENVIRONMENT = var.environment
4343 PII_BUCKET = module.s3bucket_pii_data.bucket
4444 CERTIFICATE_EXPIRY_METRIC_NAME = " mesh-download-client-certificate-near-expiry"
@@ -153,10 +153,11 @@ data "aws_iam_policy_document" "mesh_download_lambda" {
153153
154154 actions = [
155155 " sqs:SendMessage" ,
156+ " sqs:SendMessageBatch" ,
156157 ]
157158
158159 resources = [
159- module . sqs_event_publisher_dlq . sqs_queue_arn ,
160+ module . sqs_event_publisher_errors . sqs_queue_arn ,
160161 ]
161162 }
162163}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ module "mesh_poll" {
4141 MAXIMUM_RUNTIME_MILLISECONDS = " 240000" # 4 minutes (Lambda has 5 min timeout)
4242 ENVIRONMENT = var.environment
4343 EVENT_PUBLISHER_EVENT_BUS_ARN = aws_cloudwatch_event_bus.main.arn
44- EVENT_PUBLISHER_DLQ_URL = module.sqs_event_publisher_dlq.queue_url
44+ EVENT_PUBLISHER_DLQ_URL = module.sqs_event_publisher_errors.sqs_queue_url
4545 CERTIFICATE_EXPIRY_METRIC_NAME = " mesh-poll-client-certificate-near-expiry"
4646 CERTIFICATE_EXPIRY_METRIC_NAMESPACE = " dl-mesh-poll"
4747 POLLING_METRIC_NAME = " mesh-poll-successful-polls"
@@ -119,4 +119,18 @@ data "aws_iam_policy_document" "mesh_poll_lambda" {
119119 aws_cloudwatch_event_bus . main . arn ,
120120 ]
121121 }
122+
123+ statement {
124+ sid = " DLQPermissions"
125+ effect = " Allow"
126+
127+ actions = [
128+ " sqs:SendMessage" ,
129+ " sqs:SendMessageBatch" ,
130+ ]
131+
132+ resources = [
133+ module . sqs_event_publisher_errors . sqs_queue_arn ,
134+ ]
135+ }
122136}
You can’t perform that action at this time.
0 commit comments