Hi,
could someone help with with an example of how to provide a dead letter queue for my existing SQS queue:
e.g. below
service: email-integration
provider:
name: aws
runtime: nodejs4.3
stage: dev
region: eu-west-1
iamRoleStatements:
- Effect: "Allow"
Action:
- "sqs:"
Resource: "arn:aws:sqs:::emailtaskqueue"
- Effect: "Allow"
Action:
- "lambda:"
Resource: “*”
functions:
hello:
handler: handler.hello
events: # All events associated with this function
- http:
path: hello
method: get
emailRequestListener:
handler: emailRequestListener/handler.emailRequestListener
events:
- http:
path: sendEmail
method: post
emailTaskConsumer:
handler: emailTaskConsumer/handler.emailTaskConsumer
timeout: 200
events:
- schedule: rate(1 minute)
emailWorker:
handler: emailWorker/handler.emailWorker
resources:
Resources:
EmailTaskDeadLetterQueue:
Type: 'AWS::SQS::Queue’
Properties:
MessageRetentionPeriod: 1209600
QueueName: emailtaskdeadletterqueue
EmailTaskQueue:
Type: 'AWS::SQS::Queue'
Properties:
MessageRetentionPeriod: 1209600
QueueName: emailtaskqueue
RedrivePolicy:
???