Error importing AWS::ApiGateway::UsagePlanKey

0

Hi,

I've been trying to import an AWS::ApiGateway::UsagePlanKey resource in to an existing stack and wasn't sure of the correct format of the id. I've now discovered that the correct format is "usagePlanId:apiKeyId" and the process is working, but the error message I received up until this point was very unhelpful:

Screen shot of error

I'm guessing the value is split on the : character and therefore if your input doesn't have one it comes up with the error Index: 1, Size: 1. Can I suggest that you capture this error and make it more user friendly? In the interim hopefully others might find this post to help them with the above issue.

Thanks

Mark

2 個答案
0

I tested the above using similar scenario on my end and replicated the same error. Your investigation is correct that when we pass an incorrect identifier (without the : ) for the resource AWS::ApiGateway::UsagePlanKey while importing it, we are getting the below error which is not very clear.

There was an error creating this changeset
Index: 1, Size: 1

Using a correct identifier (for eg - 123a4bcde5:a1bfcd) resolved the issue and the resource can be imported successfully.

I would like to take advantage of this to thank you for bringing it to our notice. As we strive to improve our products, your feedback is greatly appreciated. I also understand that this might have caused inconvenience to your work-flow, and sincerely extend my apology for the same

However, I would like to add that I have passed on this feedback to the internal CFN team so that they can check if the error messaging can be improved here and add it to their roadmap.

AWS
已回答 1 年前
0

For anyone else ending up in this thread because they have the above, or a similar vague error message: I was trying to import an existing UsagePlanKey resource in CloudFormation and it turned out that my problem was that I did not know that the ID of a UsagePlanKey is actually a combination of Key ID and the Usage Plan ID, for instance "123abcdef:abc123"

已回答 2 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南