Sls remove fails when custom domain with base path mappings used in APIG
See original GitHub issueThis is a (Bug Report / Feature Proposal)
Bug
Description
I tried to remove a stage which had a custom domain with base path mappings used in API Gateway. It failed with error:
Serverless: Getting all objects in S3 bucket...
Serverless: Removing objects in S3 bucket...
Serverless: Removing Stack...
Serverless: Checking Stack removal progress...
Serverless: Deployment failed!
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: ApiGatewayRestApi
- Deleting RestApi xxxxx failed. Please remove
all base path mappings related to the RestApi in your
domains: abc.xyz.com.
I understand that may be Serverless doesn’t yet support removing base path mappings, so I removed the base path mappings myself from AWS console. Now running sls remove
fails complaining S3 bucket doesn’t exist:
Serverless: Getting all objects in S3 bucket...
Serverless Error ---------------------------------------
The specified bucket does not exist
So now I can’t cleanly remove my stack.
Additional Data
Your Environment Information -----------------------------
OS: linux
Node Version: 6.10.3
Serverless Version: 1.12.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Sls remove fails when custom domain with base path mappings ...
I tried to remove a stage which had a custom domain with base path mappings used in API Gateway. It failed with error:...
Read more >Custom domain and APIG - Serverless Forums
What is the correct way to create custom API mapping? It looks like if I map the domain in AWS UI, sls remove...
Read more >Delete base path mapping in API Gateway doesn't work
I have manually updated our custom domain name to associate with a base path mapping to our lamdba function in API Gateway, but...
Read more >Serverless Framework AWS 403 Forbidden Error with Domain ...
Ok I found the answer. In the API Gateway under custom domains there is a section called Base Path Mappings This MUST be...
Read more >serverless-offline - npm
Defines service path which is used by SLS running inside Docker container. dockerNetwork. The network that the Docker container will connect to.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pmuens agree that sls should only remove what it is responsible for, but I would expect the deploy/remove to be idempotent, so even if it failed on the api gateway base mapping stuff which was removed manually by the user, the next
sls remove
invocation should continue with removing the service even though it doesn’t find the s3 bucket which is the first step that it fails on.The issue is still happening and the referred to plugin is archived so STILL very problematic.