- Newest
- Most votes
- Most comments
Based on your description, you're facing multiple interconnected issues with your Elastic Beanstalk environment. Let me address them:
-
Degraded Health Status: To understand why your original environment shows "Degraded" health, you should run the
eb health --refreshcommand using the EB CLI. This will provide detailed information about which instances are having problems and why. The output will show you if there are mismatched application versions, failed deployments, or other specific issues causing the degraded status. -
SSL Certificate Issues: When you removed HTTPS from your environment but still have SSL configuration files present, this can cause Nginx startup failures. You'll need to ensure all SSL configuration files are properly removed from your
.ebextensionsdirectory. For PHP environments, these would typically be in configuration files that set up Apache/Nginx with SSL modules and certificate files. -
Platform Version Upgrade: For the platform version issue (PHP 7.4 being retired), you cannot directly upgrade the major runtime version in an existing environment. This explains why your cloning attempts are failing. The recommended approach is a Blue/Green deployment:
- Create a new environment with PHP 8.1
- Deploy your application to this new environment
- Test thoroughly and fix compatibility issues between PHP 7.4 and 8.1
- Swap environment URLs once the new environment is working properly
- Terminate the old environment after confirming the new one works
- CloudFormation Stack Failure: When your environment is in a CREATE_FAILED state, you can't modify it. You'll need to terminate that failed environment and start fresh.
For your next steps:
- First, diagnose the exact cause of the "Degraded" status in your original environment
- Create a completely new environment with PHP 8.1 (don't clone)
- Review your application code for PHP 8.1 compatibility issues
- Manually configure the SSL certificates in the new environment after it's successfully created
- Test thoroughly before switching traffic to the new environment
Sources
Troubleshooting your Elastic Beanstalk environment - AWS Elastic Beanstalk
Terminating HTTPS on EC2 instances running PHP - AWS Elastic Beanstalk
How to upgrade Java Version in AWS EBS | AWS re:Post
answered a year ago
Relevant content
asked 3 years ago
