无服务器部署失败:“服务”属性不可访问

问题描述 投票:0回答:1

您知道为什么此无服务器框架部署失败吗?它使用 bitbucket 管道,其中有一个部署到 AWS 的步骤。

但在实际部署中,访问 serverless.yml 文件中的

service
属性似乎遇到了问题?

  • AWS证书有效

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)
node.js amazon-web-services serverless bitbucket-pipelines
1个回答
0
投票

参数化组织、应用程序、服务、阶段和区域使用弃用

您需要使用纯文本定义

service

© www.soinside.com 2019 - 2024. All rights reserved.