
Ultimate access to all questions.
A company seeks to automate the identification and deletion of unused resources from previous deployments, using a central AWS CDK-managed application across multiple accounts. What is the most seamless and minimally configured solution for this automation?
A
Create a handler function in the AWS CDK application using AWS SDK for resource checks and deletions, then generate a CloudFormation template from a JSON file to deploy a Lambda function for this process during stack updates.
B
Develop a handler function within the AWS CDK application for resource management using AWS SDK, and utilize a CDK custom resource to deploy and trigger a Lambda function for this task during deployment.
C
Write a handler function in the AWS CDK application for checking and removing unused resources with AWS SDK, then establish an AWS Amplify API to deploy a Lambda function for executing this task during stack updates.
D
Compose a handler function in the Lambda console for resource checks and deletions using AWS SDK, and use a CDK custom resource to incorporate this Lambda into the stack, ensuring it runs during deployment.