user3303554
user3303554

Reputation: 2335

AWS API-Gateway: Invalid cache key parameter specified

In the "method execution" page, I checked several "URL Query String Parameters" as "Caching". Now, when I try to uncheck one of them, remove a URL Query String, or create a new URL Query string with caching, I get the error, "Invalid cache key parameter specified" in a red box. None of my changes save. I did not yet enable caching at the stage level.

Upvotes: 1

Views: 2412

Answers (1)

user3303554
user3303554

Reputation: 2335

BobK@AWS answered this question via their support forum. It turns out it's a bug in the dashboard. It can be solved by recreating the parameters according to the values already stored, which can be retrieved via the CLI. See his full response here: https://forums.aws.amazon.com/thread.jspa?messageID=711315&#711315

Here are some of his work-arounds that he listed:

  1. Make sure to uncheck "caching" before attempting to delete a query string parameter.

  2. Make sure you don't have an orphaned query string parameter in your integration request configuration. These may have become orphaned if they were marked as "caching" and the underlying mapping parameter disappeared.

  3. If you do have orphaned parameters, either update their mapped value or uncheck "caching" then delete the parameter.

  4. You may also need to recreate any previously deleted parameters that were marked as "caching".

  5. If you have the AWS CLI and feel comfortable with making changes that way, you can review your method's configuration and verify which parameter was deleted and remove it from cache settings.

  6. If none of this works, you can always delete the method and start over, always making sure to uncheck a parameter before deleting in the future.

Upvotes: 3

Related Questions