This file contains 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
const AWS = require('aws-sdk'); | |
const s3 = new AWS.S3({ | |
region: 'eu-central-1', | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | |
}); | |
async function listAllObjectsFromS3Bucket(bucket, prefix) { | |
let isTruncated = true; |
This file contains 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 | |
if [ -x "$(command -v docker)" ]; then | |
echo "docker installed..." | |
echo "running deploy..." | |
docker run \ | |
-v $(pwd):/app \ | |
-v ~/.aws/credentials:/root/.aws/credentials \ | |
node:12 /bin/bash \ | |
-c "cd /app; npm i -g serverless; npm install; sls deploy" |