serverless-image-handler icon indicating copy to clipboard operation
serverless-image-handler copied to clipboard

Thumbor version forked and fixed to work on the latest lambda enviroment

Open jodevsa opened this issue 7 years ago • 95 comments

Since AWS have updated the lambda execution environment which broke old deployments (versions <=3.0) of this solution, and newer versions of this solution doesn't correctly implement the Thumbor interface (they shifted to sharpJS). I decided to Fork version 3.1 (Thumbor version) and make the required changes for it to work on lambda again

https://github.com/jodevsa/serverless-image-handler Published solution template is available in the README

jodevsa avatar Jul 24 '19 14:07 jodevsa

Thank you!

timkelty avatar Jul 24 '19 15:07 timkelty

Is this working for other 3rd parties? I tried updating our template to the published one here and CFN complained with:

2019-07-24 12:30:51 UTC-0400	ServerlessImageHandler	UPDATE_ROLLBACK_IN_PROGRESS	The following resource(s) failed to update: [CustomResource].
2019-07-24 12:30:50 UTC-0400	CustomResource	UPDATE_FAILED	Error occurred while GetObject. S3 Error Code: NoSuchBucket. S3 Error Message: The specified bucket does not exist (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: REDACTED)

scoates avatar Jul 24 '19 16:07 scoates

Same for me. Really need something to work asap. Multiple production sites are failing right now.

Jason O Brown

On Wed, Jul 24, 2019 at 11:39 AM Sean Coates [email protected] wrote:

Is this working for other 3rd parties? I tried updating our template to the published one here and CFN complained with:

2019-07-24 12:30:51 UTC-0400 ServerlessImageHandler UPDATE_ROLLBACK_IN_PROGRESS The following resource(s) failed to update: [CustomResource]. 2019-07-24 12:30:50 UTC-0400 CustomResource UPDATE_FAILED Error occurred while GetObject. S3 Error Code: NoSuchBucket. S3 Error Message: The specified bucket does not exist (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: REDACTED)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/awslabs/serverless-image-handler/issues/127?email_source=notifications&email_token=ACCTAVUAFZ5W6QU4GVC2HP3QBCAUTA5CNFSM4IGQ6ATKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2W5HBA#issuecomment-514708356, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCTAVQWVLBUSWSZ7UVDSSDQBCAUTANCNFSM4IGQ6ATA .

jasonobrown avatar Jul 24 '19 16:07 jasonobrown

@jasonobrown which region are you deploying to ?

jodevsa avatar Jul 24 '19 16:07 jodevsa

@jodevsa us-east-2

jasonobrown avatar Jul 24 '19 16:07 jasonobrown

I'm us-east-1, FWIW.

scoates avatar Jul 24 '19 17:07 scoates

Will it work if I deploy it in us-east-1 but my bucket is in us-east-2?

jasonobrown avatar Jul 24 '19 17:07 jasonobrown

@jasonobrown @scoates it should work now for us-east-1, us-east-2 and eu-west-1

jodevsa avatar Jul 24 '19 17:07 jodevsa

Thank you. You saved the rest of the week.

scoates avatar Jul 24 '19 17:07 scoates

It still failed for me in us-east-2

jasonobrown avatar Jul 24 '19 17:07 jasonobrown

Wrong bucket permission.., should work now :+1:

jodevsa avatar Jul 24 '19 17:07 jodevsa

Negative, failed again. I really appreciate the help by the way. Sorry to be such a nagging pain in the butt.

jasonobrown avatar Jul 24 '19 17:07 jasonobrown

To be clear for others who might be following: this is working for me, now, on an updated stack (previously updated in February!), deployed in us-east-1 with a bucket in us-east-1.

scoates avatar Jul 24 '19 17:07 scoates

@jasonobrown @scoates it should work now for us-east-1, us-east-2 and eu-west-1

I have a stack in us-west-1…any way you could make it deployable there? 👼

I'd also like to nominate @jodevsa as person of the year!

timkelty avatar Jul 24 '19 17:07 timkelty

@jodevsa I'm seeing the same thing @jasonobrown is – failing in us-east-2 (and us-west-1). I've confirmed its working in us-east-1, though.

timkelty avatar Jul 24 '19 17:07 timkelty

@jodevsa @timkelty It's failing for me on us-east-1 as well.

jasonobrown avatar Jul 24 '19 17:07 jasonobrown

Hi guys The problem is that lambda requires the files to be in the same region which requires me to create multiple buckets for each region. there might be an easier way, not sure

@jasonobrown for some reason I'm unable to create a bucket in us-east-2 ( might be due to the fact i just deleted a bucket with that name in different region. I'll try again later @timkelty us-west-1 should work now

working regions: eu-west-1, us-east-1 and us-west-1

I'll continue on supporting all regions when i come back

jodevsa avatar Jul 24 '19 17:07 jodevsa

@jodevsa you are a saint. Confirmed that us-west-1 is now working.

timkelty avatar Jul 24 '19 18:07 timkelty

Can anyone tell me why I can't launch in us-east-1? Am I supposed to be changing the template url to say us-east-1 or leaving it as eu-west-1? I've tried both, but obviously something is wrong.

jasonobrown avatar Jul 24 '19 18:07 jasonobrown

@jasonobrown Should be able to just leave the template url as eu-west-1 (that's what I did).

timkelty avatar Jul 24 '19 18:07 timkelty