可以将通过 Cloud Logic 实现 API 的 Lambda 函数添加到这样的项目中。
cloudlogic: !com.amazonaws.mobilehub.v0.CloudLogic
components:
hello: !com.amazonaws.mobilehub.v0.API
attributes:
name: hello
requires-signin: true
paths:
/hello: !com.amazonaws.mobilehub.v0.Function
name: hello
codeFilename: uploads/hello-xxx.zip
handler: lambda.handler
enableCORS: true
runtime: nodejs6.10
environment: {}
但是那些有其他触发器的函数呢?比如数据库更新、定期间隔等。如何添加这些函数以便它们集成到项目的一部分?语法是什么?当然我可以单独部署功能,但我会很高兴从同一个项目文件中部署所有内容。