Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error occurred while GetObject. S3 Error Code: NoSuchBucket. S3 Error Message: The specified bucket does not exist #102

Closed
juanpicuervo opened this issue Jun 13, 2019 · 4 comments

Comments

@juanpicuervo
Copy link

Hi, im having the following issue with the latest release:

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: xxxx)

This happen when Cloudformation try to create the Logical Id: ImageHandlerFunction

I look up in the 2 buckets that i create and i dont have any zip with the name image-handler.zip as i can see in the yaml template. Is there something im doing wrong?

@cravendy
Copy link

cravendy commented Jun 18, 2019

The zip file "image-handler.zip" is provided by AWS. The instruction blow when deploying the solution is incorrect!

sudo ./build-s3-dist.sh $DIST_OUTPUT_BUCKET $TEMPLATE_OUTPUT_BUCKET $VERSION 

The script "build-s3-dist.sh " supposes to replace variables with correct information
https://github.com/awslabs/serverless-image-handler/blob/master/deployment/build-s3-dist.sh#L15

However, "$DIST_OUTPUT_BUCKET" is actually required to be AWS's source code bucket which we may not know. The 2nd parameter "$TEMPLATE_OUTPUT_BUCKET" is useless, because there is no a variable called "%% TEMPLATE_BUCKET%%" in the template below

https://github.com/awslabs/serverless-image-handler/blob/master/deployment/serverless-image-handler.template

You may try to deploy the solution via the CloudFormation template in the development guide listed below, which should resolve the problem.

Automated Deployment - Step 1. Launch the Stack - https://docs.aws.amazon.com/solutions/latest/serverless-image-handler/deployment.html#step1

PS.
If you wanted to modify the serverless-image-handler.template manually, you can replace the variables %%BUCKET_NAME%% and %%VERSION%% as below. This should be working for v4.0.0 if there is no other modification after I replied.

%%BUCKET_NAME%% ==> solutions
%%VERSION%% ==> v4.0.0

@jedsmith13
Copy link

@cravendy The build-s3-dist.sh is specifically to replace the image-handler.zip that AWS provides with a custom one. The problem is something else. Take a look at @aijunpeng's solution at #115 (comment)

@ericquinones
Copy link

Hi, im having the following issue with the latest release:

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: xxxx)

This happen when Cloudformation try to create the Logical Id: ImageHandlerFunction

I look up in the 2 buckets that i create and i dont have any zip with the name image-handler.zip as i can see in the yaml template. Is there something im doing wrong?

Hi @juanpicuervo
To confirm, are you experiencing issues when building a custom distribution as described here or was this an issue when you were deploying the solution directly from our website?

If you were building a custom distribution, to help troubleshoot, can you please confirm that when you set the $DIST_OUTPUT_BUCKET environment variable, you did not include a region?

The region is determined dynamically by CloudFormation depending on the region in which you launched the stack so if you have an S3 bucket named my-bucket-name-us-east-1, you need to specify my-bucket-name as the value for DIST_OUTPUT_BUCKET and when CloudFormation launches the stack, it will derive my-bucket-name-us-east-1 here by joining the value of $DIST_OUTPUT_BUCKET with the region in which you deployed the stack ({ "Ref": "AWS::Region" }).

Note the value for the bucket name is stored in the Mappings section of the CloudFormation template here. %%BUCKET_NAME%% is replaced by the build script here.

@beomseoklee
Copy link
Member

We are closing this issue, but please feel free to open the issue again if you any other support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants