amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross-account certificate references are not allowed

nonoodles opened this issue · comments

commented

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
create_domain throws error Cross-account certificate references are not allowed.

Command Run
sls create_domain

Console Output

λ sls create_domain --verbose
Running "serverless" from node_modules
Warning: V1 - 'api.foo.com' does not exist.
Environment: win32, node 16.17.1, framework 3.29.0 (local) 3.29.0v (global), plugin 6.2.3, SDK 4.3.2
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: Unable to create domain 'api.foo.com':
V1 - Failed to create custom domain 'api.foo.com':
Invalid certificate ARN: arn:aws:acm:af-south-1:****. Cross-account certificate references are not allowed.
    at ServerlessCustomDomain.<anonymous> (**\node_modules\serverless-domain-manager\dist\src\index.js:228:23)
    at Generator.throw (<anonymous>)
    at rejected (**\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: api.foo.com
    certificateArn: "arn:aws:acm:af-south-1:****"
    basePath: ''
    stage: dev
    createRoute53Record: true
    endpointType: 'regional'
    securityPolicy: tls_1_2
    apiType: rest

Versions

  • Domain Manager version(s): [v7.0.2]
  • Node/npm version: [Node 16]
  • Serverless Version: [v3.29.0]
  • Lambda Code [GO]

Possible Solution
Downgrade to 6.4.4 and domain created successfully.

Hi @nonoodles

Could you please try our latest version and let us know the result?

commented

Thank you @rddimon - Confirmed working as expected on 7.0.4.

Hi @rddimon,
I just ran into the same issue with 7.0.4, downgrading to 6.4.4 worked fine