We can do this running our image interactively which creates a temporary container for:
docker run --rm -it \
--name my_container \
--volume $PWD:/some_dir_in_container \
--workdir /some_dir_in_container \
golang:1.13-buster bash| #!/usr/bin/env bash | |
| # Place in .platform/hooks/postdeploy directory | |
| sudo certbot -n -d YOURDOMAINHERE --nginx --agree-tos --email YOUREMAILHERE |
| const appId = [[PINPOINT_APPLICATION_ID]]; | |
| const destination = [[YOUR_PHONE_NUMBER]]; | |
| const { Pinpoint } = require('aws-sdk'); | |
| const pinpoint = new Pinpoint(); | |
| const payloadFn = (appId, destination, message) => { | |
| const ApplicationId = appId; | |
| const Addresses = {}; |
| const fs = require("fs"); | |
| var fileName = process.argv.slice(2)[0]; | |
| console.log(fileName); | |
| fs.readFile(fileName, "utf8", function (err, data) { | |
| if (err) { | |
| return console.log(err); | |
| } |
| import * as React from "react"; | |
| import { | |
| AuthenticationDetails, | |
| CognitoUserPool, | |
| CognitoUserAttribute, | |
| CognitoUser, | |
| CognitoUserSession, | |
| } from "amazon-cognito-identity-js"; | |
| import moment from "moment"; | |
| /** Utils */ |
| #!/usr/bin/env bash | |
| #You need to have aws-cli installed and configured | |
| #Credits to Reddit user u/aa93 for the suggestions | |
| mkdir code | |
| aws lambda list-functions | \ | |
| grep FunctionName | \ | |
| cut -d '"' -f4 | \ | |
| while read -r name; do | |
| aws lambda get-function --function-name $name | tail -n 3 | egrep -o 'https?://[^ ]+' | sed 's/"//' | xargs wget -O ./code/$name.zip |