amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
941 stars 232 forks source link

Serverless Domain Manager: Plugin configuration is missing. #595

Closed tyoc213 closed 9 months ago

tyoc213 commented 1 year ago

Community Note

Bug Report

Error Description A clear and concise description of the behavior.

Command Run

✗ sls deploy --stage staging --verbose

Console Output

Running "serverless" from node_modules

Deploying test-lambda to stage staging (us-east-1)

Packaging
Generated requirements from /Users/lambdas/testlambda/requirements.txt in /Users/lambdas/testlambda/.serverless/requirements.txt
Using static cache of requirements found at /Users/lambdas/Library/Caches/serverless-python-requirements/a835951ae9bbd47f0b7304dbe44f576b42ac21b29a81f41d665c5f707b8a2200_arm64_slspyc
Excluding development dependencies for service package
Packaging Python Requirements Lambda Layer
Found cached Python Requirements Lambda Layer file
Layer pythonRequirements is already uploaded.

✖ Stack test-lambda failed to deploy (1s)
Environment: darwin, node 20.7.0, framework 3.35.2 (local) 3.34.0v (global), plugin 7.0.3, SDK 4.4.0
Credentials: Local, "lambdaaws" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: Serverless Domain Manager: Plugin configuration is missing.
    at ServerlessCustomDomain.validateConfigExists (/Users/lambdas/testlambda/node_modules/serverless-domain-manager/dist/src/index.js:103:19)
    at ServerlessCustomDomain.<anonymous> (/Users/lambdas/testlambda/node_modules/serverless-domain-manager/dist/src/index.js:67:18)
    at Generator.next (<anonymous>)
    at /Users/lambdas/testlambda/node_modules/serverless-domain-manager/dist/src/index.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/lambdas/testlambda/node_modules/serverless-domain-manager/dist/src/index.js:4:12)
    at ServerlessCustomDomain.hookWrapper (/Users/lambdas/testlambda/node_modules/serverless-domain-manager/dist/src/index.js:65:16)
    at PluginManager.runHooks (/Users/lambdas/testlambda/node_modules/serverless/lib/classes/plugin-manager.js:530:15)
    at async PluginManager.invoke (/Users/lambdas/testlambda/node_modules/serverless/lib/classes/plugin-manager.js:563:9)
    at async PluginManager.run (/Users/lambdas/testlambda/node_modules/serverless/lib/classes/plugin-manager.js:604:7)
    at async Serverless.run (/Users/lambdas/testlambda/node_modules/serverless/lib/serverless.js:179:5)
    at async /Users/lambdas/testlambda/node_modules/serverless/scripts/serverless.js:819:9

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

service: test-lambda

plugins:
  - serverless-python-requirements
  - serverless-domain-manager

provider:
  name: aws
  runtime: python3.9
  region: us-east-1
  architecture: arm64
  memorySize: 128

package:
  patterns:
    - "!requirements.txt"
    - "!node_modules"
    - "!package-lock.json"
    - "!package.json"

custom:
  pythonRequirements:
    slim: true
    layer: true
    dockerizePip: true
    dockerRunCmdExtraArgs: ["--platform", "linux/arm64/v8"]
    dockerImage: public.ecr.aws/sam/build-python3.9:latest-arm64
  customDomain:
    domainName: domain.com
    stage: ${sls:stage}

functions:
  test:
    handler: handler.test
    description: Test
    timeout: 10
    layers:
      - Ref: PythonRequirementsLambdaLayer
    events:
      - httpApi:
          path: "/{id}"
          method: GET

Versions

 sls -v
Running "serverless" from node_modules
Framework Core: 3.35.2 (local) 3.34.0 (global)
Plugin: 7.0.3
SDK: 4.4.0

I think I can just use custom and domain name as input as all the rest have default values which Im ok with, also to test the domain with the lambda is OK.

rddimon commented 1 year ago

Hi @tyoc213

Could you please use the latest version of the plugin and let us know? Make sure you have set your serverless.yml file properly.

Also, please check the indentation format. It might be an issue with spaces or tabbing

rddimon commented 9 months ago

Hi @tyoc213

Hope you have solved your issue as there have been no updates for a long time. Closing this issue.