
Learn to deploy Spring Boot microservices on AWS ECS with Fargate by building Docker images, pushing to ECR and Docker Hub, and enabling auto scaling, service discovery, and load balancing.
Meet your instructor Sergei in this welcome lecture, learn about his background, daily learning tips, LinkedIn connection, and earning a completion certificate.
Discover Amazon Elastic Container Service (ECS), a fully managed platform to deploy Docker containers via task definitions and services, with auto scaling, load balancing, service discovery, and centralized log collection.
Learn a three-layer microservices architecture on AWS with springboard apps running in docker containers on ecs fargate, using per-service mysql databases on rds.
Learn how to deploy a springboard app on Amazon Elastic Container Service by building Docker images, defining task definitions, and configuring clusters, services, and load balancers.
Create an aws account and understand pricing from free tier to paid plans, including rds for mysql and fargate, and learn to stop running tasks to control costs.
Run the two microservices locally with spring tools suite, using dev and prod profiles. Dev uses an in-memory h2 database; prod uses mysql and local ports 80 and 81.
Stop the running application, prepare the def springboard profile, then clean, package, and run the microservice from the command line with mvn clean, mvn package, and mvn spring-boot:run.
Create and run two Spring Boot configurations for the albums microservice in Spring Tools Suite, using dev and prod profiles, to demonstrate their collaboration on a local machine.
Learn how to download, install, and launch the Postman HTTP client on Windows, Mac, or Linux, connect to localhost, and start sending HTTP requests in a new tab.
Demonstrate running two microservices—users and albums—via local http requests, including user creation, login with JWT, and album retrieval, with dev in-memory and prod MySQL profiles.
Create a Docker file, build a Docker image, and publish it to Elastic Container Registry or Docker Hub, so ECS with Fargate can download and run it in a container.
Create docker files for microservices based on openjdk 17 alpine image, copy the generated jar from target, and set an entry point to run java -jar for users and albums.
Compare Docker Hub and Amazon ECR, highlighting public and private repositories, pricing, authentication, and IAM integration, and explain which service to use for hosting container images.
Install Docker on your computer from docker.com and decide between Docker Hub or Amazon ECR, then prepare to build and push your first Docker image.
sign in to Docker Hub, create a public repository named users microservice, optionally add a description, then push the image with docker push using the user/repository format.
Build the users microservice image by running mvn clean package, then Docker build and tag the image with your GitHub username and repository name for Docker Hub.
Push a docker image to docker hub by logging in and using docker push with the repository name, then pull and run it on a container or AWS ECS.
Create a private Amazon Elastic Container Registry repository for Docker images, manage access with IAM, and review tag immutability, image scanning, and encryption settings before pushing your first image.
Enable private image scanning for security vulnerabilities by selecting basic or enhanced scanning, setting scan on push, and optionally filtering by repositories, then review the scan reports.
Install or update the AWS CLI to push containers to Amazon ECR, using official docs and Mac OS steps, including curl download, installer run, and version verification.
Create an IAM user with programmatic access to obtain an access key and secret key for AWS CLI and grant permissions to push images to the Amazon Elastic Container Registry.
Configure the AWS CLI to manage credentials and the us-east-1 region, create and switch profiles, and verify a default setup to push a Docker image to Amazon Elastic Container Registry.
Push the local Docker image to Amazon Elastic Container Registry by authenticating, building from the microservice project, tagging the image, and pushing to the repository.
Create a private elastic container registry service repository, push a Docker image, and run scans to review vulnerabilities before deploying a spring boot microservice on AWS ECS with Fargate.
Explore the two versions of the Elastic Container Service web console—the new ECS experience and the classic version—and learn how to toggle between them, noting feature differences and ongoing updates.
Create a new AWS ECS Fargate cluster by configuring a cluster name, selecting the default VPC and subnets across multiple availability zones, and optionally enabling container insights and tags.
Create a new task definition to run a docker container in your cluster, specify container image, port mapping, and environment variables, including spring profiles dev or prod.
Configure environment infrastructure for running the container on AWS ECS Fargate, setting Linux, CPU and memory, task roles and execution role, storage, and CloudWatch logging before creating the task definition.
Create an ecs service from the task definition in your cluster, choose a launch type and capacity provider, and set up a security group for ports 80 and 81.
Navigate the ECS console to view the cluster, services, and running tasks. Check the spring boot microservice health with actuator endpoints on ports 80 and 81, noting required firewall configuration.
Configure the security group to allow inbound http traffic on ports 80 and 81 for the users microservice, choosing the source as IP, anywhere IPv4, or anywhere IPv6 as needed.
Access and test a Spring Boot microservice on AWS ECS Fargate, verify health via actuator, and create a user with Postman, noting in-memory versus production MySQL persistence.
Learn to stop a running task in AWS ECS with Fargate, adjust the service's desired task count to control running tasks, and minimize costs.
Explore how application load balancer routes traffic to multiple microservice instances using target groups, health checks, and listeners, enabling blue/green deployments and reliable HTTP routing.
Enable an application load balancer for the users microservice by creating a new Fargate service with two tasks, a target group, an http 80 listener, and actuator health endpoint checks.
Create a dedicated application load balancer security group, add inbound rules for port 80, apply it to the load balancer, and remove the users microservice security group.
Learn how the application load balancer in Amazon ECS uses a stable DNS name to balance HTTP requests across two user microservice instances on port 80.
Point a custom domain to an application load balancer using route 53 by creating two records for api dot click and www api dot click in us east 1.
Start two tasks behind an application load balancer, then verify the custom domain routes traffic with postman requests and Route 53, checking task status and security group rules if needed.
Deploy secure microservices behind an Amazon application load balancer using a custom domain, Route 53 DNS, and Certificate Manager to enable HTTPS and traffic redirection.
Request a TLS/SSL certificate from Amazon Certificate Manager, validate domain ownership via DNS using Route 53, and prepare your mock api dot click domain for secure communication using RSA 2048.
Verify domain ownership by updating DNS records with Amazon Certificate Manager and Route 53, creating records, and confirming the certificate status shifts from pending to issued.
Create an https listener on your application load balancer at port 443, attach the ACM certificate, and forward traffic to user’s microservice target group, ensuring security groups allow port 443.
Configure the application load balancer's security group to allow https traffic on port 443 by adding http 80 and https 443 rules for IPv4 and IPv6 anywhere, then save.
Redirect http traffic to https on the application load balancer by editing the listener on port 80 and adding a redirect action to https port 443.
Configure and test secure communication by enforcing HTTPS and redirecting HTTP to HTTPS for the API endpoint, which returns an IP address, validating a certificate and a secure browser connection.
Discover how to enable auto scaling for ECS services, setting minimum and maximum task counts and scaling based on CPU, memory, or application load metrics with CloudWatch alarms.
Configure auto scaling for your ecs services using a target tracking policy, set minimum, desired, and maximum tasks, and scale by request count per target with a 30-second cooldown.
See how ECS Fargate auto scaling works through CloudWatch alarms, scale out and in policies, and testing with HTTP requests via an application load balancer.
Learn to create a MySQL database on Amazon RDS using the AWS console, including standard create, MySQL 8, free tier, VPC, security group, and access settings.
Create a new ECS task definition revision to run the users microservice with prod profile, configuring MySQL connection via environment variables for host, port, database, user, and password.
Update an existing service to use the latest revision of the user microservice task definition, set the desired number of tasks to zero to save costs, and save the changes.
Configure the Amazon RDS database instance security group to allow the users microservice to connect by updating inbound rules for MySQL port 3306 from the users microservice security group.
Deploys a spring boot microservice on aws ecs with fargate, uses prod profile and mysql on amazon, starts a single task, and validates user creation, login, and jwt authentication.
This course is for Java developers interested in learning how to deploy Spring Boot Microservices on AWS cloud using AWS ECS(Elastic Container Service).
By the end of this course, you will know how to deploy, auto scale and load balance Spring Boot Microservices in Docker containers on AWS Serverless Infrastructure.
You will learn how to:
Run Spring Boot Microservices with different Spring Boot profiles: dev, prod.
How to build Docker images,
Publish Docker images to Docker Hub and AWS ECR,
Scan your Spring Boot Microservices for security vulnerabilities.
You will learn to:
Create a cluster on AWS Fargate (serverless) infrastructure,
Run multiple instances of your Spring Boot Microservices behind Amazon Application Load Balancer,
Make your Microservices Auto Scale on demand,
Create an SSL certificate and enable secure HTTPS communication for your Microservices,
Work with Route 53 and enable HTTPS communication for a custom domain name,
Deploy scalable MySQL server using Amazon RDS,
Implement Centralize Configuration and learn to use Amazon Parameter Store to manage configuration properties in one central location,
You will learn to Encrypt sensitive configuration properties and store them encrypted on AWS,
Learn to use Service Connect & Service Discovery to enable your Microservices to discover each other and communicate with each other,
You will learn about Continuous Integration and Continuous Deployment(CI/CD) and how to use Amazon Developer Tools like CodeCommit, CodeBuild and CodePipeline to automate the release process of new code.
All lectures are designed for beginners, and you will learn all of the above topics by following short and simple, step-by-step video lessons.
Enrol now, and I will be there to assist you every step of the way.