-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Receive "Deployment bucket is not in the same region as the lambda function" when using us-east-1 #2404
Comments
Thanks for reporting and investigating @briguy202 😊 .... I've pushed a fix along with this PR and will be merged very soon. It's a high priority! Cheers 👼 |
Is there a workaround for this one? I was hoping that omitting |
@doapp-ryanp, unfortunately I don't think there is other than to patch the issue or wait on #2385 which looks to be very close to completion. If you opt for patching, which is what we did, it's a one-liner change - see briguy202@750c55b. |
Should be resolved with #2385 /cc @flomotlik |
I've got the same issue happening when using pre-existing deployment bucket in
This could be one-liner fix in configureStack.js similar to the fix for original issue: if (result.LocationConstraint === 'EU') result.LocationConstraint = 'eu-west-1'; Should I raise a separate issue for this case or current one could be reopened? |
BOOM! 💥 That is one nice catch @ssemyonov ... I feel like we're always on a mission to keep up with AWS inconsistencies 😄 ... I'm gonna PR a quick fix today. |
Hi @eahefnawy are you still looking into EU - eu-west-1 issue? Do you need a hand? |
PR #3107 created to address EU - eu-west-1 issue. |
For some reasons this merge was lost. Having same issue with the latest sls -> 1.27.2 if (result.LocationConstraint === 'EU') result.LocationConstraint = 'eu-west-1'; You can check this out here: https://github.com/ssemyonov/serverless/blob/master/lib/plugins/aws/deploy/lib/configureStack.js [line 33] Serverless Error --------------------------------------- Could not locate deployment bucket. Error: Deployment bucket is not in the same region as the lambda function Get Support -------------------------------------------- Your Environment Information ----------------------------- Could you please fix it! |
@voiceactivity The check is still there - in
It seems that you have some old code there - the configureStack file has been removed for some time now 😄 |
Thanks for that. I am still getting the error. I will investigate further. |
May I know why it is not allowed to use the S3 bucket from different region? Is there any reason for that? |
Having the same issue when using profiles. Profile has Setting |
Having it trying to run |
For the sake of trying it, commenting out the location constraint worked for my simple resource (SES templates) deploy file. node_modules/serverless/lib/plugins/aws/deploy/lib/existsDeploymentBucket.js
Buckets are global, why is this constraint necessary? Unless you've lucked out and created everything in a region where every service you'll ever need is available, its likely to cause a headache some day... |
This is a Bug Report
Description
When attempting to use a pre-existing S3 bucket in us-east-1 via the
deploymentBucket
configuration option, I receive an error response "Deployment bucket is not in the same region as the lambda function".Debugging through the Serverless code, I observed that it is attempting to match a LocationConstraint returned from the AWS SDK to the region; however, AWS Documentation states:
Due to this, it appears the check in configureStack.js to match the bucket's region with the specified region fails and I receive the error message.
I should have been able to use the pre-existing bucket.
Deployment bucket is not in the same region as the lambda function
Additional Data
The text was updated successfully, but these errors were encountered: