question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sls remove fails when custom domain with base path mappings used in APIG

See original GitHub issue

This 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
lirantalcommented, Jan 12, 2018

@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.

0reactions
ldngcommented, Oct 12, 2022

The issue is still happening and the referred to plugin is archived so STILL very problematic.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found