aws / aws/aws-elastic-beanstalk-cli

eb creates environments with an old Docker platform

Open
#502 1 comment 4 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
181
Forks
88
PR merge metrics
No merged PRs in 30d

Description

### Description

When using the EB CLI 3.20.9 and 3.20.10 to create a new application/environment with "docker" as platform, the environment is created with the "Docker running on 64bit Amazon Linux 2/3.0.1" platform instead of the latest one (3.6.3 at the time of writing this). This creates a potential security threat as the old platforms have vulnerable components like NGINX 1.16.

Weirdly enough, old versions of EB CLI like 3.20.0 create the environment using the "Docker running on 64bit Amazon Linux 2/3.4.3" platform version, which is not the oldest, not the newer either.

### Steps to reproduce

Provide steps to replicate. This should include: exact `ebcli` commands, any relevant configuration files(sanitized), platform version, region, as well as any additional information you think is relevant.

```sh
eb init my-app --platform docker --region us-east-2
eb create my-app-environment
```

### Observed result

```
Creating application version archive "app-231026_174139157835".
Uploading my-app/app-231026_174139157835.zip to S3. This may take a while.
Upload Complete.
Environment details for: my-app-environment
Application name: my-app
Region: us-east-2
Deployed Version: app-231026_174139157835
Environment ID: e-cumwpsbm2c
Platform: arn:aws:elasticbeanstalk:us-east-2::platform/Docker running on 64bit Amazon Linux 2/3.0.1
Tier: WebServer-Standard-1.0
CNAME: UNKNOWN
Updated: 2023-10-26 21:41:42.265000+00:00
Alert: The platform version that your environment is using isn't recommended. There's a recommended version in the same platform branch.

Printing Status:
2023-10-26 21:41:41 INFO createEnvironment is starting.
...
```

### Expected result

The environment platform is the latest one, not the old "Docker running on 64bit Amazon Linux 2/3.0.1" one.

### Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

1. OS: macOS
2. EBCLI version: EB CLI 3.20.10 (Python 3.11.6 (main, Oct 2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)])

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `eb init my-app --platform docker --region us-east-2` and `eb create my-app-environment` using EB CLI 3.20.10. Compare the selected platform with the latest recommended Docker platform in Elastic Beanstalk; done means new environments select that current version rather than 3.0.1.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker, python
Domain
cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.