Tag Archives: Software Development

Deploy FastAPI App onto AWS

Here’s a comprehensive guide for deploying a FastAPI application with Docker on AWS:This comprehensive guide covers multiple deployment strategies for FastAPI applications on AWS. Here are the key approaches:

For “production” applications:

  • ECS with Fargate for scalable, managed container orchestration
  • Application Load Balancer for high availability and SSL termination
  • ECR for private container registry
  • CloudWatch for monitoring and logging

For simple/low-traffic applications:

  • Lambda with Mangum for serverless deployment (cost-effective for sporadic traffic)
  • EC2 with Docker Compose for full control

Key considerations:

  • Use multi-stage builds to minimize image size
  • Implement proper health checks
  • Set up auto-scaling policies
  • Use infrastructure as code (Terraform/CloudFormation)
  • Implement CI/CD pipelines for automated deployments

– manzoor

Computing Power YT

Deploy React – on AWS

Deploy on to AWS EC2 running nginx

  1. ssh into the EC2 instance
  2. if npm is NOT installed, execute sudo apt install npm -y
  3. cd into <dev> dir
  4. git clone the repo
  5. cd into the repo
  6. execute npm install
  7. execute npm run build
  8. cp -R dist/* /var/www/<host>/html
  9. might have to re-launch nginx

– manzoor

React Hello World

Create the App

  1. cd into a new / clean dir
  2. execute – npx create-react-app <app_name>
  3. a new sub-dir with this app_name will be created
  4. cd into the new sub-dir with the new app_name
  5. execute npm start – this will eventually list a local URL Open a browser to this to verify the new app is running
  6. Edit the App.js file in src dir and clear most of the content and simply replace it with “Hello World”. The app should now show “Hello World” text.

Customize the App

  1. stop the app (at least for the next step)
  2. Add bootstrap (for CSS styling)
    • execute npm install bootstrap
  3. at this point can re-launch the app by executing npm run dev

– manzoor

Deploy on to AWS

Deploy on to Heroku