# "Here documents?"

**URL:** <https://forum.serverless.com/t/here-documents/15756>\
**Category:** Serverless Framework\
**Tags:** cloudformation, variables\
**Created:** [August 17, 2021, 3:18pm UTC](https://forum.serverless.com/t/here-documents/15756 "2021-08-17T15:18:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gswallow](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gswallow](https://forum.serverless.com/u/gswallow)\
**Post date:** [August 17, 2021, 3:18pm UTC](https://forum.serverless.com/t/here-documents/15756/1 "2021-08-17T15:18:29Z")

</div>

I’m trying to create a Cloudwatch Synthetics canary and there is a way to add code from the YAML, itself. Problem is the code I paste in is written in Javascript and serverless is trying to interpret the javascript.

I want to include a here document or include a file and not parse its contents. Is that possible?

---

<div class="post-metadata">

**Author:** ![gswallow](https://avatars.discourse-cdn.com/v4/letter/g/c89c15/32.png) [@gswallow](https://forum.serverless.com/u/gswallow)\
**Post date:** [August 18, 2021, 1:28pm UTC](https://forum.serverless.com/t/here-documents/15756/2 "2021-08-18T13:28:55Z")

</div>

This is answered by heath if you get lucky with your search:

> [@Using data from a file as a string value in serverless.yml](http://forum.serverless.com/t/using-data-from-a-file-as-a-string-value-in-serverless-yml/10713):
>
> Is it possible to import the contents of an external file as a value in serverless.yml. My usecase is for creating an AWS CloudWatch Dashboard, the DashboardBody element takes a string of JSON configuration. I could just write this into the yaml file, but it would be way nicer if I could do the following: resources: DashboardIntegrationMonitor: Type: AWS::CloudWatch::Dashboard Properties: DashboardName: "${self:provider.stage}Importer" DashboardBody: "${file(./dashboard.js…
