0

I am trying to pass this curl command in my buildspec.yml but it keeps on failing with the below error. What is the right way to pass the curl command? FYI i need to use aws ssm start-session since i need to execute the curl on the instance. Any help would be appreciated.

Error: Phase context status code: YAML_FILE_ERROR Message: Expected Commands[2] to be of string type: found subkeys instead at line 44, value of the key tag on line 43 might be empty

post_build: commands:

  - echo 'Validate'
  - unbuffer aws ssm start-session --target $get_id --region $AWS_DEFAULT_REGION --document-name AWS-StartInteractiveCommand --parameters command="sleep 20; |- curl -kv request POST url https://XXXXX header 'content-type: application/x-www-form-urlencoded' data client_id=XXXXX data 'code=ABC' data redirect_uri=https://XXXXXXX | if grep -q running; then echo Successfully_Validated; else echo Validation Failed && exit 1; fi"
  - echo 'Scale down'

0 Answers0