amplify-backend icon indicating copy to clipboard operation
amplify-backend copied to clipboard

Sandbox identifier mismatch can cause confusion

Open JavanPoirier opened this issue 9 months ago • 2 comments

Environment information

N/A

Describe the bug

Given the schema amplify-<app-name>-$(whoami)-sandbox, creating a sandbox like so npx ampx sandbox --identifier hello-world will result in whoami negating the -. Resulting in amplify-myapp-helloworld-sandbox .

This posses an issue as the underlying identifier does indeed have the dash (-), where places where the sandbox is listed does not, causing confusion for the developer.

A user may think the identifier is helloworld when referencing a list of sandboxes, when in fact it is hello-world. Running a command like so will therefore fail: npx ampx sandbox --identifier helloworld

Somewhat related is how app-id is created, scoped monorepo packages may have a name like @my-app/aws resulting in amplify-myappaws-$(whoami)-sandbox. I am personally not a fan of this and would at least like a way to explicit overwrite this.

Reproduction steps

See above

JavanPoirier avatar Feb 19 '25 08:02 JavanPoirier