Advise on Creating a Custom AMI from an Existing Beanstalk-Managed EC2 Instance

0

Hello,

I have an IIS application based on a Windows Server 2019 image. It is a single EC2 instance managed by Elastic Beanstalk. I'm looking to create a custom AMI based on this existing EC2 instance to provide the ability to auto-scale our Beanstalk environment as needed in the future.

Constraints:

  • This is a production environment so I'm trying to minimize downtime - a few minutes is fine but I definitely can't have a prolonged outage
  • Need to be able to retrieve passwords for the individual instances for RDP in the event that I need to view logs

I'm looking for advice on the procedures/best practices I should follow for safely doing this. For example, should I run Sysprep? The AWS docs say not to, for a production system, but I've had issues in the past with being unable retrieve passwords for custom AMIs, and was told that it may have been due to not running Sysprep.

Thanks!

feita há 2 anos578 visualizações
1 Resposta
0

As you are currently running a single instance, beanstalk performs an in-place update when you update your application versions, and as such your application might become unavailable for a short period of time. To avoid this considered switching deployment strategies to better support future needs. For example, with a blue/green approach all you would need to do is swap the CNAMEs of the two environments to redirect to the new version instantly.

There are some caveats in that the your environment must run independently of any beanstalk provisioned database.

Refer to Blue/Green deployments with Elastic Beanstalk

The following table compares deployment method properties.

MethodImpact of failed deploymentDeploy timeZero downtimeNo DNS changeRollback processCode deployed to
All at onceDowntime*NoYesManual redeployExisting instances
RollingSingle batch out of service; any successful batches before failure running new application version**YesYesManual redeployExisting instances
Rolling with an additional batchMinimal if first batch fails; otherwise, similar to Rolling***YesYesManual redeployNew and existing instances
ImmutableMinimal****YesYesTerminate new instancesNew instances
Traffic splittingPercentage of client traffic routed to new version temporarily impacted****YesYesReroute traffic and terminate new instancesNew instances
Blue/greenMinimal****YesNoSwap URLNew instances
RoB
respondido há 2 anos
  • Thanks for the response - this is good info. Basically our goal is to move towards the rolling deployment strategy to minimize downtime and allow scalability in the future. At this point my question is primarily about how to go about creating an AMI that will be appropriate for this configuration (eg the AMI creation process).

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas