[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.
/ s3-to-gcs Public archive

Lambda function that copies files in s3 to gcs

License

Notifications You must be signed in to change notification settings

vibrato/s3-to-gcs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 to GCS

s3-to-gcs is a lambda function that allows you to perform a one way file copy from an existing Amazon S3 bucket to an existing Google Cloud Storage Bucket.

Prerequisites

AWS Setup

  1. Create IAM credentials in order to deploy the lambda function by following this guide
  2. Ensure that the S3 bucket is created

Google Cloud Platform setup

  1. Create a service account for the lambda function by following this guide
  2. Create a set of access keys for the service account by following this guide. Make sure the key type is JSON.
  3. Save the access key json file as service-account.json in the root folder of this repository
  4. Assign "Legacy Bucket Writer" role to the GCS bucket for this service account

Installation

Install serverless and dependencies

Install the serverless framework by running the following:

npm install serverless -g

Install the other dependencies by running

npm install

Deploy the lambda function

# This deploys the lambda function, the IAM role,
sls deploy --aws_bucket <aws_bucket_name> --gcs_bucket <gcs_bucket_name>

# This deploys the S3 event trigger for an existing S3 bucket
sls s3deploy --aws_bucket <aws_bucket_name>

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Lambda function that copies files in s3 to gcs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages