Which solution will meet this requirement MOST cost-effectively?
Mount an Amazon Elastic Block Store (Amazon EBS) volume onto one of the EC2 instances. Deploy a file system on the EBS volume. Use the host operating system to share a folder. Update the application code to read and write configuration files from the shared folder.
Deploy a micro EC2 instance with an instance store volume. Use the host operating system to share a folder. Update the application code to read and write configuration files from the shared folder.
Create an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Update the application code to use the AWS SDK to read and write configuration files from Amazon S3.
Create an Amazon S3 bucket to host the repository. Migrate the existing .xml files to the S3 bucket. Mount the S3 bucket to the EC2 instances as a local volume. Update the application code to read and write configuration files from the disk.
Explanations:
Mounting an EBS volume on one EC2 instance does not provide high availability, as EBS volumes are tied to a single instance. If that instance fails, the shared folder will not be accessible, which violates the requirement for high availability. Additionally, it incurs costs for the EBS volume and requires maintenance of the file system.
Using a micro EC2 instance with an instance store volume does not provide high availability either, as instance store volumes are ephemeral and tied to a single instance. If the instance fails, data is lost, and there’s no redundancy or fault tolerance. This approach also does not scale well.
Creating an S3 bucket for hosting the configuration files offers high availability, durability, and scalability. S3 is designed to provide 99.999999999% durability, ensuring that files are accessible even if an EC2 instance fails. Updating the application to use the AWS SDK for S3 is a cost-effective way to manage configuration files without worrying about underlying infrastructure.
While using S3 to host the repository is correct, mounting the S3 bucket as a local volume is not recommended for high availability. This method can lead to performance issues and is not a native AWS solution. Additionally, it may complicate the application code and does not utilize S3’s full capabilities effectively.