copilot-cli
copilot-cli copied to clipboard
Can't subscribe to SQS queues in Load Balanced Web Service
Hi, I have two services:
- Service A (Load Balanced Web Service)
- Service B (Worker Service)
Service A has the following config in its manifest:
publish:
topics:
- name: foo_requests
# You can register to topics from other services.
# The events can be received from an SQS queue via the env var $COPILOT_QUEUE_URI.
subscribe:
topics:
- name: foo_responses
service: service_b
Service B has the following config in its manifest:
publish:
topics:
- name: foo_responses
subscribe:
topics:
- name: foo_requests
service: service_a
In Service B, the Worker, I have all the required SNS/SQS running, and the environment variables have been set:
COPILOT_QUEUE_URI=https://sqs.ap-x.amazonaws.com/xxx/x-EventsQueue-xxx
COPILOT_SNS_TOPIC_ARNS={"foo_responses":"arn:aws:sns:xxx:xxxxx:xxxx-foo_responses"}
In Service A, the Load Balanced Web Service, I don't get COPILOT_QUEUE_URI
(it doesn't seem to ever be created). However, SNS is connected correctly:
COPILOT_SNS_TOPIC_ARNS={"foo_requests":"arn:aws:sns:xxx:xxxxx:xxxx-foo_requests"}
Is it intentional that Load Balanced Web Services can't subscribe to SQS queues? Or am I doing something wrong? Thank you.