To Achieve

  • Make StreamLit Application

  • Define a initial Rules

    • Size of the Ec2
    • Subdomain of the system
  • Start An Ec2 Instance

  • Connect to that Ec2 Instance

  • Install All the libraries

  • Clone the repo from the Github

    • Will need the access to your Github Repository
  • Download the Env files for the application to run

    • From S3
    • Decrypt it
  • Install the libraries

  • Run the Application

  • Setup Nginx

  • Update the route 53

  • See the result

Diksha

Here’s the updated bullet list with proper flow:


  • Set up Pulumi in your local environment:

    • Install the Pulumi CLI.

    • Log in to Pulumi Cloud (or configure your own backend).

    • Initialize a new Pulumi project using Python.

    • Configure AWS credentials for Pulumi to access your account.

  • Use Pulumi to define and provision infrastructure on AWS.

  • Create an EC2 instance with a specified instance type.

  • Set up security groups for SSH, HTTP, and HTTPS access.

  • Allocate and attach an Elastic IP (optional but recommended).

  • Configure Route 53 to point a custom subdomain to the EC2 instance.

  • Provide a userData script that:

    • Installs Docker on the EC2 instance.

    • Pulls and runs the Dockerized Streamlit application.

    • Installs required system packages and dependencies.

    • Clones the GitHub repo containing the application.

    • Downloads .env or secrets files from S3.

    • Decrypts secrets using AWS KMS or other tools.

    • Sets up and starts Nginx as a reverse proxy to Streamlit.

  • Make the application available via the configured subdomain.

  • Trigger the entire workflow from one Pulumi script, ensuring full automation.


Let me know if you’d like this turned into a formal plan or doc format.