gpt4 book ai didi

amazon-web-services - 无服务器框架 - 在 "self"源未找到值

转载 作者:行者123 更新时间:2023-12-05 05:47:15 27 4
gpt4 key购买 nike

我有以下 serverless.yml 文件:

org: bizrob
app: flexipod-2-queue
service: flexipod-2-queue

frameworkVersion: "^2.72.2"

custom:
region: eu-west-1

provider:
name: aws
runtime: nodejs14.x

plugins:
- serverless-prune-plugin
- serverless-offline
- serverless-webpack
- serverless-plugin-resource-tagging
- serverless-step-functions

functions:
cronHandler:
handler: flexipod-2-queue/flexipodJob.dataFeedsJob
events:
# Invoke Lambda function every 2nd minute from Mon-Fri
- schedule: cron(0/8 * ? * MON *)
environment:
REGION: ${self:custom.region}
API_VERSION_S3: "2006-03-01"
API_VERSION_SQS: "2012-11-05"
SQS_QUEUE_URL: !Ref "MyQueue"

resources:
Resources:
MyQueue:
Type: "AWS::SQS::Queue"
Properties:
QueueName: "flexipod"

当我运行无服务器部署时,出现以下错误:

Cannot resolve variable at "functions.cronHandler.environment.REGION":Value not found at "self" source

有人看到我做错了什么吗?

最佳答案

感谢@eli6 提供有关无服务器打印的提示。我不知道问题的根本原因,但在重新启动 vscode 无服务器打印和无服务器部署之后就可以了

关于amazon-web-services - 无服务器框架 - 在 "self"源未找到值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71032995/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com