aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.54k stars 4.13k forks source link

How to give revision file location during create deployment on code deploy #6267

Closed manavalan619 closed 3 years ago

manavalan619 commented 3 years ago

Describe the question

Hi all, For now, I did with the creation of code deployment by using the below CLI command

aws deploy create-deployment --application-name AppECS-sample-cluster-x2 --deployment-config-name CodeDeployDefault.ECSAllAtOnce --deployment-group-name DgpECS-sample-x2 --s3-location bucket=,bundleType=yaml,key=appspec.yaml

The above command works fine. Here I need to avoid the S3 bucket, so I try to use revision as a string but no luck.

aws deploy create-deployment --application-name AppECS-sample-cluster-x2 --deployment-config-name CodeDeployDefault.ECSAllAtOnce --deployment-group-name DgpECS-sample-x2 --revision '{"revisionType": "String", "string": {"content":"version: 0.0 Resources: - TargetService: Type: AWS::ECS::Service Service Properties: TaskDefinition: arn:aws:ecs:us-east-:task-definition/sample LoadBalancerInfo: ContainerName: sampleconatiner ContainerPort: 8080"}}'

Here the error for AWS CodeDeploy

The deployment failed because the AppSpec file that specifies the deployment configuration is missing or has an invalid configuration. The input AppSpec file is a not well-formed yaml. The template cannot be parsed.

Any way to do this except S3 bucket storing.

Logs/output Get full traceback and error logs by adding --debug to the command.

stobrien89 commented 3 years ago

Hi @manavalan619,

Thanks for reaching out! Would you be able to provide debug logs by appending --debug to your command? Please redact any sensitive information, such as account numbers. Thanks!

github-actions[bot] commented 3 years ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.