Code Monkey home page Code Monkey logo

aws-application-load-balancer-elastic-container-service-template's Introduction

AWS Microservices Template

This repository offers a template for deploying microservices on AWS, leveraging Application Load Balancer (ALB) and Elastic Container Service (ECS).

  • Infrastructure Management: Utilizes the AWS Cloud Development Kit (CDK) in TypeScript for robust Infrastructure as Code (IaC) capabilities.
  • Traffic Routing: Employs an Application Load Balancer (ALB) to direct traffic to separate microservices.
  • Path-Based Routing: Configures the ALB to route traffic based on URL paths (e.g., /api/users*) for targeted service delivery.
  • Security & TLS: Features dual ALB listeners for HTTP (port 80) and HTTPS (port 443), with HTTP traffic automatically redirected to HTTPS via AWS Certificate Manager for secure TLS encryption.
  • Container Orchestration: Deploys microservices on ECS, orchestrating Docker containers for optimal resource utilization.
  • Serverless Compute with Fargate: Utilizes AWS Fargate for serverless compute, allowing for the automatic scaling and management of containers without the need to provision or manage servers.
  • Resource Allocation: Allows customization of resource allocation (CPU, memory) for each microservice.
  • Dynamic Scaling: Implements auto-scaling for microservices based on various metrics like CPU usage, memory usage, and request count.
  • Microservice Example: Includes a TypeScript microservice example demonstrating rapid builds with Bun (<1 second) compared to traditional tools like Webpack (~40 seconds).
  • Performance Optimization: Uses Bun runtime in Docker images for enhanced performance of the example microservice.
  • Docker Image Hosting: Docker images are stored on Amazon Elastic Container Registry (ECR).

Deployment Guide

  1. Install Dependencies: Execute bun install to install required packages. This project uses Bun as its package manager.
  2. Configure Environment: Populate the .env file with necessary environment variables, referencing .env.example for the template.
  3. CDK Bootstrap: If your AWS account and region have not been prepared for CDK deployment, run cdk bootstrap to set up the necessary environment.
  4. Deploy the Stack: Use bun run deploy for deployment. Ensure the Docker daemon is active, as the CDK stack automates Docker image building.
  5. DNS Configuration: After deployment, configure your domain's DNS settings by pointing a record to the Application Load Balancer's DNS name to route traffic to your application.

aws-application-load-balancer-elastic-container-service-template's People

Contributors

anatolzak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.