How is the environmental URL exchanged?

I recently used a SWAP address to update my Elastic Beanstalk application using two environments. I have a CNAME record with a different url mapped to a beanstalk url. Then I tried to click on the production environment (which was now on the test URL), and then changed again, but it seemed to be broken.

I would expect the swap to map the test environment to the production URL, which means that when I previously pushed the test environment to test, now I have to click on the production environment and then swap to do another update with zero time downtime, This can be very confusing, so I was hoping someone could shed some light on this, as there seems to be some information on Elastic Beanstalk and sharing URLs.

+4
amazon-web-services production-environment beanstalk
source share
2 answers

The swap URL is a simple CNAME exchange operation between two Green / Ready environments. It has nothing to do with route 53 (or any other DNS). The only thing he does is just exchange two CNAMEs. For example, you have one environment foo-1 with CNAME foo-1.example.com , and another foo-2 with CNAME foo-2.example.com . After the swap environment foo-1 responds to http://foo-2.example.com .

This operation is required to deploy a new version of your application with zero downtime. Your DNS will point your www.example.com to foo-1 , which will be changed on the fly by replacing CNAME for a few seconds. Users will not see delays if your application knows how to share resources (for example, with a database).

You can take a look at jcabi-beanstalk-maven-plugin (I'm a developer). This Maven plugin performs exactly this CNAME exchange operation in a completely automated way.

+5
source share

Please be careful about which topic "Swap URL" is being discussed ... If you mean AWAS Elastic Beanstalk "Actions" | " Swap URL Environment ", my experience is that this feature has nothing to do with DNS and is not connected to route 53.

From what I see, the AWS EB Swap URL just changes the public URL of your beanstalk environments ... Keep you from having to change your DNS at all.

Example:

Suppose you have two EB environments:

"quality" with the EB URL "quality-qq443224.elasticbeanstalk.com"

"quality-patched1" with the EB URL "quality-patched1.elasticbeanstalk.com"

If you select the instance of "quality-patched1" and select the "Swap Environment URL" with your instance of "quality" ... Everything that happens will now display as :

"quality" with the EB URL "quality-patched1.elasticbeanstalk.com"

"quality-patched1" with the EB URL "quality-qq443224.elasticbeanstalk.com"

Therefore, your EXISTING DNS CNAMEs (supposedly located in Route 53 and supposed to indicate / quality -qq443224 ... /) should not be changed at all ... They will be sent to your new one .

+4
source share

All Articles