diff --git a/services/harmony/app/frontends/staging-bucket-policy.ts b/services/harmony/app/frontends/staging-bucket-policy.ts
index bea080ccb..c27ae1e1b 100644
--- a/services/harmony/app/frontends/staging-bucket-policy.ts
+++ b/services/harmony/app/frontends/staging-bucket-policy.ts
@@ -46,10 +46,6 @@ export function bucketKeyFromBucketPath(bucketPath: string): [string, string] {
key = matches[4];
}
- if (key?.includes('//')) {
- throw new RequestValidationError(`'${bucketPath}' is not a valid bucket name with optional path`);
- }
-
// strip off trailing /
if (key?.endsWith('/')) {
key = key.slice(0, -1);
diff --git a/services/harmony/app/markdown/user-bucket.md b/services/harmony/app/markdown/user-bucket.md
index 20e199cfc..b53517dfa 100644
--- a/services/harmony/app/markdown/user-bucket.md
+++ b/services/harmony/app/markdown/user-bucket.md
@@ -33,6 +33,8 @@ The `bucketPath` parameter can be one of the following
The third option is compatible with the `destinationUrl` parameter for requests.
+Bucket names must conform to the [AWS bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html). The path must conform to the [AWS object key naming guidelines](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html). Characters listed under "Characters to Avoid" are not supported.
+
A sample policy generated by the endpoint is shown below:
diff --git a/services/harmony/app/middleware/parameter-validation.ts b/services/harmony/app/middleware/parameter-validation.ts
index 96da21faa..5b029539e 100644
--- a/services/harmony/app/middleware/parameter-validation.ts
+++ b/services/harmony/app/middleware/parameter-validation.ts
@@ -127,6 +127,33 @@ async function validateDestinationUrlParameter(req: HarmonyRequest): Promise' });
+ it('returns a 400 error', function () {
+ expect(this.res.statusCode).to.equal(400);
+ });
+
+ it('returns an appropriate error message', function () {
+ const error = JSON.parse(this.res.text);
+ expect(error.description).to.eql('Error: bucketPath parameter value contains unsupported characters');
+ });
});
});
});