Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECS create-service error #289

Open
EaswarDSharma opened this issue Nov 21, 2022 · 0 comments
Open

ECS create-service error #289

EaswarDSharma opened this issue Nov 21, 2022 · 0 comments

Comments

@EaswarDSharma
Copy link

when trying to create ECS through

aws ecs create-service --cli-input-json file://~/environment/aws-modern-application-workshop/module-2/aws-cli/service-definition.json

where input is

{
  "serviceName": "MythicalMysfits-Service",
  "cluster": "MythicalMysfits-Cluster",
  "launchType": "FARGATE",
  "deploymentConfiguration": {
    "maximumPercent": 200,
    "minimumHealthyPercent": 0
  },
  "desiredCount": 1,
  "networkConfiguration": {
    "awsvpcConfiguration": {
      "assignPublicIp": "DISABLED",
      "securityGroups": [
        "sg-0360881183df5e526"
      ],
      "subnets": [
        "subnet-91f9f4129d60c3c6y",
        "subnet-34e51e9257e163837"
      ]
    }
  },
  "taskDefinition": "mythicalmysfitsservice",
  "loadBalancers": [
    {
      "containerName": "MythicalMysfits-Service",
      "containerPort": 8080,
      "targetGroupArn": "arn:aws:elasticloadbalancing:eu-west-1:953499974945:targetgroup/MythicalMysfits-TargetGroup/ac3d880213d8844f"
    }
  ]
}

i got output showing that

"rolloutState": "IN_PROGRESS"

{
    "service": {
        "networkConfiguration": {
            "awsvpcConfiguration": {
                "subnets": [
        "subnet-91f9f4129d60c3c6y",
        "subnet-34e51e9257e163837"
      ], 
                "securityGroups": [
                     "sg-xxx0881183xxxe526"
                ], 
                "assignPublicIp": "DISABLED"
            }
        }, 
        "launchType": "FARGATE", 
        "enableECSManagedTags": false, 
        "loadBalancers": [
            {
                "containerName": "MythicalMysfits-Service", 
                "targetGroupArn": "arn:aws:elasticloadbalancing:eu-west-1:xxx49x9xxxxx:targetgroup/MythicalMysfits-TargetGroup/xx3d880xxxd8844f", 
                "containerPort": 8080
            }
        ], 
        "deploymentController": {
            "type": "ECS"
        }, 
        "desiredCount": 1, 
        "clusterArn": "arn:aws:ecs:eu-west-1:xxx49x9xxxxx:cluster/MythicalMysfits-Cluster", 
        "serviceArn": "arn:aws:ecs:eu-west-1:xxx49x9xxxxx:service/MythicalMysfits-Cluster/MythicalMysfits-Service", 
        "deploymentConfiguration": {
            "deploymentCircuitBreaker": {
                "enable": false, 
                "rollback": false
            }, 
            "maximumPercent": 200, 
            "minimumHealthyPercent": 0
        }, 
        "createdAt": 1669047707.486, 
        "healthCheckGracePeriodSeconds": 0, 
        "schedulingStrategy": "REPLICA", 
        "placementConstraints": [], 
        "deployments": [
            {
                "status": "PRIMARY", 
                "networkConfiguration": {
                    "awsvpcConfiguration": {
                        "subnets": [
                            "subnet-04e51e5639e163837", 
                            "subnet-03f9f4749d60c3c6f"
                        ], 
                        "securityGroups": [
                     "sg-xxx0881183xxxe526"
                        ], 
                        "assignPublicIp": "DISABLED"
                    }
                }, 
                "pendingCount": 0, 
                "launchType": "FARGATE", 
                "rolloutState": "IN_PROGRESS", 
                "rolloutStateReason": "ECS deployment ecs-svc/2600118610767763227 in progress.", 
                "createdAt": 1669047707.486, 
                "desiredCount": 1, 
                "failedTasks": 0, 
                "taskDefinition": "arn:aws:ecs:eu-west-1:xxx49x9xxxxx:task-definition/mythicalmysfitsservice:3", 
                "updatedAt": 1669047707.486, 
                "platformVersion": "1.4.0", 
                "id": "ecs-svc/2600118610767763227", 
                "runningCount": 0
            }
        ], 
        "serviceName": "MythicalMysfits-Service", 
        "events": [], 
        "runningCount": 0, 
        "status": "ACTIVE", 
        "serviceRegistries": [], 
        "pendingCount": 0, 
        "createdBy": "arn:aws:iam::xxx49x9xxxxx:root", 
        "platformVersion": "LATEST", 
        "placementStrategy": [], 
        "propagateTags": "NONE", 
        "roleArn": "arn:aws:iam::xxx49x9xxxxx:role/aws-service-role/ecs.amazonaws.com/AWSServiceRoleForECS", 
        "taskDefinition": "arn:aws:ecs:eu-west-1:xxx49x9xxxxx:task-definition/mythicalmysfitsservice:3",
        "enableExecuteCommand": false
    }
}

when NLB DNS name with some /mysfits, supposed to return a JSON response, as it did when I ran docker image, the page keeps loading. not sure if it's due to the service-definition file,ECS input, or something else. please help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant