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달 전292회 조회
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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠