CodeDeploy create-deployment using cli

0

Hi, I am using aws cli v2 to create deployment for coddeploy as part of CI/CD pipeline. I am following the syntax provided here, https://awscli.amazonaws.com/v2/documentation/api/latest/reference/deploy/create-deployment.html Using script I am trying to create deployment as shown below. I am using revision type "AppSpecContent" and providing content as string (Inside it's JSON)

aws deploy create-deployment --application-name test-cd-ecs --deployment-group-name test-cd-ecs-dg --revision revisionType=AppSpecContent,appSpecContent={content="{
  "version": "0",
  "Resources": [
    {
      "TargetService": {
        "Type": "AWS::ECS::Service",
        "Properties": {
          "TaskDefinition": "arn:aws:ecs:us-west-2:XXXXXXXXX:task-definition/test-cd-ecs-td:10",
          "LoadBalancerInfo": {
            "ContainerName": "test-cd-ecs-container",
            "ContainerPort": "8080"
          }
        }
      }
    }
  ]
}
"}

When I run the above command, I get this error

Error parsing parameter '--revision': Expected: '=', received: '0' for input:
revisionType=AppSpecContent,appSpecContent={content={
  version: 0,
           ^
  Resources: [
    {
      TargetService: {
        Type: AWS::ECS::Service,
        Properties: {
          TaskDefinition: arn:aws:ecs:us-west-2:XXXXXXXXX:task-definition/test-cd-ecs-td:10,
          LoadBalancerInfo: {
            ContainerName: test-cd-ecs-container,
            ContainerPort: 7001
          }
        }
      }
    }
  ]
}
}

Any idea what's wrong in the syntax. I removed the whole JSON and tried with some dummy then also I get error. Thanks for help.

posta 2 anni fa92 visualizzazioni
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande