aws-amplify / aws-amplify/amplify-cli
vague error when `amplify init` fails, partial init
- 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?
pnpm
### If applicable, what version of Node.js are you using?
18
### Amplify CLI Version
10.0.0
### 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
Not applicable
### Describe the bug
If `amplify init` fails for some reason we are presented with a vague error (in my case I hit the limit for s3 buckets, but I needed to go to the CloudFormation console to figure out what went wrong)
```
aws-amplify/reproductions/854
➜ amplify init -y
Note: It is recommended to run this command from the root of your app directory
The following configuration will be applied:
Project information
| Name: 854
| Environment: dev
| Default editor: Visual Studio Code
| App type: javascript
| Javascript framework: none
| Source Directory Path: src
| Distribution Directory Path: dist
| Build Command: npm run-script build
| Start Command: npm run-script start
Using default provider awscloudformation
Adding backend environment dev to AWS Amplify app: d3zwvxdkkdme5
Deployment failed.
Deploying root stack 854 [ ==========------------------------------ ] 1/4
amplify-854-dev-82333 AWS::CloudFormation::Stack ROLLBACK_COMPLETE Fri
AuthRole AWS::IAM::Role CREATE_FAILED Fri
UnauthRole AWS::IAM::Role CREATE_FAILED Fri
DeploymentBucket AWS::S3::Bucket CREATE_FAILED Fri
An error occurred when creating the CloudFormation stack
```
### Expected behavior
error includes guidance for next steps, what went wrong
### Reproduction steps
1. reach the bucket limit (or some other means of causing init to fail)
2. `amplify init -y`
3. observe failure and error
### 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
Research direction
Start at the `amplify init -y` deployment-failure path and reproduce the partial initialization with the documented bucket-limit scenario. Trace where the CLI reports “Deployment failed” and define completion as an actionable error that explains the failure and next steps; no file or test is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cli, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100