eleven41 / aws-lambda-copy-s3-objects Goto Github PK
View Code? Open in Web Editor NEWAn AWS Lambda function to copy objects from a source S3 bucket to a target S3 bucket as they are added to the source bucket.
License: MIT License
An AWS Lambda function to copy objects from a source S3 bucket to a target S3 bucket as they are added to the source bucket.
License: MIT License
I would like to be able to copy only what is in Bucket1/folder1 to Bucket2/folder1.
Can this be modified to do that?
Hi there,
Any idea how this could be used to copy an object to a bucket under another account?
I've attempted something similar, but keep getting Access Denied
no matter that IAM/Bucket Policy
configuration I use.
You can see an SO thread I've posted here:
http://stackoverflow.com/questions/40187728/how-to-use-aws-lambda-to-backup-an-s3-object-to-a-bucket-on-another-account
Hi,
I have used your function and got it working ok, but found that I didn't need to do npm install aws-sdk as the aws-sdk is included in the AWS Node.js 4.3 execution environment. Also, AWS Lambda code editor complained about using var i in the inner loop on line 137 of index.js, so I changed that to var b.
Otherwise it is all good.
Blessings,
Ian.
Looks like a good candidate for https://github.com/plutov/awesome-functions
Hi,
In the cloudWatch event log, I found following error:
Getting tags for bucket 'wizwid-build-output-virginia'
Error getting target bucket:
Source bucket 'undefined' is missing 'TargetBucket' tag. undefined
function fail expected at most 0 arguments, got 2
{"errorMessage":"Error"}
Target S3 bucket was set as shown below:
I do have attached policy you mentioned here to the lambda function.
Regarding error messages, getTargetBuckets() function seems to recognize source bucket correctly but right after this it looses source "bucketName", because error message shows "Source bucket 'undefined' is ..."
Do you have any clue about this issue?
Sincerely.
Hello, thanks for the simple utility which makes setting up aws lambda s3 copying very easy!
I was trying it out for cross account copying and noticed that the destination bucket is getting copies without the Content-Type
set. It seems .. MetadataDirective: 'COPY'
doesn't work in this case, have you tried copying across accounts or maybe you did this in a different way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.