Creating two types with similar names gives an IAM role already exists error.
Describe the bug
We've got two types defined in our schema namely UserSubscriptionDeliveryTimings and UserSubscriptionDeliveryDays. When we created the first type, it created an IAM role UserSubscriptionDeliv-role-docnrn3g2bfyllul3wm6kshbpi-develop and that worked, when we created the second type, it tried to create an IAM role with the same name for some reason.
Running amplify mock worked for us but amplify push fails.
I know the type names could have been shorter but we already types with the names DeliveryTimings and DeliveryDays.
Amplify CLI Version 4.16.1
To Reproduce
- Create the types in your schema.graphql
- Verify that the code works with
amplify mock api - Run
amplify pushto push changes online.
Expected behavior
amplify push should have run seamlessly and created the necessary tables, queries and mutations.
Desktop (please complete the following information):
- OS: Mac
- Node Version. 12.14.0
Additional context We have a lot of types defined in our project, > 20
Removing the UserSubscriptionDeliveryDays from schema.graphql should have successfully run amplify push but now, not able to Push anything to Amplify. 😐
CREATE_FAILED UserSubscriptionDeliveryTiminguserSubscriptionResolver AWS::AppSync::Resolver Fri Apr 10 2020 00:28:45 GMT+0530 (India Standard Time) Only one resolver is allowed per field. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: 57ac8955-e48a-4c4c-a7a6-23da44690566)
Hi @varunpsr
For the workaround you can name the types with length <=21 chars. By the time I will fix this issue. Thanks for reporting this.
Glad I could be of help.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.