This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# It is very common while debugging elixir projects, deployed using mix releases, to | |
# investigate code logic using "on the fly patches" by entering the running instance iex | |
# and pasting new code into it (obviously only in dev environment, not production). | |
# If you're using kubernetes with multiple deployments that must be updated with | |
# multiple modules definition (like if you're following a bug through multiple steps), | |
# this process will cost some time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setup: | |
// $ npm i --save aws-sdk@^2.541.0 chrome-aws-lambda@^1.20.0 puppeteer@^1.20.0 | |
// | |
// Deploy Script: | |
// $ rm -Rf node_modules | |
// $ npm install | |
// $ rm -rf node_modules/puppeteer/.local-chromium/** | |
// $ rm pack.zip | |
// $ zip pack.zip index.js -r node_modules/* | |
// $ aws lambda --region $REGION update-function-code --function-name $LAMBDA_FN_NAME --zip-file fileb://pack.zip |