Delete the Amazon EBS snapshot using an Amazon SDK - Amazon Elastic Compute Cloud
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 the Amazon EBS snapshot using an Amazon SDK

The following code example shows how to delete an Amazon EBS snapshot.

SDK for Rust

This documentation is for an SDK in preview release. The SDK is subject to change and should not be used in production.


There's more on GitHub. Find the complete example and learn how to set up and run in the Amazon Code Examples Repository.

async fn delete_snapshot(client: &Client, id: &str) -> Result<(), Error> { client.delete_snapshot().snapshot_id(id).send().await?; println!("Deleted"); Ok(()) }
  • For API details, see DeleteSnapshot in Amazon SDK for Rust API reference.

For a complete list of Amazon SDK developer guides and code examples, see Using this service with an Amazon SDK. This topic also includes information about getting started and details about previous SDK versions.