Elastic Beanstalk no longer recommended

please post the logs

Thanks, I tried it again now and it came up fine. All good now

I'm trying to deploy 48.3 to EBS by updating the version number in the dockerrun JSON file but I'm getting an error. I'm planning to move out of Elastic Beanstalk but any insight into this issue so that I can kick that can down the road a little while longer would be appreciated :smiley:

Here's where the build is failing:

eb-engine.log

2024/01/24 23:17:22.682820 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s arn:aws:cloudformation:us-east-1:xxx:stack/awseb-e-xx-stack/xxx-xxx-xxx-xxx-xxx-r AWSEBAutoScalingGroup --region us-east-1 --configsets Infra-EmbeddedPostBuild
2024/01/24 23:17:23.125897 [INFO] Error occurred during build: Command 01-persist_env_vars failed

cfn-init.log

2024-01-24 23:17:23,063 [INFO] Running config postbuild_0_Metabase
2024-01-24 23:17:23,087 [ERROR] Command 01-persist_env_vars (.ebextensions/metabase_config/metabase-setup.sh set_up_env_vars) failed
2024-01-24 23:17:23,087 [ERROR] Error encountered during build of postbuild_0_Metabase: Command 01-persist_env_vars failed
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 579, in run_config
    CloudFormationCarpenter(config, self._auth_config, self.strict_mode).build(worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 278, in build
    self._config.commands)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
    raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 01-persist_env_vars failed
2024-01-24 23:17:23,089 [ERROR] -----------------------BUILD FAILED!------------------------
2024-01-24 23:17:23,089 [ERROR] Unhandled exception during build: Command 01-persist_env_vars failed
Traceback (most recent call last):
  File "/opt/aws/bin/cfn-init", line 181, in <module>
    worklog.build(metadata, configSets, strict_mode)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 137, in build
    Contractor(metadata, strict_mode).build(configSets, self)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 567, in build
    self.run_config(config, worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 579, in run_config
    CloudFormationCarpenter(config, self._auth_config, self.strict_mode).build(worklog)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/construction.py", line 278, in build
    self._config.commands)
  File "/usr/lib/python3.7/site-packages/cfnbootstrap/command_tool.py", line 127, in apply
    raise ToolError(u"Command %s failed" % name)
cfnbootstrap.construction_errors.ToolError: Command 01-persist_env_vars failed

Just by chance are you using the old beanstalk platform?

I'm not entirely sure what the old beanstalk platform is, nor where I could find that out...

All I can see is that it's a managed platform deployment, and the platform branch is Docker running on 64bit Amazon Linux 2, running version 3.6.5

Elastic Beanstalk still works for me without a problem.

Here’s a script a use to upgrade in a single step:

It just grabs the latest AWS EB release from Metabase, replaces the image tag for the requested one and uploads that to S3. From there it creates an EB application version and finally updates the EB environment.

Hi there - I also been using EB for 3 years - and upgrade was always seamless - I have been sidelined and didnt get to upgrade for a while - so am currently on 46.3 - want to get current - so 49.11
I'm also on a Mac - and noted there are issues with zip editing ?
@daniel_fondeadora - will your github script work for me ?
thx

Note that I run in http://healthily-metabase1.ap-southeast-2.elasticbeanstalk.com/

Can’t see why it wouldn’t work. You can always try it and revert if something doesn’t look right.

Please check the docs Running Metabase on AWS Elastic Beanstalk

Ahh thx Luigi
Can you clarify how to do on an Apple Mac
I noted in the commentary above some issue with zip / in zip ??

yes, watch out on macs as the OS always writes hidden files, so try doing everything through the terminal

Thank you
i'm an ex coder but never used terminal

i set up a directory just called "metabase"
copied the current metabase-aws-eb.zip into it
did "unzip metabase-aws-eb.zip"
it created the subdirectories with files .platform and .ebextensions and the Dockerrun.aws.json
I edited the Dockerrun.aws.json with Textedit and changed from 47.2 to 49.12
HOW do i now zip that up again ? (I tried googling and a few different zip commands but doesnst seem to be working)


Screenshot 2024-05-28 at 4.04.32 PM

What is the actual command ?
do I run that command in the same directory as I'm in
which has the original zip file still ?
thx

I think all ok _ figured out I need to be in the parent directory - and also deleted the orginal zip file from the directory so - looks good below ?

Hi luiggi (and all)
I am planning to upgrade tonight (AEST ie UTC _+ 10) - so in about 8 hours time

Since I prepared the zip for 49.12 - I see there is now a 50.0 release out

  1. Can I still upgrade to 49.12 (I don't want to be an early adopter for 50)
    ie it will still work even though a later release is available ?
    and
  2. assume I can revert to 47.3 (current) by simply "deploy" on the prior application version) in case there is any issue ?

    Thx
    Neil

always always always do a backup in your RDS before doing the upgrade. If you want to downgrade, restore the backup

For anyone else landing here, I ended up deploying my Metabase instance to AWS App Runner. This might not be the perfect solution (App Runner scales CPU down when there's no incoming traffic, which might not play nicely with Metabase's background workers) but it has served my needs and I haven't run into any issues. No servers to manage by hand, either.

I wrote a tutorial here which explains how to set this up with Terraform/OpenTofu: Deploy Metabase on AWS App Runner | Sophia Willows

Hi Luiggi

I have not yet upgraded using EB from version 46.3

TO confirm - if the upgrade doesnt work - to return to the prior working installation I do :-
a) restore the RDS backup as stated
b) how do I restore the software version ?? (is that a 'deploy" on the prio appp version as per my comment on 5 Jun ? )

you just simply restore the old beanstalk file. Please consider moving towards a newer version