Hey! I have set up a new `Queue` and Im trying to...
# help
t
Hey! I have set up a new
Queue
and Im trying to publish messages to it. Getting the following error.
Copy code
UnknownEndpoint: Inaccessible host: `my-queue-name' at port `undefined'. This service may not be available in the `eu-north-1' region.
I have passed in
queueUrl
as this example (https://github.com/serverless-stack/serverless-stack/blob/master/examples/queue/stacks/MyStack.ts)
Copy code
environment: {
            queueUrl: queue.queueName,
          },
Might be a permission problem..
Did not seem to help to give my notification function permission to the queue.
Copy code
myNotification: {
        function: {
          handler: "src/External/notification.main",
          environment: {
            queueUrl: queue.queueName,
          },
          timeout: "30 seconds",
          permissions: [queue],
        },
        events: ["object_created"],
      },
t
I believe you need to pass queue.queueUrl
t
Figured it was something like that, works now.
Thought I fixed it.. but no.
t
can you try passing
queueArn
- if that doesn't work queueUrl is actually availble under
queue.cdk.queue.queueUrl
we should move it up though
t
ill try with arn first
queueArn
did not work but
queue.cdk.queue.queueUrl
did
f
Opened a PR to expose
queue.queueUrl
. Will merge after tests pass. https://github.com/serverless-stack/serverless-stack/pull/1705
Hey @Tobias T, in
v1.2.0
u can access
queue.queueUrl
directly.