When Webiny’s multi-tenancy feature is enabled, as part of the Website project application, Webiny deploys an additional Lambda@Edgeexternal link function, which is used for additional multi-tenancy-related routing purposes.

But note that this function is not automatically destroyed when destroying the project application. You must destroy it manually, either via the AWS Consoleexternal link, or via the AWS CLIexternal link.

This is because of an AWS limitation, which does not allow the immediate deletion of Lambda@Edge functions. Trying to immediately delete the function will result in an error, which is why Webiny does not attempt to delete it automatically.

Note that Lambda@Edge functions are always deployed into us-east-1 region. Make sure it is selected in the AWS Console, or via the AWS CLI, before proceeding with the deletion.

Check the Deleting Lambda@Edge functions and replicasexternal link article for more information on how to delete Lambda@Edge functions.