Which solution meets these requirements?
Update the EC2 user data in the Auto Scaling group lifecycle policy to copy the website assets from the EC2 instance that was launched most recently. Configure the ALB to make changes to the website assets only in the newest EC2 instance.
Copy the website assets to an Amazon Elastic File System (Amazon EFS) file system. Configure each EC2 instance to mount the EFS file system locally. Configure the website hosting application to reference the website assets that are stored in the EFS file system.
Copy the website assets to an Amazon S3 bucket. Ensure that each EC2 instance downloads the website assets from the S3 bucket to the attached Amazon Elastic Block Store (Amazon EBS) volume. Run the S3 sync command once each hour to keep files up to date.
Restore an Amazon Elastic Block Store (Amazon EBS) snapshot with the website assets. Attach the EBS snapshot as a secondary EBS volume when a new EC2 instance is launched. Configure the website hosting application to reference the website assets that are stored in the secondary EBS volume.
Explanations:
This option relies on a single EC2 instance to provide the latest website assets, which can lead to inconsistencies and increased lag time for content updates as only the newest instance is referenced.
Using Amazon EFS allows all EC2 instances to share a common file system that is consistently updated in real-time. This ensures that all instances have access to the latest website assets with minimal lag.
Downloading website assets from S3 and syncing them hourly introduces delays in content updates. There is a risk of lag time between updates and availability across instances, which is not ideal for a CMS.
Attaching an EBS snapshot as a secondary volume provides a static copy of the website assets. Any updates made after the snapshot are not reflected until a new snapshot is created and attached, leading to potential content lag.