https://pulumi.com logo
Title
e

elegant-printer-13257

12/24/2022, 12:29 AM
Hi! I asked chatgpt about this, but it doesn't understand me 😄 I want to use sqs queue url inside of my aws lambda that I defined through awsx.apigateway.API with pulumi. How do I use that url so that it is properly serialized? here's the pseudo-code:
const queue = new aws.sqs.Queue(`${project}-${stack}-queue`);
const api = new awsx.apigateway.API(`${project}-${stack}-api`, {
  routes: [
    {
      path: "/{proxy+}",
      method: "POST",
      eventHandler: async (request, context) => {
        const sqs = new AWS.SQS();
        sqs.sendMessage({
          MessageBody: "hi"
          QueueUrl: queue.id,
        });
      },
    },
  ],
});