Problem with AWS invalid env

Hello,

I’m trying to deploy a React application in AWS Elastic beanstalk using Docker.

The provider that i’m using is Travis CI.My tests are running without any problem, but the problem is in deployment phase.

The problem comes from the Travis env key because i’m having the following error :

/home/travis/.rvm/gems/ruby-2.4.5/gems/aws-sdk-core-2.11.632/lib/seahorse/client/plugins/raise_response_errors.rb:15:in call': Environment named Dockerreact-env is in an invalid state for this operation. Must be Ready. (Aws::ElasticBeanstalk::Errors::InvalidParameterValue).

Here is my travis.yml file :


    sudo: required
    services:
      - docker
    
    before_install:
      - docker build -t jochri3/docker-react -f Dockerfile.dev .
    
    script:
      - docker run -e CI=true jochri3/docker-react npm run test -- --coverage
    
    deploy:
      provider: elasticbeanstalk
      region: "us-east-1"
      application: "docker-react"
      env: "Dockerreact-env"
      bucket_name: "elasticbeanstalk-us-east-1-xxxxxxxxxxxxxxx"
      bucket_path: "docker-react"
      on:
        branch: main
      access_key_id: $AWS_ACCESS_KEY
      secret_access_key: $AWS_SECRET_KEY

As you can see, the env name i’ve used is the same as in AWS.