title: Cloudformation deploy --parameter-overrides doesnt accept file Workaround
body: <p>I am in process of using setting up pipeline using codebuild and use cloudformation package and cloudformation deploy to spin up the stack which spuns lambda function. Now i know that with cloudformation deploy we cant use parameters file with --parameters-overrides and this feature request is still in open state wit AWS <a href="https://github.com/aws/aws-cli/issues/2828" rel="nofollow noreferrer">https://github.com/aws/aws-cli/issues/2828</a> . So i am trying to use a workaround using JQ which is decsribed in this link <a href="https://github.com/aws/aws-cli/issues/3274#issuecomment-529155262" rel="nofollow noreferrer">https://github.com/aws/aws-cli/issues/3274#issuecomment-529155262</a> like below.</p>
  
  <pre><code>PARAMETERS_FILE="parameters.json" &amp;&amp;  PARAMS=($(jq -r '.Parameters[] | [.ParameterKey, .ParameterValue] | "\(.[0])=\(.[1])"' ${PARAMETERS_FILE})) - aws cloudformation deploy --template-file /codebuild/output/packaged.yaml --region us-east-2 --stack-name InitialSetup --capabilities CAPABILITY_IAM  --parameter-overrides ${PARAMS[@]}
  
  </code></pre>
  
  <p>This workaround works well if tested via cli . I also tried this workaround inside a container as buildspec.yaml file creates a container in background which runs these commands , but codebuild doesnt excute the aws cloudformation deploy step and fails . I get error "aws: error: argument --parameter-overrides: expected at least one argument" . I even tried copying the two steps of workaround in shell script and then executing it but i run into error "[Container] 2020/01/21 09:19:14 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: ./test.sh. Reason: exit status 255"
  Can someone please guide me here .My buildspec.yaml file is as below :</p>
  
  <p>'''
  version: 0.2</p>
  
  <p>phases:
    install:
      runtime-versions:
        java: corretto8
      commands:</p>
  
  <pre><code>- wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
  - chmod +x ./jq
  - cp jq /usr/bin
  - jq --version 
  </code></pre>
  
  <p>pre_build:
      commands:
        # - echo "[Pre-Build phase]</p>
  
  <p>build:
      commands:</p>
  
  <pre><code>  - aws cloudformation package --template-file master.yaml --s3-bucket rtestbucket --output-template-file packaged.yaml
    - aws s3 cp ./packaged.yaml s3://rtestbucket/packaged.yaml
    - aws s3 cp s3://rtestbucket/packaged.yaml /codebuild/output
  </code></pre>
  
  <p>post_build:
      commands:</p>
  
  <pre><code>- PARAMETERS_FILE="parameters.json" &amp;&amp;  PARAMS=($(jq -r '.Parameters[] | [.ParameterKey, .ParameterValue] | "\(.[0])=\(.[1])"' ${PARAMETERS_FILE}))
  - ls 
  - aws cloudformation deploy --template-file /codebuild/output/packaged.yaml --region us-east-2 --stack-name InitialSetup --capabilities CAPABILITY_IAM  --parameter-overrides ${PARAMS[@]}
  </code></pre>
  
  <p>artifacts:
    type: zip
    files:
      - packaged.yaml</p>
  
  <pre><code>
  </code></pre>