Examtopics

AWS Certified Solutions Architect - Professional
  • Topic 1 Question 498

    Accompany runs an application on Amazon EC2 and AWS Lambda. The application stores temporary data in Amazon S3. The S3 objects are deleted after 24 hours.

    The company deploys new versions of the application by launching AWS CloudFormation stacks. The stacks create the required resources. After validating a new version, the company deletes the old stack. The deletion of an old development stack recently failed. A solutions architect needs to resolve this issue without major architecture changes.

    Which solution will meet these requirements?

    • Create a Lambda function to delete objects from an S3 bucket. Add the Lambda function as a custom resource in the CloudFormation stack with a DependsOn attribute that points to the S3 bucket resource.

    • Modify the CloudFormation stack to attach a DeletionPolicy attribute with a value of Delete to the S3 bucket.

    • Update the CloudFormation stack to add a DeletionPolicy attribute with a value of Snapshot for the S3 bucket resource

    • Update the CloudFormation template to create an Amazon Elastic File System (Amazon EFS) file system to store temporary files instead of Amazon S3. Configure the Lambda functions to run in the same VPC as the EFS file system.


    シャッフルモード