Soru

Zorluk: OrtaDeployment Strategies and Execution

A SysOps administrator needs to perform a major platform version upgrade for a production web application hosted on AWS Elastic Beanstalk. The application's Amazon RDS DB instance is currently coupled to the Elastic Beanstalk environment. The upgrade must be performed with zero downtime, and the database data must be preserved.

Which combination of actions should the administrator take to meet these requirements? (Select TWO.)

  1. Create a DB snapshot of the coupled RDS DB instance, restore it to a standalone RDS DB instance, and configure the existing Elastic Beanstalk environment to use the connection details of the standalone instance.Cevap
  2. Launch a new Elastic Beanstalk environment without a coupled database, configure it to use the connection details of the standalone RDS DB instance, swap the environment CNAMEs, and terminate the old environment.Cevap
  3. C
    Perform an in-place deployment on the existing Elastic Beanstalk environment to upgrade the platform version, relying on the coupled database's automatic failover to prevent application downtime.
  4. D
    Perform a CNAME swap directly between the existing environment and a new environment with its own newly launched coupled database, then delete the old environment's CloudFormation stack with rollback termination protection enabled.
  5. E
    Target the Beanstalk environment's Amazon EC2 instances with an AWS Systems Manager Run Command script to perform the platform version upgrade in place without modifying the coupled database.

Cevap

Create a DB snapshot of the coupled RDS DB instance, restore it to a standalone RDS DB instance, and configure the existing Elastic Beanstalk environment to use the connection details of the standalone instance; then launch a new Elastic Beanstalk environment without a coupled database, configure it to use the connection details of the standalone RDS DB instance, swap the environment CNAMEs, and terminate the old environment.
To perform a zero-downtime upgrade when a database is coupled to an Elastic Beanstalk environment, the database must first be decoupled. The correct sequence involves taking an RDS snapshot of the coupled DB, launching a standalone RDS instance from that snapshot, and configuring the active environment to use the new standalone instance. Once the active environment is successfully running on the decoupled database, a new environment running the upgraded platform version is launched (pointing to the same standalone database). A CNAME swap redirects traffic to the new environment without downtime, and the old environment can be safely terminated without deleting the database.

Adım Adım Çözüm

1
Take an Amazon RDS snapshot of the coupled database.
A point-in-time snapshot of the database is created.
This captures the current application data state before decoupling.
2
Restore the snapshot to a new standalone RDS instance, and update the connection details in the existing Elastic Beanstalk environment to point to this standalone database.
The existing environment runs against the new standalone RDS instance.
This decouples the database from the life cycle of the Elastic Beanstalk environment.
3
Launch a new Elastic Beanstalk environment with the upgraded platform version, pointing to the standalone database, perform a CNAME swap, and terminate the old environment.
The application traffic is cut over to the new environment with zero downtime, and the old environment is safely deleted without deleting the database.
This completes the Blue/Green deployment strategy and cleans up the obsolete resources.

Anahtar Kavram

Decoupling databases in Elastic Beanstalk for Blue/Green deployments
Bu soruyu puanla