I have set this in the main yml file:
resources: Resources: DeadLetterQueue: Type: AWS::SQS::Queue Properties: QueueName: test-DeadLetterQueue
It creates the sqs on a full deploy. But how to i add this Queue to a function?
I get an error:
validation error detected: Value ‘https://sqs.xxxxxx/test-DeadLetterQueue’ at ‘deadLetterConfig.targetArn’ failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-])?:[a-z0-9-.]+:.)|().
Now, if i try to attach the queue like this:
resources: Resources: MyFunctionLambdaFunction: Type: "AWS::Lambda::Function" Properties: DeadLetterConfig: TargetArn: "Fn::GetAtt": - LambdaFunctionDeadLetterQueue - Arn
I get another error. (somethitng about a key, very generic) Why is this so hard to set up?