I am trying to use AWS Beanstalk CLI to deploy a Django web application using the command line but I am not able to serve properly the static files. This is my configuration file (.elasticbeanstalk/config.yml):
branch-defaults:
aws-cli:
environment: gather-api-environment
group_suffix: null
environment-defaults:
gather-api-environment:
branch: null
repository: null
global:
application_name: gather-api-application
branch: null
default_ec2_keyname: beanstalk
default_platform: Python 3.8 running on 64bit Amazon Linux 2
default_region: eu-central-1
include_git_submodules: true
instance_profile: null
platform_name: null
platform_version: null
profile: DataArchitect
repository: null
sc: git
workspace_type: Application
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: cdm_api.wsgi:application
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: /static/
packages:
yum:
postgresql-devel: []
However, when I load this folder as a zip file using the AWS UI console ("Upload and deploy button"), it works. Here is my .ebextensions/django.config file:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: cdm_api.wsgi:application
aws:elasticbeanstalk:environment:proxy:staticfiles:
/static: /static/
Any suggestions? Let me know if more information is needed. Thanks in advance!