From fc7f6349eb1e90465f702c71192ba6a3e17be7ed Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 18 Aug 2020 12:35:02 -0500 Subject: [PATCH] awsupload: Add description to snapshots Make it easier to tell which snapshot goes with each AMI by labeling them with a description. Signed-off-by: Major Hayden --- internal/upload/awsupload/awsupload.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/upload/awsupload/awsupload.go b/internal/upload/awsupload/awsupload.go index 7782855a2..cd737d897 100644 --- a/internal/upload/awsupload/awsupload.go +++ b/internal/upload/awsupload/awsupload.go @@ -1,6 +1,7 @@ package awsupload import ( + "fmt" "log" "os" "time" @@ -115,8 +116,10 @@ func WaitUntilImportSnapshotTaskCompletedWithContext(c *ec2.EC2, ctx aws.Context func (a *AWS) Register(name, bucket, key string) (*string, error) { log.Printf("[AWS] 📥 Importing snapshot from image: %s/%s", bucket, key) + snapshotDescription := fmt.Sprintf("Image Builder AWS Import of %s", name) importTaskOutput, err := a.importer.ImportSnapshot( &ec2.ImportSnapshotInput{ + Description: aws.String(snapshotDescription), DiskContainer: &ec2.SnapshotDiskContainer{ UserBucket: &ec2.UserBucket{ S3Bucket: aws.String(bucket),