test MarkDown formatting options for semi-complex document...
Excerpt from https://github.com/dwyl/learn-aws-lambda#hello-world-example-zip
.js
file we created earlier: $ zip -r hello-world.zip hello-world.js
You should now be able to see a .ZIP
file alongside your .js
file.
NOTE: If your function has any dependencies then you must include your node_modules
file within your .ZIP file. Simply add node_modules
after the files you wish to zip up!
Later...
npm dpl
We decided to write dpl
to make deploying your Lambda functions extremely easy. Here's how to implement it.
$ npm install dpl --save-dev
Configure your environment variables.
You need AWS_REGION
and AWS_IAM_ROLE
export AWS_REGION=eu-west-1
export AWS_IAM_ROLE=arn:aws:iam::123456789:role/LambdaExecRole
Add the list of files to deploy to your package.json
:
"files_to_deploy": [ "package.json", "index.js", "lib/" ]
Add the deployment script to your package.json
"scripts": {
"deploy": "dpl"
}
Run the script
$ npm run deploy
experiment: four spaces preceded this line. MD wraps it to previous line if no intervening blank line
code as child of bullet (previous line is four-space-prefixed-triple-backticks)
follow-up paragraph text under bullet/number
also child--indents it if preceded by blank-line-preceded-by-indent
bullet 2
child text on its own line
i.e. when in bullet mode, a line prefxed by 4-spaces is a child, not code/pre
code indented by previous line prefixed by four-space-prefixed-triple-backticks
more child text
bullet 3