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

AWS Region eu-central-2 S3 buckets cannot be used to store backups #166

Closed
freix1 opened this issue Nov 20, 2022 · 1 comment
Closed

AWS Region eu-central-2 S3 buckets cannot be used to store backups #166

freix1 opened this issue Nov 20, 2022 · 1 comment
Labels
bug Something isn't working pr welcome upstream

Comments

@freix1
Copy link
Contributor

freix1 commented Nov 20, 2022

Describe the bug
It appears that it is currently not possible to use the new EU (Zurich) eu-central-2 AWS Region, that was just released this month, to store backups.

First, I created a S3 bucket on the new AWS Region and tried referencing it from my offen/docker-volume-backup container using the default environment variables:

AWS_S3_BUCKET_NAME: <my_bucket_name>
AWS_ACCESS_KEY_ID: <my_aws_access_key_id>
AWS_SECRET_ACCESS_KEY: <my_aws_secret_access_key>

Using this configuration I received the following error when trying to create a backup:

time="2022-11-20T18:21:48+01:00" level=error msg="Fatal error running backup: copyArchive: error copying archive: (*s3Storage).Copy: error uploading backup to remote storage: [Message]: 'The request signature we calculated does not match the signature you provided. Check your key and signing method.', [Code]: SignatureDoesNotMatch, [StatusCode]: 403"

Afterwards, I added the AWS_ENDPOINT environment variable to see whether manually specifying the AWS Region (as specified here) would resolve the issue:

AWS_ENDPOINT: s3.eu-central-2.amazonaws.com

I then received the following error:

time="2022-11-20T18:35:42+01:00" level=error msg="Fatal error running backup: copyArchive: error copying archive: (*s3Storage).Copy: error uploading backup to remote storage: [Message]: 'The eu-central-2 location constraint is incompatible for the region specific endpoint this request was sent to.', [Code]: IllegalLocationConstraintException, [StatusCode]: 400"

Lastly, I recreated the same S3 bucket on the EU (Frankfurt) eu-central-1 AWS Region and removed the AWS_ENDPOINT environment variable again. This resulted in the backups being stored correctly in the bucket without any errors.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new S3 bucket with the default settings on the EU (Zurich) eu-central-2 AWS Region.
  2. Reference the bucket using the default AWS S3 environment variables in a offen/docker-volume-backup container.
  3. Try creating a backup with this configuration, e.g. via docker exec <container_id> backup.

Expected behavior
It should be possible to store backups in any AWS Region using the three default environment variables. If that is not feasible, it should be possible to manually specify an official AWS endpoint using the AWS_ENDPOINT environment variable and store backups to it.

Desktop (please complete the following information):

  • Image Version: v2.22.1
  • Docker Version: 20.10.21

Additional context
It is possible that this bug is related to the AWS Region simply being brand new and maybe not yet being properly supported by the API. However, that is not something I have looked into so far.

@m90
Copy link
Member

m90 commented Nov 20, 2022

Looks like we'd need to update the Minio SDK to include these changes minio/minio-go#1726

I'm a bit busy the coming week but in case you or someone else wants to open a PR I'm happy to merge and release it. Else I might need a few more days to fix it, but I'll definitely put this on my agenda.

@m90 m90 added bug Something isn't working upstream pr welcome labels Nov 20, 2022
@m90 m90 closed this as completed Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pr welcome upstream
Projects
None yet
Development

No branches or pull requests

2 participants