I created ECS fargate, codebuild, codedeploy and codepipeline with terraform
but when pipeline run, it fail on CodeDeploy with following log
enter image description here
Here is my artifact files
appspec.yml
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: "<TASK_DEFINITION>"
LoadBalancerInfo:
ContainerName: "name-container"
ContainerPort: "3000"
PlatformVersion: "LATEST"
taskdef.json
{
"networkMode": "awsvpc",
"requiresCompatibilities": [
"FARGATE"
],
"family": "name-task-def",
"executionRoleArn": "arn:aws:iam::ACC_ID:role/name-execution-role",
"taskRoleArn": "arn:aws:iam::ACC_ID:role/name-task-role",
"memory": "1024",
"cpu": "512",
"containerDefinitions": [
{
"image": "ACC_ID.dkr.ecr.eu-central-1.amazonaws.com/name-ecr-repo:latest",
"name": "name-container",
"mountPoints": [],
"logConfiguration": {
"options": {
"awslogs-group": "/aws/ecs/task-name",
"awslogs-region": "eu-central-1",
"awslogs-stream-prefix": "rails"
},
"logDriver": "awslogs"
},
"cpu": 0,
"portMappings": [
{
"protocol": "tcp",
"containerPort": 3000,
"hostPort": 3000
}
],
"environment": [],
"environmentFiles": [
{
"value": "name-s3-store-envs/fe-app/.env",
"type": "s3"
}
],
"essential": true
}
]
}
Could anyone please help me with this? I have been struggle with this error for hours
I have try to change, update, validate config, but nothing works
New contributor
Minh NA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.