<aside> ⚠️ DEPRECATED!!! This guide migrated to our docs. Please view the current version at: https://docs.streamlit.io/en/stable/tutorial/aws_s3.html
</aside>
This guide explains how to securely access files on AWS S3 from Streamlit sharing or Streamlit for Teams. It uses the s3fs library and Streamlit's secrets management (requires streamlit v0.80.0 or higher).
<aside> 🏃 If you already have a bucket that you want to use, feel free to skip this step.
</aside>
First, sign up for AWS or log in. Go to the S3 console and create a new bucket (click on the screenshots to enlarge):
Navigate to the upload section of your new bucket:
And upload the following CSV file, which contains some example data:
Go to the AWS console, create access keys as shown below and copy the "Access Key ID" and "Secret Access Key":
<aside> 🤫 Store the key in a safe location and don't share it with anyone.
</aside>
<aside> ☝ Access keys created as a root user have wide-ranging permissions. In order to make your AWS account more secure, you should consider creating an IAM account with restricted permissions and using its access keys. More information here.
</aside>
Your local Streamlit app will read secrets from a file .streamlit/secrets.toml
in your app's root dir. Create this file if it doesn't exist yet and add the access key to it as shown below: