aws-amplify / aws-amplify/amplify-cli

S3 Bucket limit produces unhelpfull error on amplify init or push

Open
#11,241 2 comments 2 reactions 0 assignees View on GitHub
bug ops-deploy p2 platform
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/dev/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?

v16.17.0

### Amplify CLI Version

10.3.1

### 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.

N/A

### Amplify Categories

Not applicable

### Amplify Commands

init

### Describe the bug

When the S3 bucket quota has been reached in an account, attempting to run `amplify init` or `amplify push` results in an error:
> `Cannot read property 'has' of undefined`

![cli-error](https://user-images.githubusercontent.com/87148442/197288139-a83ca7c8-9eec-4d4d-b935-736205be2459.png)

The actual issue when looking at CloudFormation is:
> `You have attempted to create more buckets than allowed (Service: Amazon S3; Status Code: 400; Error Code: TooManyBuckets`

### Expected behavior

It would be helpful to have a clearer error message, mentioning the bucket limit.

### Reproduction steps

1. Reach the limit of S3 buckets in account
2. Attempt to `amplify init`

### GraphQL schema(s)

```graphql
# Put schemas below this line

```

### Project Identifier

_No response_

### 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.