ECS: Create the Cluster:
- Under Get Started - Create custom Container(configure).
- Edit Container:
- Provide container name
- Provide image, this refers to the image pushed to your ECR repository, and it has the following format: <aws_account_id>.dkr.ecr.<region>.amazonaws.com/<repository>:<tag>.
- Add Port Mappings 8080 and 8443 under Private repository authentication.
- Health Check:
- Provide command: curl -f http://localhost:8080/ || exit 1
- Interval: 300
- Timeout: 60
- Start Period: 300
- Retries: 3
- Environment:
- STORAGE AND LOGGING
- Mount points: /opt/connect/appdata
- Log configuration: Check - "Auto-configure CloudWatch Logs"
- Provide Task definition details:
- Task definition name
- Network mode
- Task execution role
- Compatibility
- Task memory
- Task CPU
- Define your Service and click Create button. This would create the cluster.
- Click on the service you have created and go to Tasks tab and verify that the tasks status are RUNNING.