我最近开始研究无服务器架构。下面是相同的serverless.xml示例。
test:
name: test
handler: handler.lambda_handler
timeout: 6
environment:
APP_ID: ${ssm:/path/to/ssm/test~true}现在,当我尝试运行无服务器离线命令时,它会报告ssm变量。以下是控制台上出现的错误。
我想在我的本地机器上运行所有的东西来进行开发。有人能帮我解决这个问题吗?
ServerlessError: Trying to populate non string value into a string for variable ${ssm:/path/to/ssm/test~true}. Please make sure the value of the property is a string.
at Variables.populateVariable (C:\Users\kumarn\AppData\Roaming\npm\node_modules\serverless\lib\classes\Variables.js:464:13)
at Variables.renderMatches (C:\Users\kumarn\AppData\Roaming\npm\node_modules\serverless\lib\classes\Variables.js:386:21)
at C:\Users\kumarn\AppData\Roaming\npm\node_modules\serverless\lib\classes\Variables.js:406:29
From previous event:发布于 2020-04-29 02:54:27
你可以通过添加插件来解决这个问题:
https://github.com/janders223/serverless-offline-ssm
如果你更喜欢冒险,你也可以使用本地堆栈https://github.com/localstack/localstack
请注意,免费版本并不支持所有内容
https://stackoverflow.com/questions/61485067
复制相似问题