Skip to main content

Installation

Compose

The queue stack is included automatically when selecting the queue stack during /ipa.compose. Run the compose skill:

/ipa.compose

Select the queue stack when prompted for stacks to include. The compose step generates Makefile targets, parameter overrides, and cross-stack wiring for the queue tier.

Configuration

Required Parameters

ParameterTypeDescription
NamespaceStringProject namespace prefix for resource naming. 1--12 characters, lowercase alphanumeric and hyphens, must start with a letter.
EnvironmentStringDeployment environment. Allowed values: dev, staging, prod.
ImageUriStringFull ECR image URI including tag (e.g., 123456789012.dkr.ecr.us-east-1.amazonaws.com/repo:latest).
AuthIssuerStringOIDC issuer URL for JWT validation (from Cognito IssuerUrl output).
AuthAudienceStringOIDC client ID for JWT audience validation (from Cognito UserPoolClientId output).

Optional Parameters

ParameterTypeDefaultDescription
QueueNameStringjobsLogical queue name. Physical name: {Namespace}-{Environment}-{QueueName}. 1--30 characters, lowercase alphanumeric and hyphens.
VisibilityTimeoutNumber300Time in seconds a message is hidden after being received. Must exceed the worker Lambda timeout. Range: 0--43200.
MessageRetentionPeriodNumber345600Time in seconds messages are retained in the queue (default: 4 days). Range: 60--1209600.
MaxReceiveCountNumber3Number of receive attempts before a message is sent to the dead-letter queue. Range: 1--1000.
CreateDLQStringtrueWhether to create a dead-letter queue for failed messages. Allowed values: true, false.
FunctionNameStringfn-workerWorker Lambda function name suffix. 1--24 characters, lowercase alphanumeric and hyphens.
MemorySizeNumber512Worker Lambda memory allocation in MB. Range: 128--10240.
TimeoutNumber300Worker Lambda timeout in seconds. Range: 1--900.
ImageCommandCommaDelimitedListpython,-m,sqs_handlerWorker container CMD override.
EnableJobsTableStringfalseFeature flag: create a DynamoDB jobs table. Allowed values: true, false.
AlarmSnsTopicArnString(empty)SNS topic ARN for alarm actions. Leave empty to keep alarms in a disabled state.

Feature Flags

FlagDefaultEffect
EnableJobsTablefalseCreates a DynamoDB table ({Namespace}_{Environment}_jobs) with pay-per-request billing and SSE. Adds a conditional IAM policy granting the worker read/write access scoped to the table ARN.
CreateDLQtrueCreates a dead-letter queue ({Namespace}-{Environment}-{QueueName}-dlq) with 14-day retention and SQS-managed encryption. Configures a redrive policy on the main queue with the specified MaxReceiveCount. Creates a DLQ depth alarm.

Wiring

Upstream (inputs from prepare stacks)

Queue ParameterSource StackSource OutputDescription
ImageUriECRRepositoryUriContainer image URI for the worker Lambda.
AuthIssuerCognitoIssuerUrlOIDC issuer URL for JWT validation.
AuthAudienceCognitoUserPoolClientIdOIDC client ID for JWT audience validation.

Downstream (outputs consumed by backend)

Queue OutputBackend ParameterDescription
QueueUrlSqsQueueUrlSQS queue URL passed to the backend Lambda environment.
QueueArnSqsSendQueueArnsSQS queue ARN used to grant the backend Lambda send permissions.

The compose step handles all wiring automatically. No manual cross-stack references are required.

Outputs

OutputConditionDescription
QueueUrlAlwaysSQS queue URL. Consumed by the backend stack SqsQueueUrl parameter.
QueueArnAlwaysSQS queue ARN. Consumed by the backend stack SqsSendQueueArns parameter.
QueueNameAlwaysPhysical queue name ({Namespace}-{Environment}-{QueueName}).
WorkerFunctionArnAlwaysWorker Lambda function ARN.
WorkerFunctionNameAlwaysWorker Lambda function name.
DlqUrlCreateDLQ=trueDead-letter queue URL.
DlqArnCreateDLQ=trueDead-letter queue ARN.
JobsTableArnEnableJobsTable=trueDynamoDB jobs table ARN.
DashboardUrlAlwaysDirect URL to the queue CloudWatch dashboard in the AWS Console.