Delete a log delivery for REST API execution logs
When you delete a log delivery, API Gateway resumes writing execution logs to the
auto-managed log group
(API-Gateway-Execution-Logs_{rest-api-id}/{stage_name}), as long as
execution logging is still enabled on the stage.
Delete a log delivery (Amazon CLI)
To delete a delivery, you delete the delivery and then optionally delete the delivery source and destination.
-
Delete the delivery
aws logs delete-delivery --id{delivery-id} -
(Optional) Delete the delivery source
aws logs delete-delivery-source --namemy-apigw-source -
(Optional) Delete the delivery destination
aws logs delete-delivery-destination --namemy-log-destination
Deleting the delivery source or destination is optional. You can reuse them to create new deliveries later.
Delete a log delivery (API Gateway console)
Sign in to the API Gateway console at https://console.amazonaws.cn/apigateway
. -
Choose your REST API, and then choose Stages.
-
Choose a stage.
-
In the Logs and tracing section, under Log delivery destinations, select the destination you want to remove.
-
Choose Delete.
Maintain log continuity
To keep logs in the same log group and maintain existing retention settings
and subscription filters, set the auto-managed log group
(API-Gateway-Execution-Logs_{rest-api-id}/{stage_name}) as a
delivery destination. Log stream names will differ from those created by
standard logging.