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.

質問済み 2年前92ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ