Code Monkey home page Code Monkey logo

s3-resizer's People

Contributors

adamivancza avatar kofon95 avatar matheusflausino avatar muhammadreda avatar nelsonamaya82 avatar sagidm 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  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

s3-resizer's Issues

AWS end support for Node.js 16

I received the following email from AWS - do you intend to rebuild using 16?

Hello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Node.js 12 runtime.

We are ending support for Node.js 12 in AWS Lambda. This follows Node.js 12 End-Of-Life (EOL) reached on April 30, 2022 [1].

As described in the Lambda runtime support policy [2], end of support for language runtimes in Lambda happens in two stages. Starting November 14, 2022, Lambda will no longer apply security patches and other updates to the Node.js 12 runtime used by Lambda functions, and functions using Node.js 12 will no longer be eligible for technical support. In addition, you will no longer be able to create new Lambda functions using the Node.js 12 runtime. Starting December 14, 2022, you will no longer be able to update existing functions using the Node.js 12 runtime.

We recommend that you upgrade your existing Node.js 12 functions to Node.js 16 before November 14, 2022.

Whitelist sizes to resize

It would be quite annoying if someone was to create various sizes of different images.

Is there a way to white list only a few specific image sizes?

Access Denied

Upon testing it. The lambda test shows this error.

image

HTTPS problem

Hi!

I've got the resizing working, but Lambda is not working on HTTPS.
I can reach my original (public) S3 image on
https://[bucket].s3.eu-north-1.amazonaws.com/[image].jpg and
http://[bucket].s3.eu-north-1.amazonaws.com/[image].jpg

And resized via Lambda on HTTP
http://[bucket].s3-website.eu-north-1.amazonaws.com/300x300/[image].jpg
But on on HTTPS
https://[bucket].s3-website.eu-north-1.amazonaws.com/300x300/[image].jpg
That just times out.

Though, when I have used Lambda over HTTP I can reach via HTTPS directly through S3.

Any ideas?

AccessDenied

Great library by the way, it works great in the root of the buckets ,

but when i created folder inside the backet and upload new image to this sub folder when i tried to resize it using the fill path
https://lockcommerce.s3.me-south-1.amazonaws.com/187hdk3783-34345/50x50/img.png
the sub folder name : 187hdk3783-34345 ( cause i want to create folder for each customer .

i received this error

AccessDenied Access Denied F59E7CC0FF72CEA3 5L5me6BP8S9Xk8qH9XeYBk1WvXobMz91MO/oCDVlXgad+5bgG7/CWWPy+C1dlk5IOpB4YctAWbY=

please help .

npm module error

ran through the install steps, ran into an issue when running my test:

{ "errorMessage": "The module '/var/task/node_modules/sharp/build/Release/sharp.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 48. This version of Node.js requires\nNODE_MODULE_VERSION 57. Please try re-compiling or re-installing\nthe module (for instance, using npm rebuildornpm install).", "errorType": "Error", "stackTrace": [ "NODE_MODULE_VERSION 48. This version of Node.js requires", "NODE_MODULE_VERSION 57. Please try re-compiling or re-installing", "the module (for instance, using npm rebuildornpm install).", "Object.Module._extensions..node (module.js:681:18)", "Module.load (module.js:565:32)", "tryModuleLoad (module.js:505:12)", "Function.Module._load (module.js:497:3)", "Module.require (module.js:596:17)", "require (internal/module.js:11:18)", "Object.<anonymous> (/var/task/node_modules/sharp/lib/constructor.js:10:15)", "Module._compile (module.js:652:30)", "Object.Module._extensions..js (module.js:663:10)", "Module.load (module.js:565:32)" ] }

Cyclic redirect with CloudFront

Hello,

The Lambda function is working well, but I have cyclic redirect when trying to configure it with CloudFront.

I created a CloudFront distribution with default settings and used S3's static website endpoint as the origin. Also, I used the CloudFront domain name for the URL Lambda envonment variable.

Existing images are served well. But for new images I receive redirects loop between API gateway and CloudFront. What is interesting, new image generated and accessible with S3's endpoint. Can't get what is wrong.

Any ideas on how to fix it?
Thank you.

"errorMessage": "Error: Cannot find module 'sharp'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",

{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'sharp'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'sharp'",
"Require stack:",
"- /var/task/index.js",
"- /var/runtime/UserFunction.js",
"- /var/runtime/index.js",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object. (/var/runtime/index.js:43:30)",
" at Module._compile (internal/modules/cjs/loader.js:1015:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)",
" at Module.load (internal/modules/cjs/loader.js:879:32)",
" at Function.Module._load (internal/modules/cjs/loader.js:724:14)",
" at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)",
" at internal/main/run_main_module.js:17:47"
]
}

Missing module Sharp?

Forgive my lack of knowledge on AWS - i'm kind of a newbie but when i try to test the lambda the following gets returned - is there a missing module or do i need to do anything additional to your tutorial? Thank you! Any help is appreciated.

Response:
{
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'sharp'",
"trace": [
"Runtime.ImportModuleError: Error: Cannot find module 'sharp'",
" at _loadUserApp (/var/runtime/UserFunction.js:100:13)",
" at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)",
" at Object. (/var/runtime/index.js:45:30)",
" at Module._compile (internal/modules/cjs/loader.js:778:30)",
" at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)",
" at Module.load (internal/modules/cjs/loader.js:653:32)",
" at tryModuleLoad (internal/modules/cjs/loader.js:593:12)",
" at Function.Module._load (internal/modules/cjs/loader.js:585:3)",
" at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)",
" at startup (internal/bootstrap/node.js:283:19)"
]
}

Request ID:
"a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b"

Function Logs:
START RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b Version: $LATEST
2020-03-31T13:40:02.304Z undefined ERROR Uncaught Exception {"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'sharp'","stack":["Runtime.ImportModuleError: Error: Cannot find module 'sharp'"," at _loadUserApp (/var/runtime/UserFunction.js:100:13)"," at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)"," at Object. (/var/runtime/index.js:45:30)"," at Module._compile (internal/modules/cjs/loader.js:778:30)"," at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)"," at Module.load (internal/modules/cjs/loader.js:653:32)"," at tryModuleLoad (internal/modules/cjs/loader.js:593:12)"," at Function.Module._load (internal/modules/cjs/loader.js:585:3)"," at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)"," at startup (internal/bootstrap/node.js:283:19)"]}
END RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b
REPORT RequestId: a9d515ef-c4a3-4b8b-ba30-f8d2c643bc0b Duration: 763.36 ms Billed Duration: 800 ms Memory Size: 768 MB Max Memory Used: 30 MB
Unknown application error occurred
Runtime.ImportModuleError

index.handler is undefined or not exported

I followed readme file and I've done everything that @sagidM said in the readme file.

node version is: 12.x
Handler: index.handler
.zip file: s3-resizer-3.1.0.zip (download zip from your repo.)

Still, I'm getting below error when I run the test.

test json is

{
  "queryStringParameters": {
    "path": "150x150/engg.jpg"
  }
}

lambda_error

"Access Denied" in the brower

I can test successful in Lambda , but I test in my chrome brower and the system return "Access Denied". Could help me? Thanks !!

AccessDenied
Access Denied
E6BC853F822F087E

0W84WFaXXRCdQnZa1DWRSzQc0/LRijPbqjqSKf4tejzoXHmwF1nq9c42yWfXJa10i6CWmpBaO88=

AWS end support for Node.js 8.x

I received the following email from AWS - do you intend to rebuild using 10?


Hello,

We are contacting you as we have identified that your AWS Account currently has one or more Lambda functions using Node.js 8.10, which will reach its EOL at the end of 2019.

What’s happening?

The Node community has decided to end support for Node.js 8.x on December 31, 2019 [1]. From this date forward, Node.js 8.x will stop receiving bug fixes, security updates, and/or performance improvements. To ensure that your new and existing functions run on a supported and secure runtime, language runtimes that have reached their EOL are deprecated in AWS [2].

For Node.js 8.x, there will be 2 stages to the runtime deprecation process:

  1. Disable Function Create – Beginning January 6, 2020, customers will no longer be able to create functions using Node.js 8.10

  2. Disable Function Update – Beginning February 3, 2020, customers will no longer be able to update functions using Node.js 8.10

After this period, both function creation and updates will be disabled permanently. However, existing Node 8.x functions will still be available to process invocation events.

What do I need to do?

We encourage you to update all of your Node.js 8.10 functions to the newer available runtime version, Node.js 10.x[3]. You should test your functions for compatibility with the Node.js 10.x language version before applying changes to your production functions.

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.