View a markdown version of this page

Delete a log delivery for REST API execution logs - Amazon API Gateway
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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.

  1. Delete the delivery
    aws logs delete-delivery --id {delivery-id}
  2. (Optional) Delete the delivery source
    aws logs delete-delivery-source --name my-apigw-source
  3. (Optional) Delete the delivery destination
    aws logs delete-delivery-destination --name my-log-destination
Note

Deleting the delivery source or destination is optional. You can reuse them to create new deliveries later.

Delete a log delivery (API Gateway console)

  1. Sign in to the API Gateway console at https://console.amazonaws.cn/apigateway.

  2. Choose your REST API, and then choose Stages.

  3. Choose a stage.

  4. In the Logs and tracing section, under Log delivery destinations, select the destination you want to remove.

  5. Choose Delete.

Maintain log continuity

Tip

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.