Problem
I'm following this AWS documentation to enable HTTPS in my Flask Elastic Beanstalk environment. When I follow the steps outlined, I get the following error:
2020/08/24 21:30:04.183362 [INFO] Running command /bin/sh -c /opt/aws/bin/cfn-init -s
arn:aws:cloudformation:us-east-1:XXXXXXXXX:stack/awseb-e-XXXXXXXXX-stack/
XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX-r AWSEBAutoScalingGroup --region us-east-1
--configsets Infra-EmbeddedPostBuild
2020/08/24 21:30:04.592591 [ERROR] An error occurred during execution of command
[app-deploy] - [PostBuildEbExtension]. Stop running the command. Error: Container
commands build failed. Please refer to /var/log/cfn-init.log for more details.
I do not have ssh access to the EC2 instances that I deployed. I'm wondering about troubleshooting this particular issue, and generally how to deal with this situation in Elastic Beanstalk.
Question
- What issue might be causing the
Error: Container commands build failed
above? - What can I do to troubleshoot an issue like this if
I don't have ssh access to my EC2 instance? Is there a way to view
these
cfn-init.log
files?
Context
The app works perfectly if I exclude this 02_https_instance.config
file from my source code. I am wondering if the AWS example needs to be updated for Linux 2, as the mod24_ssl
they suggest is for Linux 1, whereas I have to use mod_ssl
in this version (Reference). Are there other code updates that are required to make this work?