I am new to AWS CDK and TypeScript. Have a general question related to typescript in context with AWS CDK. I tried to find a similar example or question being asked in stackoverflow but could not find. In the code snippet below, what does this
refer to in terms of context?
// An sqs queue for unsuccessful invocations of a lambda function
import * as sqs from 'aws-cdk-lib/aws-sqs';
const deadLetterQueue = new sqs.Queue(this, 'DeadLetterQueue');
const myFn = new lambda.Function(this, 'Fn', {
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
code: lambda.Code.fromInline('// your code'),
// sqs queue for unsuccessful invocations
onFailure: new destinations.SqsDestination(deadLetterQueue),
});
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_sqs.Queue.html