Which solution will meet this requirement with the LEAST application disruption?
Add the permission to the role. Terminate the existing EC2 instance. Launch a new EC2 instance.
Add the permission to the role so that the change will take effect automatically.
Add the permission to the role. Hibernate and restart the existing EC2 instance.
Add the permission to the S3 bucket. Restart the EC2 instance.
Explanations:
Terminating the EC2 instance and launching a new one would cause unnecessary disruption and downtime, as the application would need to be re-deployed. This does not provide the least disruption.
Adding the permission to the IAM role will allow the change to take effect immediately for the existing EC2 instance, enabling the application to read from the S3 bucket without any downtime.
While adding the permission to the role is correct, hibernating and restarting the instance is not necessary and introduces additional steps that could cause delays. The permission change takes effect without a restart.
Adding permission to the S3 bucket does not solve the issue with the IAM role and does not provide the required permissions to the EC2 instance’s application. Restarting the EC2 instance is also unnecessary for this solution.