您知道为什么此无服务器框架部署失败吗?它使用 bitbucket 管道,其中有一个部署到 AWS 的步骤。
但在实际部署中,访问 serverless.yml 文件中的
service
属性似乎遇到了问题?
Environment
linux, node 12.22.12, framework 3.28.1, plugin 6.2.3, SDK 4.3.2
Script Step
- step:
trigger: manual
name: Dev Deployment
deployment: dev
caches:
- node
script:
- sls deploy --stage dev --client myclient --domain thewebsite.com --account-map '{"account":"1"}' --cert-arn 'arn:aws:acm:us-east-1:[ID]:certificate/[UUID]'
Serverless.yml
service: ${self:provider.client}-reactions
stackName: ${self:provider.client}-reactions
description: "The system"
plugins:
- serverless-domain-manager
provider:
name: aws
runtime: nodejs12.x
client: ${opt:client}
stage: ${opt:stage}
domain: ${opt:domain}
cert-arn: ${opt:cert-arn}
account-map: ${opt:account-map}
region: ${opt:region,'us-east-1'}
logRetentionInDays: 14 # Set the default RetentionInDays for a CloudWatch LogGroup
deploymentBucket: ${opt:bucket,'serverless.com'}
错误
Cannot resolve serverless.yml: "service" property is not accessible (configured behind variables which cannot be resolved at this stage)