Creating an application load balancer
The following procedure is used to configure a Fargate ECS service with an application load Balancer:
- Create an application load balancer
- Create a task definition
- Create a service
- Configure the application load balancer with the service
- Invoke the service
First, we shall create an application load balancer:
- Open the EC2 Console in a browser by going to https://console.aws.amazon.com/ec2, and select
Load Balancing
|Load Balancers
. - Click on
Create Load Balancer
, as shown in the following screenshot:
![](https://static.packt-cdn.com/products/9781789345018/graphics/9600dcea-1da2-469c-87d5-a4b64bb8b23a.png)
- In
Select load balancer type
, click onCreate
for theApplication Load Balancer
, as shown in the following screenshot. An application load balancer is used forHTTP
/HTTPS
request protocols.
![](https://static.packt-cdn.com/products/9781789345018/graphics/38393509-ab3b-4a4b-96b9-2ea014683f01.png)
- In
Configure Load Balancer
, specify a load balancer name (hello-world-lb
) in theBasic Configuration
, as shown in the following screenshot, and selectinternet-facing
as theScheme
. Only a-z, A-Z, 0-9, and hyphens may be used in the load balancer name. - Select
ipv4
as theIP address...