Coder Social home page Coder Social logo

eleven41 / aws-lambda-copy-s3-objects Goto Github PK

View Code? Open in Web Editor NEW
62.0 62.0 55.0 10 KB

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

JavaScript 100.00%

aws-lambda-copy-s3-objects's People

Contributors

mwhouser avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

aws-lambda-copy-s3-objects's Issues

Metadata lost when copying cross account

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?

Source bucket 'undefined' is missing 'TargetBucket' tag. undefined

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:
04-28_lambda_s3copyobject_error1

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.

Updates for AWS Node.js 4.3

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.