Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find an in-date certificate #509

Closed
kaykhan opened this issue Jul 15, 2022 · 11 comments · Fixed by #616
Closed

Could not find an in-date certificate #509

kaykhan opened this issue Jul 15, 2022 · 11 comments · Fixed by #616
Labels

Comments

@kaykhan
Copy link

kaykhan commented Jul 15, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Bug Report

Error Description

serverless domain manager fails to create sub domain even though certificate exists.

image

Command Run
sls create_domain

Console Output

Environment: linux, node 16.13.0, framework 3.21.0 (local) 3.19.0v (global), plugin 6.2.2, SDK 4.3.2
Credentials: Local, "default" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: Unable to create domain 'image-service.staging.geeiq.com':
Could not find an in-date certificate for '*.staging.geeiq.com'.
    at ServerlessCustomDomain.<anonymous> (/home/kay/checkpoint/image-service/node_modules/serverless-domain-manager/dist/src/index.js:193:23)
    at Generator.throw (<anonymous>)
    at rejected (/home/kay/checkpoint/image-service/node_modules/serverless-domain-manager/dist/src/index.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Domain Manager Configuration

      customDomain: {
            domainName: "image-service.staging.geeiq.com",
            basePath: "/",
            certificateName: "*.staging.geeiq.com",
            stage: "${opt:stage}",
            createRoute53Record: true,
        },

Versions

  • Domain Manager version(s): ^6.0.3
  • Node/npm version: 16.13/8.1.3
  • Serverless Version: 3.21
  • Lambda Code: typescript

Possible Solution

Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.

@kaykhan kaykhan added the bug label Jul 15, 2022
@rddimon
Copy link
Collaborator

rddimon commented Aug 10, 2022

Hi @kaykhan

Thank you for your issue!

It could be related to the #510
Place try our latest version of the plugin (6.1.0) It should be fixed
And please let us know the result

@TylerSustare
Copy link

Hey, @rddimon This issue is still happening for me and my version is 6.2.1

@TylerSustare
Copy link

It's a magical mystery (∩`-´)⊃━☆゚.*・。゚

The command sls create_domain is now working to create a domain, without me changing anything except waiting 24 hours.

@Anderson-SG
Copy link

I'm having the same problem here, the plugin doesn't seem to be able to detect newly created certificates, I have to wait hours for it to be able to identify.

@vanerac
Copy link

vanerac commented Mar 24, 2023

Hi @rddimon, any updates on this issue ?

@Zeryther
Copy link

My certificates are over 24 hours old and the plugin won't find them.

@directrx-technology
Copy link

This is also proving to be an issue for me on an M2 mac.

@matt-ward
Copy link

I also have this problem on v7.3.3, on a hunch I decided to try out a random version in 6, so I downgraded to v6.4.4 and the issue went away.

@rddimon
Copy link
Collaborator

rddimon commented Feb 13, 2024

Hi there

What is the endpointType for your configs?

The plugin has the EDGE type by default. API Gateway uses CloudFront for the EDGE and that mean that the certificate should exist in the us-east-1.

There are 2 options for solving it:

  1. Switch endpointType to REGIONAL
  2. Create the needed ACM certificate in the us-east-1.

More info

  1. https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-edge-optimized-custom-domain-name.html
Note
To use an ACM certificate with an API Gateway edge-optimized custom domain name, you must request or import the certificate in the us-east-1 Region (US East (N. Virginia)).
  1. https://docs.aws.amazon.com/acm/latest/userguide/troubleshoot-apigateway.html

@yehonadav
Copy link

the issue im seeing is that the certificate is not being created, mb im wrong but i remember your sls domain manager creates it for you. i had to manually create a certificate

@rddimon
Copy link
Collaborator

rddimon commented Jul 4, 2024

There is no support for creating an ACM record in the Serverless Domain Manager. It should be done manually or by using Infrastructure as Code tools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
9 participants