Frontend task definition
Similarly, now we will create the task definition for the frontend.
Configuring Task Definition for Frontend Service
Go back to the Task definition screen:
- Click on Create new task definition
- Select Create new task definition

Continue filling in the basic information:
- Family name: enter
fcjresbar-task-fe
- In the Infrastructure requirements
- Launch type: choose AWS Fargate
- OS, Architecture, Network: choose Linux/x86_64, and the default network will be awsvcp when AWS Fargate is selected.

Next information:
- CPU: 2 vCPU
- Memory: 6 GB
- Task role and Task execution role as default.

In the container definition section, fill in the following details:
- Name:
frontend
- Image URI: the URI of the frontend image from either ECR or Dockerhub; here, we will use ECR.
- Container port:
80
; protocol: TCP; App protocol: HTTP - Resource allocation limits:
- CPU:
1
- Memory hard limit:
3
- Memory soft limit:
2

Next, add the environment variables, which include:
BACKEND_HOST
= backend.fcjresbar.internal
BACKEND_PORT
= 5000

Keep the default configurations.

Finally, click Create to create the task definition.

