diff --git a/pkg/util/aws/image.go b/pkg/util/aws/image.go index 5b23970c36..c2a025f27c 100644 --- a/pkg/util/aws/image.go +++ b/pkg/util/aws/image.go @@ -204,17 +204,12 @@ func (self *SRegion) GetImages(status ImageStatusType, owner ImageOwnerType, ima if len(owner) > 0 { own := string(owner) - if own == "self" { - filters = AppendSingleValueFilter(filters, "owner-id", own) - } else { - params.SetOwners([]*string{&own}) - } + params.SetOwners([]*string{&own}) } if len(imageId) > 0 { params.SetImageIds(ConvertedList(imageId)) } - ret, err := self.ec2Client.DescribeImages(params) if err != nil { return nil, 0, err diff --git a/pkg/util/aws/shell/image.go b/pkg/util/aws/shell/image.go index d053002fde..8babcc0f2c 100644 --- a/pkg/util/aws/shell/image.go +++ b/pkg/util/aws/shell/image.go @@ -8,7 +8,7 @@ import ( func init() { type ImageListOptions struct { Status string `help:"image status type" choices:"Creating|Available|UnAvailable|CreateFailed"` - Owner string `help:"Owner type" choices:"system|self|others|marketplace"` + Owner string `help:"Owner type" choices:"amazon|self|microsoft|aws-marketplace"` Id []string `help:"Image ID"` Name string `help:"image name"` Limit int `help:"page size"`