ConflictException:无服务器 AWS 中此域名的基本路径已存在
ConflictException: Base path already exists for this domain name in Serverless AWS
我已经使用 AWS lambda 和 NodeJS 环境构建了应用程序。对于部署目的,我使用的是无服务器框架。现在,当我尝试使用带有 Nodejs 模板的无服务器框架将我的服务部署到 AWS 时。它已部署到服务器,但未将自定义域名映射到我的服务。在此之前,我将其映射,并自动将其与我的域名进行映射。现在,当我尝试重新部署服务时,它抛出了无法映射客户域的错误。我附上了下面的错误日志。你可以检查一下。你能帮我解决这个问题吗?
下面是我的命令的输出 sls deploy -s local
。
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: DOTENV: Loading environment variables from .env.local, .env.local:
Serverless: - STAGE
Serverless: - SLA_DROPOFF_AFTER_MINS
Serverless: - AWS_ACCOUNT_CRED
Serverless: - AWS_ACCESS_KEY_ID_CRED
Serverless: - AWS_SECRET_ACCESS_KEY_CRED
Serverless: - AWS_REGION_CRED
Serverless: - LOGLEVEL
Serverless: - LYFT_REFRESH_TOKEN
Serverless: - LYFT_ACCESS_TOKEN
Serverless: - LYFT_CLIENT_ID
Serverless: - LYFT_CLIENT_SECRET
Serverless: - LYFT_WEBHOOK_VERIFICATION_KEY
Serverless: - SMS_APPLICATION_ID
Serverless: - SMS_REGISTERED_KEY_WORD
Serverless: - CLIENT_APP_URL
Serverless: - SECRET_NAME_FOR_LYFT_REFRESH_TOKEN
Serverless: - SECRET_NAME_FOR_LYFT_ACCESS_TOKEN
Serverless: - SLS_DEBUG
Serverless: - LYFT_ACCESS_TOKEN_ROTATION
Serverless: - AWS_XRAY_CONTEXT_MISSING
Serverless: - AWS_X_AMZN_TRACE_ID
Serverless: - PHARMACY_LOGO_URL
Serverless: Load command create_domain
Serverless: Load command delete_domain
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
- ServerlessOffline for "apiKey", "corsAllowHeaders", "corsAllowOrigin", "corsDisallowCredentials", "corsExposedHeaders", "disableCookieValidation", "enforceSecureCookies",
"hideStackTraces", "host", "httpPort", "httpsProtocol", "lambdaPort", "noPrependStageInUrl", "noAuth", "ignoreJWTSignature", "noTimeout", "prefix", "printOutput", "resourceRoutes", "useChildProcesses", "useWorkerThreads", "websocketPort", "webSocketHardTimeout", "webSocketIdleTimeout", "useDocker", "layersDir", "dockerReadOnly", "functionCleanupIdleTimeSeconds", "allowCache", "dockerHost", "dockerHostServicePath", "dockerNetwork"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
Serverless: Skipping variables resolution with old resolver (new resolver reported no more variables to resolve)
Serverless: Deprecation warning: Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service rxd-administration.zip file to S3 (127.62 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..........................
Serverless: Stack update finished...
Serverless: Invoke aws:info
Service Information
service: rxd-administration
stage: local
region: us-east-1
stack: rxd-administration-local
resources: 61
api keys:
None
endpoints:
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
GET - https://[default url for service]
functions:
registerTenant: [function names]
authenticateUser: [function names]
authorizeUser: [function names]
renewTokens: [function names]
changePassword: [function names]
requestForgotPassword: [function names]
confirmForgotPassword: [function names]
forceResetUserPassword: [function names]
testAuth: rxd-administration-local-testAuth
layers:
None
Serverless Domain Manager: Info: Found apiId: jefueg03sa for local-api.carierx.app
Serverless Domain Manager: Error: local-api.carierx.app: ConflictException: Base path already exists for this domain name
Serverless Domain Manager: Error: local-api.carierx.app: Error: local-api.carierx.app: Unable to create basepath mapping.
Error ---------------------------------------------------
Error: Unable to setup base domain mappings for local-api.carierx.app
at ServerlessCustomDomain.<anonymous> (C:\Users\arsla\Documents\iTitans\Projects\rx-delivery\node_modules\serverless-domain-manager\dist\src\index.js:270:27)
at Generator.throw (<anonymous>)
at rejected (C:\Users\arsla\Documents\iTitans\Projects\rx-delivery\node_modules\serverless-domain-manager\dist\src\index.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.19.0
Framework Version: 2.35.0 (local)
Plugin Version: 4.6.0
SDK Version: 4.2.2
Components Version: 3.9.2
当您的自定义域名有一个映射到手动创建的 API 的基本路径时(例如不是 serverless deploy
运行),就会发生这种情况。删除有问题的 API 映射,一切都应该适合你。
我已经使用 AWS lambda 和 NodeJS 环境构建了应用程序。对于部署目的,我使用的是无服务器框架。现在,当我尝试使用带有 Nodejs 模板的无服务器框架将我的服务部署到 AWS 时。它已部署到服务器,但未将自定义域名映射到我的服务。在此之前,我将其映射,并自动将其与我的域名进行映射。现在,当我尝试重新部署服务时,它抛出了无法映射客户域的错误。我附上了下面的错误日志。你可以检查一下。你能帮我解决这个问题吗?
下面是我的命令的输出 sls deploy -s local
。
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: DOTENV: Loading environment variables from .env.local, .env.local:
Serverless: - STAGE
Serverless: - SLA_DROPOFF_AFTER_MINS
Serverless: - AWS_ACCOUNT_CRED
Serverless: - AWS_ACCESS_KEY_ID_CRED
Serverless: - AWS_SECRET_ACCESS_KEY_CRED
Serverless: - AWS_REGION_CRED
Serverless: - LOGLEVEL
Serverless: - LYFT_REFRESH_TOKEN
Serverless: - LYFT_ACCESS_TOKEN
Serverless: - LYFT_CLIENT_ID
Serverless: - LYFT_CLIENT_SECRET
Serverless: - LYFT_WEBHOOK_VERIFICATION_KEY
Serverless: - SMS_APPLICATION_ID
Serverless: - SMS_REGISTERED_KEY_WORD
Serverless: - CLIENT_APP_URL
Serverless: - SECRET_NAME_FOR_LYFT_REFRESH_TOKEN
Serverless: - SECRET_NAME_FOR_LYFT_ACCESS_TOKEN
Serverless: - SLS_DEBUG
Serverless: - LYFT_ACCESS_TOKEN_ROTATION
Serverless: - AWS_XRAY_CONTEXT_MISSING
Serverless: - AWS_X_AMZN_TRACE_ID
Serverless: - PHARMACY_LOGO_URL
Serverless: Load command create_domain
Serverless: Load command delete_domain
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
- ServerlessOffline for "apiKey", "corsAllowHeaders", "corsAllowOrigin", "corsDisallowCredentials", "corsExposedHeaders", "disableCookieValidation", "enforceSecureCookies",
"hideStackTraces", "host", "httpPort", "httpsProtocol", "lambdaPort", "noPrependStageInUrl", "noAuth", "ignoreJWTSignature", "noTimeout", "prefix", "printOutput", "resourceRoutes", "useChildProcesses", "useWorkerThreads", "websocketPort", "webSocketHardTimeout", "webSocketIdleTimeout", "useDocker", "layersDir", "dockerReadOnly", "functionCleanupIdleTimeSeconds", "allowCache", "dockerHost", "dockerHostServicePath", "dockerNetwork"
Please report this issue in plugin issue tracker.
Starting with next major release, this will be communicated with a thrown error.
More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
Serverless: Skipping variables resolution with old resolver (new resolver reported no more variables to resolve)
Serverless: Deprecation warning: Support for "package.include" and "package.exclude" will be removed with next major release. Please use "package.patterns" instead
More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_PACKAGE_PATTERNS
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service rxd-administration.zip file to S3 (127.62 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..........................
Serverless: Stack update finished...
Serverless: Invoke aws:info
Service Information
service: rxd-administration
stage: local
region: us-east-1
stack: rxd-administration-local
resources: 61
api keys:
None
endpoints:
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
POST - https://[default url for service]
GET - https://[default url for service]
functions:
registerTenant: [function names]
authenticateUser: [function names]
authorizeUser: [function names]
renewTokens: [function names]
changePassword: [function names]
requestForgotPassword: [function names]
confirmForgotPassword: [function names]
forceResetUserPassword: [function names]
testAuth: rxd-administration-local-testAuth
layers:
None
Serverless Domain Manager: Info: Found apiId: jefueg03sa for local-api.carierx.app
Serverless Domain Manager: Error: local-api.carierx.app: ConflictException: Base path already exists for this domain name
Serverless Domain Manager: Error: local-api.carierx.app: Error: local-api.carierx.app: Unable to create basepath mapping.
Error ---------------------------------------------------
Error: Unable to setup base domain mappings for local-api.carierx.app
at ServerlessCustomDomain.<anonymous> (C:\Users\arsla\Documents\iTitans\Projects\rx-delivery\node_modules\serverless-domain-manager\dist\src\index.js:270:27)
at Generator.throw (<anonymous>)
at rejected (C:\Users\arsla\Documents\iTitans\Projects\rx-delivery\node_modules\serverless-domain-manager\dist\src\index.js:6:65)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.19.0
Framework Version: 2.35.0 (local)
Plugin Version: 4.6.0
SDK Version: 4.2.2
Components Version: 3.9.2
当您的自定义域名有一个映射到手动创建的 API 的基本路径时(例如不是 serverless deploy
运行),就会发生这种情况。删除有问题的 API 映射,一切都应该适合你。