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
# As of this writing, Lambda can support Python 3.9, but amazonlinux comes with Python 3.7. | |
# This makes it difficult to create a Layer using amazonlinux image. | |
# This Dockerfile will install Python 3.9 and automatically prepare the Layer file. | |
# Important note: The key is to build the Layer file with the right file STRUCTURE !!! | |
# How to use: | |
# 1. Make sure the latest Docker is installed. | |
# 2. mkdir layer | |
# 3. cd layer |
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
# frozen_string_literal: true | |
require 'thread/pool' | |
# Install Gem 'thread' or add it to your Gemfile. | |
# | |
# Example: | |
# | |
# ids = [1,2,3,4,5,6,7,8,9,10] | |
# ids.each_in_thread(concurrency: 20) do |id| |
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
replace_with_remote_url:replace_with_remote_port:replace_with_remote_tablename:replace_with_remote_username:replace_with_remote_password |
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 unzipFromS3 = (key, bucket) => { | |
return new Promise(async (resolve, reject) => { | |
let options = { | |
'Bucket': bucket, | |
'Key': key, | |
}; | |
s3.getObject(options, function(err, res) { | |
if(err) return reject(err); | |