Nicolas Avansi
Nicolas Avansi

Reputation: 1

Zappa Update Removes API Gateway Triggers from Lambda Function

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:

What I tried:

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

Upvotes: 0

Views: 18

Answers (0)

Related Questions