Search code examples
amazon-web-servicesaws-lambdaaws-api-gatewayserverlessserverless-framework

Deployment failing after deleting API Gateway. How to recover?


After I removed the API gateway manually via the aws console because changing the configuration in my serverless.yml file didn’t seem to change the Gateway configuration anymore.

Now deployment fails with " An error saying: ApiGatewayMethodGet - Template error: API Gateway RestAPI dj1ivqgipb doesn't exist".

I understand that this is an error caused by me, but can anyone please hint me into the direction of how to recover from this?

https://i.sstatic.net/rzr8S.png


Solution

  • All I did was to go to API Gateway -> Custom domain names -> then I reconfigure API mapping from pointing to the old deleted API to then point to the existing API that I just created in the cli... Then now I can re-deploy my serverless application.

    https://i.sstatic.net/N6Sjh.png