serverless-domain-manager icon indicating copy to clipboard operation
serverless-domain-manager copied to clipboard

Deleting via cloudformation fails

Open WhyNotHugo opened this issue 4 years ago • 5 comments

When deleting a deployment via cloudformation, I always get this error:

image

I have to go to the AWS console > API Gateway > Custom domain names, look for the mapping, and delete the path mappings manually.

The full error details behind this says:

Deleting RestApi jfzs2ks7ke failed. Please remove all base path mappings related to the RestApi in your domains. (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException; Request ID: d95d1ad5-b0f1-4a02-ab18-655ee4ab03e3; Proxy: null)

I think that the base path mappings are not registered as being owned by this deployment in CF, hence, it does not try to delete it.

WhyNotHugo avatar Dec 10 '20 09:12 WhyNotHugo

I'm also getting this same issue consistently

daveykane avatar Feb 09 '21 21:02 daveykane

+1 for this. Any suggetions?

a0s avatar Oct 06 '21 11:10 a0s

Same. Any suggestions? I was ignoring this info but deployed once again, but I got another item with the same Api name in CF... Awkward...

SimonSongCA avatar Jan 13 '22 05:01 SimonSongCA

similar in our case - everything works fine when in CloudFormation the ApiGatewayRestApi is on UPDATE_IN_PROGRESS but when ApiGatewayRestApi starts with DELETE_IN_PROGRESS, we get CREATE_FAILED and our CloudFormation fails and rollback It seems that in the next try it will create a new API Gateway and the old one would be left empty BUT the Custom Domain will be still mapped to the old empty one

michal1106 avatar Jun 07 '22 08:06 michal1106

yea this plugin appears to cause some issues with Deletion:

Please remove all base path mappings related to the RestApi in your domain

is there something about this plugin that is not managing the api mappings with CF? I don't see the creation events in the stack, only the deletion (on delete)

bneigher avatar Aug 04 '23 17:08 bneigher