gpt4 book ai didi

amazon-web-services - Cloudformation YAML : expected type String, 找到 JSONObject

转载 作者:行者123 更新时间:2023-12-03 07:20:08 26 4
gpt4 key购买 nike

我有一个 template.yml,我试图在其中定义此资源:

HelloFunction:
Type: 'AWS::Serverless::Function'
Properties:
Handler: handler.hello
Runtime: nodejs12.x
InlineCode:
ZipFile: |
exports.handler = async (event) => {
const response = {
statusCode: 200,
body: JSON.stringify('Hello from Lambda function!'),
};
return response;
};
Events:
HelloAPI:
Type: HttpApi
Properties:
ApiId: !Ref SpikeApi
Path: /hello
Method: GET

在此之前的资源创建没有问题,但这里我收到此错误:

Properties validation failed for resource HelloFunction with message: #/Code/ZipFile: expected type: String, found: JSONObject

最佳答案

关于amazon-web-services - Cloudformation YAML : expected type String, 找到 JSONObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68222371/

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