Orchestrator Function: AWS EC2 Snapshot Delete

by Simon Sparks · 7 February 2026

To use this function add it to the class library file named OrchestratorPluginAWSService.ts

GitHub Repository: https://github.com/SimonSparksUK/Orchestrator

Filename: OrchestratorPluginAWSService.ts

Description: Orchestrator Function to Delete an AWS EC2 Snapshot

Public Function: EC2SnapshotDelete

publicEC2SnapshotDelete(objAWSClient:AWSClient,strSnapshotId:string):string{

letobjAmazonEC2Client:AmazonEC2Client=objAWSClient.getAmazonEC2Client();

letobjEC2DeleteSnapshotRequest:EC2DeleteSnapshotRequest=newEC2DeleteSnapshotRequest();
objEC2DeleteSnapshotRequest.setSnapshotId(strSnapshotId);

letobjEC2DeleteSnapshotResult:EC2DeleteSnapshotResult=objAmazonEC2Client.deleteSnapshot(objEC2DeleteSnapshotRequest);

letstrEC2DeleteSnapshotResult:string=objEC2DeleteSnapshotResult.toString();

returnstrEC2DeleteSnapshotResult;
}

Discover more from Cloud Build Tools

Subscribe to get the latest posts sent to your email.

You may also like