Add the s3fs package to your requirements.txt file, preferably pinning its version (replace x.x.x with the version you want installed):
```bash
requirements.txt
s3fs==x.x.x
```
Write your Streamlit app
Copy the code below to your Streamlit app and run it. Make sure to adapt the name of your bucket and file. Note that Streamlit automatically turns the access keys from your secrets file into environment variables, where s3fs searches for them by default.
```python
streamlit_app.py
import streamlit as st
import s3fs
import os
Create connection object.
anon=False means not anonymous, i.e. it uses access keys to pull data.
fs = s3fs.S3FileSystem(anon=False)
Retrieve file contents.
Uses st.cache to only rerun when the query changes or after 10 min.
@st.cache(ttl=600)
def read_file(filename):
    with fs.open(filename) as f:
