Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI should fail on init if app limit has been reached #10838

Closed
2 tasks
josefaidt opened this issue Aug 3, 2022 · 4 comments · Fixed by #10839
Closed
2 tasks

CLI should fail on init if app limit has been reached #10838

josefaidt opened this issue Aug 3, 2022 · 4 comments · Fixed by #10839
Labels
feature-request Request a new feature good first issue Good for newcomers p3 platform-init Issues related to initializing a new Amplify project

Comments

@josefaidt
Copy link
Contributor

Is this feature request related to a new or existing Amplify category?

No response

Is this related to another service?

No response

Describe the feature you'd like to request

If we have reached the 25 app limit for our chosen region, upon amplify init the CLI should fail

josef ~/D/p/my-project
> amplify init -y
The maximum number of apps that you can create with Amplify in this region has been reached. Select a different region or [request a limit increase](#some-link)...

Currently the CLI prints a warning in the large output from amplify init:

⚠️ The maximum number of apps that you can create with Amplify in this region has likely been reached:

However, this is easily missed, and when we attempt to add a resource we are presented with an ambiguous error:

🛑 Missing required key 'appId' in params
MissingRequiredParameter: Missing required key 'appId' in params

(this error is looking for AmplifyAppId for our environment, though this does not exist because we have reached our app limit)

Describe the solution you'd like

josef ~/D/p/my-project
> amplify init -y
The maximum number of apps that you can create with Amplify in this region has been reached. Select a different region or [request a limit increase](#some-link)...

Describe alternatives you've considered

n/a

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • ⚠️ This feature might incur a breaking change
@josefaidt josefaidt added feature-request Request a new feature platform-init Issues related to initializing a new Amplify project labels Aug 3, 2022
@josefaidt josefaidt added the p3 label Aug 3, 2022
@rafaelfaria
Copy link

I have the same problem.
And gets worst, because I have to transfer my project to a new computer, and after checking out a project, then running amplify init and going through the whole thing.

I get a "kinda of" success message? but with an warning in the end saying the max number of apps has reached (I only have ONE app).

✔ Initialized provider successfully.
✅ Initialized your environment successfully.

Your project has been successfully initialized and connected to the cloud!

Some next steps:
"amplify status" will show you what you've added already and if it's locally configured or deployed
"amplify add <category>" will allow you to add features like user login or a backend API
"amplify push" will build all your local backend resources and provision it in the cloud
"amplify console" to open the Amplify Console and view your project status
"amplify publish" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud

Pro tip:
Try "amplify add api" to create a backend API and then "amplify push" to deploy everything

⚠️ The maximum number of apps that you can create with Amplify in this region has likely been reached:
For more information on Amplify Service Quotas, see:
https://docs.aws.amazon.com/general/latest/gr/amplify.html#service-quotas-amplify

Then when I do amplify status, something worries me more, because it tells me some of my functions and apis changes, even thou I was literally just checking the project out.


┌──────────┬──────────────────────────────────────┬───────────┬───────────────────┐
│ Category │ Resource name                        │ Operation │ Provider plugin   │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ checkHoneypot                        │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ sendEmail                            │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ cryptokenAuthCustomMessage           │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ manageTelegramGroups                 │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ triggerMessenger                     │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Api      │ cryptokenAPI                         │ Update    │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Hosting  │ amplifyhosting                       │ No Change │                   │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ searchToken                          │ No Change │ awscloudformation │
├──────────┼──────────────────────────────────────┼───────────┼───────────────────┤
│ Function │ getTokenPrice                        │ No Change │ awscloudformation

I also noticed a couple files changed. and when I run a git diff I get some of the dependencies has been removed ?????

--- a/amplify/backend/types/amplify-dependent-resources-ref.d.ts
+++ b/amplify/backend/types/amplify-dependent-resources-ref.d.ts
@@ -172,44 +172,6 @@ export type AmplifyDependentResourcesAttributes = {
             "Arn": "string"
         }
     },
-    "api": {
-        "cryptokenAPI": {
-            "GraphQLAPIIdOutput": "string",
-            "GraphQLAPIEndpointOutput": "string"
-        },
-        "AdminQueries": {
-            "RootUrl": "string",
-            "ApiName": "string",
-            "ApiId": "string"
-        },
-        "paymentsAPI": {
-            "RootUrl": "string",
-            "ApiName": "string",
-            "ApiId": "string"
-        },
-        "telegramWebhook": {
-            "RootUrl": "string",
-            "ApiName": "string",
-            "ApiId": "string"
- ```

Tht's very odd.

I would appreciate some help with this.

@danielleadams danielleadams added the good first issue Good for newcomers label Jan 18, 2023
@redjonzaci
Copy link
Contributor

How would I reproduce this?

@josefaidt
Copy link
Contributor Author

Closing as this issue is now resolved

@github-actions
Copy link

github-actions bot commented May 4, 2023

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature good first issue Good for newcomers p3 platform-init Issues related to initializing a new Amplify project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants