title: Passing multiple parameters from external file to cloudformation template and using values with ref
body: <p>I am getting following error when trying to create a cloudformation stack using below cli command.</p>
  
  <pre><code>aws cloudformation create-stack --stack-name subodh-local-stack --template-url s3URL/template.json --parameters s3URL/params.json
  </code></pre>
  
  <blockquote>
    <p>Error: awscli.argprocess.ParamError: Error parsing parameter '--parameters': Unable to retrieve <a href="https://s3.amazonaws.com/" rel="noreferrer">https://s3.amazonaws.com/</a>//params.json: received non 200 status code of 403
        2017-08-18 01:32:31,309 - MainThread - awscli.clidriver - DEBUG - Exiting with rc 255</p>
  </blockquote>
  
  <p><strong>template.json</strong>:</p>
  
  <pre><code>{
      "AWSTemplateFormatVersion": "2010-09-09",
  
      "Resources": {
          "Type": "AWS::Lambda::Function",
          "Properties": {
              "FunctionName": {
                  "Ref": "LambdaFunctionName"
              },
              "Handler": {
                  "Ref": "LambdaHandler"
              },
              "Role": {
                  "Ref": "LambdaExecutionRoleArn"
              },
              "Code": {
                  "S3Bucket": {
                      "Ref": "LambdaSourceBucket"
                  },
                  "S3Key": {
                      "Ref": "LambdaSourceKey"
                  }
              },
              "SubnetID": {
                  "Ref": "LambdaSubnetID"
              },
              "Runtime": "nodejs4.3",
              "Timeout": "25",
              "MemorySize": "128",
              "VpcConfig": "vpc-2323454f",
              "securityGroupID": "sg-0sdfs17g"
          }
      }
  }
  </code></pre>
  
  <p><strong>params.json</strong>:</p>
  
  <pre><code>[
          {
              "ParameterKey": "LambdaFunctionName",
              "ParameterValue": "hello-world"
          },
          {
              "ParameterKey": "LambdaHandler",
              "ParameterValue": "index.handler"
          },
          {
              "ParameterKey": "LambdaExecutionRoleArn",
              "ParameterValue": "arn:aws:iam::312345678910:role/LambdaExecuteRole"
          },
          {
              "ParameterKey": "LambdaSourceBucket",
              "ParameterValue": "test-lambda-functions"
          },
          {
              "ParameterKey": "LambdaSourceKey",
              "ParameterValue": "helloworld.zip"
          },
          {
              "ParameterKey": "LambdaSubnetID",
              "ParameterValue": "subnet-1113121f,subnet-fer333ex"
          }
  ]
  </code></pre>
  
  <p>After updating the command to:</p>
  
  <pre><code>aws cloudformation create-stack --stack-name test-local-stack --template-body file://c:/cli/aws/template.json --parameters file://c:/cli/aws/params.json
  </code></pre>
  
  <p>I get error </p>
  
  <blockquote>
    <p>An error occurred (ValidationError) when calling the CreateStack operation: Template format error: [/Resources/Type] resource definition is malformed</p>
  </blockquote>
  
  <p>I am trying to use Ref function for referring to the parameters which are passed from parameters file during stack creation.</p>
  
  <p>Can someone please let me know what I am doing wrong?</p>