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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to configure ID for a Route 53 health check #504

Open
epigos opened this issue Jun 16, 2022 · 1 comment
Open

Error: Unable to configure ID for a Route 53 health check #504

epigos opened this issue Jun 16, 2022 · 1 comment
Labels

Comments

@epigos
Copy link

epigos commented Jun 16, 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
Error: Unable to configure ID for a Route 53 health check.

The configuration below successfully creates the health check RecordSet in AWS but serverless-domain-manager is unable to reference the ID when healthCheckId is supplied with the resource. It seems to only work when you hard-code the ID of the health check record.

Command Run
e.g. sls deploy

Console Output

Environment: linux, node 16.15.1, framework 3.19.0 (local) 3.19.0v (global), plugin 6.2.2, SDK 4.3.2
Credentials: Local, environment variables
Error:
Docs:        docs.serverless.com
Error: Unable to create domain '<domain name>':
Failed to UPSERT A Alias for '<domain name>':
Support:     forum.serverless.com

[Invalid Health Check ID., Invalid Health Check ID.]

Bugs:        github.com/serverless/serverless/issues
    at ServerlessCustomDomain.<anonymous> (/home/runner/work/<repo name>/<repo name>/node_modules/serverless-domain-manager/dist/src/index.js:193:23)
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/<repo name>/<repo name>/node_modules/serverless-domain-manager/dist/src/index.js:6:65)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Domain Manager Configuration
Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue.

resources:
  Resources:
    myHealthCheck:
      Type: 'AWS::Route53::HealthCheck'
      Properties:
        HealthCheckConfig:
          Port: 443
          Type: HTTPS
          ResourcePath: /healthz
          FullyQualifiedDomainName: example.com
          RequestInterval: 30
          FailureThreshold: 3

custom:
  customDomain:
    domainName: example.com
    basePath: bar
    createRoute53Record: true
    route53Params:
      routingPolicy: latency
      healthCheckId: myHealthCheck  # reference myHealthCheck in resources

Versions

  • Domain Manager version(s): 6.0.3
  • Node/npm version: Node v16.15.1/npm 8.11.0
  • Serverless Version: v3.19.0, 3.19.0v
  • Lambda Code: GO

Possible Solution

Enable domain manager reference created resources in the customDomain config.

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

@epigos epigos added the bug label Jun 16, 2022
@sehrish30
Copy link

Create a custom variable

healthCheckId:
name: !Ref Route53HealthCheck

and then use it
${self:custom.healthCheckId.name}

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

No branches or pull requests

2 participants