I am trying to deploy an app to Elastic Beanstalk using a GitHub action. I tried to compress the file before pushing it to ELB, and it is smaller than 512MB (around 400MB), but I still see this error message when the action finishes. Any clue? Thanks
This is the action:
name: EB deploy
on:
push:
branches: [ develop ]
jobs:
deploy:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_DEVELOP_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_DEVELOP_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEVELOP_DEFAULT_REGION }}
AWS_APPLICATION_NAME: ${{ secrets.AWS_DEVELOP_APPLICATION_NAME }}
AWS_ENVIRONMENT_NAME: ${{ secrets.AWS_DEVELOP_ENVIRONMENT_NAME }}
steps:
- uses: actions/checkout@v2
- name: Install Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Generate deployment package
# run: zip -r deploy.zip * .[^.]* -x "**node_modules, Dockerfile, docker-compose.yml, vendor**"
# create the zip
run: zip -r deploy.zip . -x '*.png' -x '.gitignore' -x '/plugins/*/webroot/build/*' -x '/plugins/*/webroot/fonts/*' -x '*.git/*' -x '*.jpeg' -x 'build/*' -x '*.webp' -x 'config-dev-server' -x '*.JPG' -x '*/node_modules/*' -x '.env_example' -x '.htaccess' -x '/plugins/*/webroot/node_modules/*' -x 'webroot/webpack-updater/*' -x '.dockerignore' -x '.vscode' -x '*.gif' -x 'tmp/*' -x 'webroot/cypress/*' -x 'Dockerfile' -x 'docker-compose.yml' -x '*/files/*' -x 'webroot/tests/*' -x '/webroot/node_modules/*' -x '*.jpg' -x '/vendor/*' -x 'webroot/nodeScripts/*' -x '/db/*' -x 'config-dev-server/*' -x 'amplify/*' -x 'amplify_new/*' -x 'webroot/admin/dev/*' -x '/plugins/*/webroot/build/*' -x 'plugins/*/webroot/dev/*' -x '.elasticbeanstalk/app_versions/*'
- name: Install EB CLI using pip
run: |
python -m pip install --upgrade pip
pip install awsebcli
- name: Deploy to Elastic Beanstalk
run: |
eb init --platform 'PHP 7.4 running on 64bit Amazon Linux 2' --region 'eu-west-2' Develop
eb deploy
2
Answers
Finally I solved using a different code (uploading first to S3 and deploy from there):