screen /Users/dhavalnagar/Library/Containers/com.docker.docker/Data/vms/0/tty
ls /var/lib/docker/volumes/
const whitelistedDomains = process.env.WHITE_LISTED_DOMAINS.split(','); | |
const whitelistedEmails = process.env.WHITE_LISTED_EMAIL.split(','); | |
exports.handler = async (event, context, callback) => { | |
console.log('Validate signup request', event); | |
console.log('wd', whitelistedDomains) | |
console.log('we', whitelistedEmails) | |
// Split the email address so we can compare domains | |
const userEmail = event.request.userAttributes.email; |
- PolicyName: !Join ["-", [ "CognitoIDP", { Ref: AWS::StackName }, "S3-Access", "Policy"]] | |
PolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Sid: "AllowListingPublicFiles" | |
Effect: Allow | |
Action: "s3:ListBucket" | |
Condition: | |
StringLike: | |
"s3:prefix": |
FROM node:10 as build | |
MAINTAINER dhavaln | |
LABEL description="This is a multi-stage NodeJS image" | |
WORKDIR /src | |
COPY package*.json . | |
RUN npm install | |
COPY . . | |
FROM node:10-slim | |
WORKDIR /src |
FROM alpine | |
MAINTAINER dhavaln | |
LABEL description="Part 1 - Running Docker on AWS EC2" | |
WORKDIR /src | |
RUN echo "Hello world" > hello.txt | |
CMD ["cat", "hello.txt"] |
#! /bin/sh | |
yum update -y | |
amazon-linux-extras install docker | |
service docker start | |
usermod -a -G docker ec2-user | |
chkconfig docker on |
# Demo1: This is an inline build | |
docker build -t inlineimage -f- . <<EOF | |
FROM node:10 | |
MAINTAINER dhavaln | |
WORKDIR /usr/src | |
RUN echo "console.log('hello world');" > index.js | |
CMD ["node", "index.js"] | |
<<EOF |
aws kms encrypt --key-id <key id> --plaintext "Hello world" --profile <user profile> --output text --query CiphertextBlob | base64 --decode > encryptedtext | |
aws kms decrypt --ciphertext-blob fileb://encryptedtext --output text --query Plaintext --profile <user profile> | base64 --decode |
# layers | |
layers: | |
moment: | |
path: ../layers/moment-layer | |
compatibleRuntimes: | |
- nodejs8.10 | |
package: | |
include: | |
- node_modules/** |