Skip to content

Instantly share code, notes, and snippets.

View hmontazeri's full-sized avatar
🙃
dolce vita

Hamed Montazeri hmontazeri

🙃
dolce vita
View GitHub Profile
@hmontazeri
hmontazeri / deploy.sh
Created August 12, 2020 08:27
Deploy serverless app using docker (ffmpeg linux64 workaround)
#!/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"
@hmontazeri
hmontazeri / listAllObjectsFromS3Bucket.js
Last active April 2, 2024 03:00
get more than 1000 elements from s3 bucket (node.js)
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;