Skip to content

Python and Flask with Jinja2 Templates and Elastic Beanstalk Customization

Compare
Choose a tag to compare
@evandbrown evandbrown released this 12 Jul 14:35
· 7 commits to master since this release

Extending the sample in the AWS Elastic Beanstalk Developer Guide, this release adds Jinja2 templates and static files, as well as Elastic Beanstalk container customization via the .ebextensions directory.

Elastic Beanstalk configuration files (discussed in the documentation allow an Elastic Beanstalk application to be customized via code. In this release, we create a .ebextensions/python.config in our application and specify a setting that will allow our app to serve static assets:

option_settings:
  - namespace: aws:elasticbeanstalk:container:python:staticfiles
    option_name: /static/
    value: static/

The ZIP file attached to this release can be deployed directly to AWS Elastic Beanstalk.