amplify-cli: `aws_user_files_s3_bucket` on aws-exports file doesn't match the correct bucket name, instead of `mybucket-${env}` it seems to have done `mybucket${env}-${env}

Before opening, please confirm:

  • I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?

yarn

If applicable, what version of Node.js are you using?

v16.13.0

Amplify CLI Version

7.3.2

What operating system are you using?

MacOS

Amplify Categories

storage

Amplify Commands

init

Describe the bug

The aws_user_files_s3_bucket generated on src/aws-exports.js does not match the actual name of the bucket, the bucket name is mybucket so I expect it to use mybucket-${env} but seems to use mybucket${env}-${env}, example mybucketdev-dev and mybucketuat-uat, resulting to incorrect URL generated when using Storage.get(s3Key) which of course results to 404 errors.

Expected behavior

Should produce mybucket-${env} rather than mybucket${env}-${env}.

Reproduction steps

  1. Init a new project
  2. Add storage
  3. Generate aws-exports
  4. Check the aws_user_files_s3_bucket

GraphQL schema(s)

# Put schemas below this line


Log output

# Put your logs below this line


Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 27 (9 by maintainers)

Most upvoted comments

It’s in a fucked up state, yes they are in the same environment, I don’t deploy using my local machine, I use amplify console and it’s connected to a git branch, when I deployed today, amplify console used the latest version of amplify which is 7.3.2 which is very different from the last version which was 6.4.0 so now the one on the cloud is using 7.3.2 which seems to have changed the naming convention for the storage.