title: How do I Pass JSON as a parameter to AWS Lambda
body: <p>I have a CloudFormation template that consists of a Lambda function that reads messages from the SQS Queue.</p>
  <p>Lambda function will read the message from the queue and transform it using a JSON template(Which I want it to be injected externally)</p>
  <p>I will deploy different stacks for different products and for each product I will provide different JSON templates to be used for transformation.</p>
  <p>I have different options but couldn't decide which one is better;</p>
  <ol>
  <li>I can write all JSON files under the project and pack them together and pass related JSON name as a parameter to lambda.</li>
  <li>I can store JSON files on S3 and pass S3 URL to lambda so I can read on runtime.</li>
  <li>I can store JSON files on Dynamo DB and read from there using the same approach with 2</li>
  </ol>
  <p>The first one seems like a better approach as I don't need to read from an external file on every lambda execution. But I will need to pack all templates together.</p>
  <p>The last two are a more clear approach but require an external call to read JSON for every call.</p>
  <p>Another approach could be (I'm not sure if it is possible) to inject a JSON file to Lambda on deploy from S3 bucket or sth. And Lambda function will read it like an environment variable.</p>