CodexBloom - Programming Q&A Platform

AWS Elastic Beanstalk environment scenarios to update after deploying new version with Docker configuration

👀 Views: 81 đŸ’Ŧ Answers: 1 📅 Created: 2025-05-31
aws elastic-beanstalk docker json

I'm sure I'm missing something obvious here, but I'm sure I'm missing something obvious here, but I've been banging my head against this for hours. I'm working with an scenario where my AWS Elastic Beanstalk environment does not reflect the latest changes after deploying a new version of my Docker application. I have a multi-container Docker setup defined in a `Dockerrun.aws.json` file. After I run the deployment command using the AWS CLI, I see the deployment success message, but when I check the application, it still serves the old version. The logs show the following behavior during the deployment process: ``` [behavior] Instance deployment failed: behavior retrieving logs: Timeout waiting for the instance to start ``` I have tried increasing the timeout settings in my environment's configuration by adding the following to my `.ebextensions` configuration file: ```yaml option_settings: aws:elasticbeanstalk:environment:EnvironmentProperties: DEPLOY_TIMEOUT: 1800 ``` However, this did not seem to help. I also ensured that my `Dockerfile` is correctly configured and builds without issues locally. I verified the dependencies in `requirements.txt`, and everything seems fine. Here's a snippet of my `Dockerrun.aws.json`: ```json { "AWSEBDockerrunVersion": 2, "containerDefinitions": [ { "name": "my-app", "image": "myrepo/myapp:latest", "memory": 128, "essential": true }, { "name": "my-db", "image": "myrepo/mydb:latest", "memory": 256, "essential": true } ] } ``` I've also checked the security group settings and ensured that the ports are open and configured correctly. What could be causing this scenario? Are there any specific settings or adjustments I might be overlooking to ensure that the new version gets deployed properly? Any insights would be greatly appreciated! For context: I'm using Json on Ubuntu. Thanks in advance! Is there a better approach? I've been using Json for about a year now. What's the best practice here?