Last active
October 4, 2018 14:42
-
-
Save antonioned/891d3fb9ca2b10f5b8f0adfd5f42f97b to your computer and use it in GitHub Desktop.
Upgrading AWS Beanstalk Ruby 2.2 environment to Ruby 2.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Steps I did: | |
1. Launched a completely new environment on beanstalk running the ruby version that I need, 2.3 (in my case I needed an update from Ruby 2.2 to Ruby 2.3) - used the sample application for faster and easier launch. | |
2. SSH-ed into the new instance and installed all dependencies that my application needs (packages, dev tools etc.) - you can also do these in the .ebextensions directory | |
3. Created a custom AMI from the instance running ruby 2.3 with everything installed | |
4. Used the same command that Rohit posted but with some tweeks: | |
aws elasticbeanstalk update-environment --region "REGION" --environment-name "ENV_NAME" --solution-stack-name "64bit Amazon Linux 2018.03 v2.8.1 running Ruby 2.3 (Puma)" --option-settings Namespace=aws:autoscaling:launchconfiguration,OptionName=ImageId,Value="ami- | |
xxxxxxxx" | |
The AMI option-settings was key for me, as this helped me the AMI with ruby 2.3.7 installed to be used for launching the new instance on the existing environment. | |
Not to forget, I have also specified the ruby version "2.3.7" in my Gemfile and .ruby-version file in the app as well. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment