Creating a Service with AWS Fargate - rajeshkumarplv/aws-ccp-notes GitHub Wiki
AWS Fargate is a deployment option in Amazon ECS that allows you to deploy containers without having to manage any clusters or servers.
For our Mythical Mysfits backend, we will use Java and create a Spring Boot app in a Docker container behind a Network Load Balancer. These will form the microservice backend for the frontend website to integrate with.
Creating the Core Infrastructure using AWS CloudFormation
AWS CloudFormation is a service that can programmatically provision AWS resources that you declare within JSON or YAML files called CloudFormation Templates, enabling the common best practice of Infrastructure as Code
. We have provided a CloudFormation template to create all of the necessary Network and Security resources in /module-2/cfn/core.yml. This template will create the following resources:
-
An Amazon VPC - a network environment that contains four subnets (two public and two private) in the 10.0.0.0/16 private IP space, as well as all the needed Route Table configurations. The subnets for this network are created in separate AWS Availability Zones (AZ) to enable high availability across multiple physical facilities in an AWS Region. Learn more about how AZs can help you achieve High Availability here.
-
Two NAT Gateways (one for each public subnet, also panning multiple AZs) - allows the containers we will eventually deploy into our private subnets to communicate out to the Internet to download necessary packages, etc.
-
A DynamoDB VPC Endpoint - our microservice backend will eventually integrate with Amazon DynamoDB for persistence (as part of module 3).
-
A Security Group - Allows your docker containers to receive traffic on port 8080 from the Internet through the Network Load Balancer.
-
IAM Roles - Identity and Access Management Roles are created. These will be used throughout the workshop to give AWS services or resources you create access to other AWS services like DynamoDB, S3, and more.
Amazon VPC
- Amazon Virtual Private Cloud (Amazon VPC) is a service that lets you launch AWS resources in a logically isolated virtual network that you define.
- You have complete control over your virtual networking environment, including selection of your own IP address range, creation of subnets, and configuration of route tables and network gateways.