admin管理员组

文章数量:1123857

I'm encountering an issue with Zappa when running the zappa update command. It removes the API Gateway triggers from my Lambda function, leaving only the EventBridge trigger.

The API Gateway endpoints still point to the Lambda function and attempt to invoke it, but since the permissions are removed, API Gateway returns the {"message": "Internal server error"} (faced as an API configuration error).

I can temporarily fix this by manually re-saving and re-configuring the triggers in the AWS Console, but this is not ideal as it happens every time I update with Zappa.

Steps I take:

  1. Run zappa update.
  2. Check the Lambda function: the API Gateway trigger is missing.
  3. API Gateway endpoints attempt to call the Lambda function but fail due to the removed permissions.

My environment:

  • Zappa version: 0.56.1
  • AWS Lambda and API Gateway
  • Python version: 3.9

What I tried:

  • Manually re-configuring the triggers in the AWS Console (works temporarily).
  • Ensuring my Zappa settings are correct.

What I need:

Is there a way to prevent Zappa from removing the API Gateway triggers during the zappa update process? Any solutions would be greatly appreciated.

Update: Just checked, the problem is that every time zappa update is called, it assign the policies to the lambda function again, removing old ones and adding a new

本文标签: Zappa Update Removes API Gateway Triggers from Lambda FunctionStack Overflow