Guides

Publish from SQS

This guide provides information on using SQS to publish events to Outpost.

Message Structure

SQS messages should have the same payload structure as the Publish API endpoint.

{ "tenant_id": "<TENANT_ID>", "destination_id": "<DESTINATION_ID>", // Optional. Provide a way of routing events to a specific destination "topic": "topic.name", // Topic defined in TOPICS environment variable "eligible_for_retry": true | false, // Should event delivery be retried? Default is true. "metadata": Payload, // can be any JSON payload, "data": Payload // can be any JSON payload }
json

Configuration

Provide Outpost with connection and routing information for your SQS instance used for publishing events.

Environment Variables

PUBLISH_AWS_SQS_REGION="<REGION>" PUBLISH_AWS_SQS_QUEUE="<QUEUE_NAME>" PUBLISH_AWS_SQS_ACCESS_KEY_ID="<KEY_ID>" PUBLISH_AWS_SQS_SECRET_ACCESS_KEY="<SECRET>"

Optionally, you can provide the PUBLISH_AWS_SQS_ENDPOINT environment variable to specify the endpoint URL for the SQS service. This can be useful for local development or when using a non-standard SQS endpoint.

Example

PUBLISH_AWS_SQS_REGION="eu-north-1" PUBLISH_AWS_SQS_QUEUE="outpost-pub-queue" PUBLISH_AWS_SQS_ACCESS_KEY_ID="REDACTED" PUBLISH_AWS_SQS_SECRET_ACCESS_KEY="REDACTED"

YAML

publishmq: aws_sqs: region: <AWS_REGION> queue: <QUEUE_NAME> access_key_id: <KEY_ID> secret_access_key: <SECRET> # Optional. # Useful for local development or when using a non-standard SQS endpoint. endpoint: <URL>
yaml

Example

publishmq: aws_sqs: region: eu-north-1 queue: outpost-pub-queue access_key_id: REDACTED secret_access_key: REDACTED
yaml

Required Permissions

The following permissions are required for the provided access key:

  • sqs:DeleteMessage
  • sqs:GetQueueUrl
  • sqs:ReceiveMessage

Troubleshooting