aws-amplify / aws-amplify/amplify-cli

Can't update existing S3 Storage without migrating both S3 + Cognito

Open
#10,250 2 comments 0 reactions 0 assignees View on GitHub
auth bug p3 storage
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Before opening, please confirm:

- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

### How did you install the Amplify CLI?

npm

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

14.17.6

### Amplify CLI Version

8.0.2

### What operating system are you using?

Mac

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

Yes, I added expiry lifecycle rules to an s3 bucket

### Amplify Categories

auth, storage, function, api, analytics

### Amplify Commands

update

### Describe the bug

I'd like add a Lambda trigger from an existing S3 storage bucket. I ran ```amplify update storage``` and I get the following prompts:

```
hisham@mb3 ess-app % amplify update storage
? Select from one of the below mentioned services: Content (Images, audio, video, etc.)

A migration is needed to support latest updates on storage resources.
Recommended to try in a non-production environment first. Run "amplify env add" to create or clone an environment.
Custom CloudFormation changes will NOT be preserved. Custom changes can be made with "amplify storage override" after migration.
Learn more about this migration: https://docs.amplify.aws/cli/migration/override
Do you want to migrate storage resource "EssUsersS3"? (Y/n) · yes

A migration is needed to support latest updates on auth resources.
Recommended to try in a non-production environment first. Run "amplify env add" to create or clone an environment.
Custom CloudFormation changes will NOT be preserved. Custom changes can be made with "amplify auth override" after migration.
Learn more about this migration: https://docs.amplify.aws/cli/migration/override
Do you want to migrate auth resource "essapp0f5644a0"? (Y/n) · no
```

This is similar to https://github.com/aws-amplify/amplify-cli/issues/9675

### Expected behavior

I should be able to upgrade s3 without necessarily upgrading cognito. I should be able to make changes without upgrading either...

### Reproduction steps

Setup s3 bucket using older version of amplify then attempt to run amplify update storage

### GraphQL schema(s)

```graphql
# Put schemas below this line

```

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.