An app running on your laptop is useful for development, but other people need a deployed version they can reach. That live version runs in a production environment, often called prod. Development and production are separate environments, so a change that works locally may still fail after deployment. section 5.0 section 5.4.1
Keep the code and Python dependencies compatible across both environments. For example, a to-do app can fail in prod if it uses a feature of requests that the installed production version lacks. A requirements.txt file tells pip which libraries and versions to install; Streamlit Community Cloud installs from that file when it is in the GitHub repository. section 5.4.1
Listing 5.5 A strict requirements.txt file
requests==2.31.0 streamlit==1.34.0
These exact version pins show one way to reduce differences between development and production dependencies. section 5.4.1
For more control, a Streamlit app can be packaged with Docker and deployed to AWS. In Elastic Beanstalk, an application groups environments: it might contain both production and staging. The EB CLI uses eb init to configure the application, eb create to deploy an environment, and eb deploy to send a later version to the running environment. section 12.0 section 12.3.6
Creating a live environment
During eb create, name an environment fact-frenzy-prod. A successful launch reports an application URL; after changes, eb deploy updates the running instances. Before sharing that URL, check dependencies and safeguard secrets such as API keys. section 12.3.6 section 5.0







