AWS SQS queue with a dead letter queue, encryption, and alerting.
Install Node.js and npm first!
npm i @cfn-modules/sqs-queue
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'cfn-modules example'
Resources:
Queue:
Type: 'AWS::CloudFormation::Stack'
Properties:
Parameters:
AlertingModule: !GetAtt 'Alerting.Outputs.StackName' # optional
KmsKeyModule: !GetAtt 'Key.Outputs.StackName' # optional
DelaySeconds: 0 # optional
KmsDataKeyReusePeriodSeconds: 300 # optional
MaximumMessageSize: 262144 # optional
MessageRetentionPeriod: 345600 # optional
ReceiveMessageWaitTimeSeconds: 0 # optional
VisibilityTimeout: 0 # optional
TemplateURL: './node_modules/@cfn-modules/sqs-queue/module.yml'
Name | Description | Default | Required? | Allowed values |
---|---|---|---|---|
AlertingModule | Stack name of alerting module | no | ||
KmsKeyModule | Stack name of kms-key module | no | ||
DelaySeconds | The time in seconds that the delivery of all messages in the queue is delayed | 0 | no | [0-900] |
KmsDataKeyReusePeriodSeconds | The length of time in seconds that Amazon SQS can reuse a data key to encrypt or decrypt messages before calling AWS KMS again | 300 | no | [60-86400] |
MaximumMessageSize | The limit of how many bytes that a message can contain before Amazon SQS rejects it | 262144 | no | [1024-262144] |
MessageRetentionPeriod | The number of seconds that Amazon SQS retains a message | 345600 | no | [60-1209600] |
ReceiveMessageWaitTimeSeconds | Specifies the duration, in seconds, that the ReceiveMessage action call waits until a message is in the queue in order to include it in the response, as opposed to returning an empty response if a message isn't yet available | 0 | no | [0-20] |
VisibilityTimeout | The length of time during which a message will be unavailable after a message is delivered from the queue | 30 | no | [0-43200] |