amplify lambda environment variables issue, added, removed and now push doesn't work

0

I

  • added an env variable with amplify function update.
  • then removed it with the same command
  • the functions folder is practically the same as in in the #current-cloud-backend

and yet I am getting error that there is no [env] in template

🛑 Resource is not in the state stackUpdateComplete
Name: function...DefineAuthChallenge (AWS::CloudFormation::Stack), Event Type: update, Reason: Parameters: [env] do not exist in the template, IsCustomResource: false

I checked and ensured that the function template does contain the corresponding Parameter.. Just in case I even tried to remove the parameter and push again - it is still stuck on this error

I guess it may be related to the latest amplify upgrade - current amplify version is 12.5.1

Arsen
質問済み 7ヶ月前294ビュー
1回答
0

Not sure what the original issue was, but here are the steps that resolved the problem for me

  • I deleted the functions with amplify update auth (the function were auto generated as Cognito triggers so auth depends and control them)
  • amplify push to successfully deploy the deletion
  • amplify update auth and select through walk-through the needed triggers
  • amplify function update to add back the environment variables - although in my case I added a resource permissions which in case automatically added env variable with the DynamoDB table names, so I no longer needed my previous environment variables
  • amplify push now successfully pushed the functions with
Arsen
回答済み 7ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ