ECS Service stuck on creation

Viewed 571

Trying to deploy a CloudFormation template gets stuck with 'AWS::ECS::Service' stuck on 'CREATE_IN_PROGRESS' with status 'Resource creation Initiated'.

  • Can anyone please tell me if there's a configuration problem with my CloudFormation template?
  • How would i troubleshoot this?

CloudFormation Template

Thank you!

"FargateTasksCluster": {
            "Type": "AWS::ECS::Cluster"
        },
        "FargateTasksLogGroup": {
            "Type": "AWS::Logs::LogGroup"
        },
        "MytaskTask": {
            "Type": "AWS::ECS::TaskDefinition",
            "Properties": {
                "ContainerDefinitions": [{
                    "Name": "my-task",
                    "Image": "mountainpass/infrastructure:helloworld",
                    "Environment": [],
                    "LogConfiguration": {
                        "LogDriver": "awslogs",
                        "Options": {
                            "awslogs-region": {
                                "Fn::Sub": "${AWS::Region}"
                            },
                            "awslogs-group": {
                                "Fn::Sub": "${FargateTasksLogGroup}"
                            },
                            "awslogs-stream-prefix": "fargate"
                        }
                    }
                }],
                "Family": "my-task",
                "NetworkMode": "awsvpc",
                "ExecutionRoleArn": {
                    "Fn::Sub": "arn:aws:iam::${AWS::AccountId}:role/ecsTaskExecutionRole"
                },
                "TaskRoleArn": {
                    "Fn::Sub": "${IamRoleLambdaExecution}"
                },
                "RequiresCompatibilities": ["FARGATE"],
                "Memory": "0.5GB",
                "Cpu": 256
            }
        },
        "MytaskService": {
            "Type": "AWS::ECS::Service",
            "Properties": {
                "Cluster": {
                    "Fn::Sub": "${FargateTasksCluster}"
                },
                "LaunchType": "FARGATE",
                "ServiceName": "my-task",
                "DesiredCount": 1,
                "TaskDefinition": {
                    "Fn::Sub": "${MytaskTask}"
                },
                "NetworkConfiguration": {
                    "AwsvpcConfiguration": {
                        "AssignPublicIp": "DISABLED",
                        "SecurityGroups": [],
                        "Subnets": ["subnet-2cc37974", "subnet-3c959d5b", "subnet-49d7d200"]
                    }
                }
            }
        }

enter image description here

0 Answers
Related