Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

aws-samples/streamlit-applications-on-aws-cdk-example

Open more actions menu

Repository files navigation

Streamlit Demo CDK

This CDK is an example of how you can deploy a Streamlit application in AWS. It uses ECS Fargate for running the application.

Below is a diagram of the archicture used, at a high level:

alt text

Requirements

Docker

CDK will build the image that will be used by Amazon ECS. You will need Docker to be installed on the machine building the CDK.

Route53 Zone

To associate the Amazon Cognito user pool to a domain, we create a custom domain in a Route 53 zone. You will need a Zone ID and a Domain Name to deploy this construct.

Python Environment

Make sure to setup the venv for the CDK, see the instructions in the CDK README.

python3 -m venv ./cdk/.venv
source ./cdk/.venv/bin/activate
pip install -r cdk/requirements.txt

Deploying

yarn install
yarn deploy \
    -c zone_id="<Route53 Zone Id>" \
    -c zone_name="<Route53 Domain Name (IE: samples.aws.com)>" \
    -c hostname="<Route53 Hostname for Application (IE: streamlit)>"

You can specify a custom AWS Cognito authentication domain prefix:

yarn install
yarn deploy \
    -c zone_id="<Route53 Zone Id>" \
    -c zone_name="<Route53 Domain Name (IE: samples.aws.com)>" \
    -c hostname="<Route53 Hostname for Application (IE: streamlit)>" \
    -c cognito_domain="<Cognito Domain Prefix (Default: streamlit-auth-[Account ID])>"

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

Sample code from "Streamlit Applications on AWS CDK"

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Used by

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.