Skip to content

[Bug] - CreateBucket - in us-east-1 region, us-east-1 location constraint should be rejected #1654

@lrm25

Description

@lrm25

Describe the bug
Counterintuitive, but the documentation is here: https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucket.html. Basically, to create a us-east-1 bucket, no LocationConstraint is required. However, an explicit us-east-1 constraint cannot be set either, or the InvalidLocationConstraint error is returned. This isn't totally clear based on the way things are worded, but it's reported by users and AIs.

To Reproduce

  1. Start versitygw in the us-east-1 region, e.g.: ./versitygw --access=AKIA**** --secret=******** --region=us-east-1 --iam-dir=/Users/lukemccrone/devel/versitygw/iam --cert /Users/lukemccrone/devel/versitygw/cert.pem --key /Users/lukemccrone/devel/versitygw/versitygw.pem posix --versioning-dir /tmp/versioning /tmp/gw
  2. Attempt to create a bucket with the script at https://github.com/versity/versitygw/blob/tests/upload_part_without_upload_id/tests/rest_scripts/generateCommand.go with the following parameters: "-commandType" "createBucket" "-bucketName" "{bucket name}" "-awsRegion" "us-east-1" "-locationConstraint" "us-east-1"

Expected behavior
The command is rejected with an InvalidLocationConstraint error.

Server Version
Version : v1.0.18
Build : 6da13dd
BuildTime: 2025-11-12_07:27:10PM
Darwin Lukes-MacBook-Pro.local 24.6.0 Darwin Kernel Version 24.6.0: Mon Jul 14 11:28:30 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6030 arm64

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions