在AWS中删除对象后无服务器部署的问题

时间:2019-12-23 17:08:46

标签: amazon-web-services serverless-framework serverless

我有一个无服务器项目,该项目已成功部署到具有多个Lambda函数的AWS和带有API Gateway事件的Step Function状态机。我在AWS中手动删除了Step Function,现在执行sls deploy并没有部署Step Function。

如何使事情恢复同步?

谢谢!

1 个答案:

答案 0 :(得分:2)

我遇到了无服务器问题。该问题是由无服务器如何处理,跟踪和部署您的功能和资源引起的。删除步进功能/状态机后,您可以有效地手动更改应用程序的状态,并且基本上不同步。

要解决此问题,请在serverless.yaml文件中,注释掉您手动删除的整个步进功能/状态机,然后运行awk ' ##Starting awk program from here. BEGIN{ ##Starting BEGIN section from here. FS=OFS="," ##Setting comma for FS and OFS here for all lines of Input_file. } { print $2,$1 ##Printing each line 2nd field and 1st field. } ' Input_file ##Mentioning Input_file name here. 。取消注释步骤功能/状态机后,再次sls deploy。这次它应该再次部署您的步进功能/状态机。