Skip to content

Commit ae76319

Browse files
committed
fixup! Migrate AWS SDK from v1 to v2
1 parent e9c472d commit ae76319

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mantle/platform/api/aws/ec2.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ func (a *API) CreateInstances(name, keyname, userdata string, count uint64, minD
189189
if err == nil {
190190
// Successfully started our instance in the requested zone. Break out of the loop
191191
break
192-
}
193-
if err != nil {
192+
} else {
194193
// Handle InsufficientInstanceCapacity error specifically
195194
var ae smithy.APIError
196195
if errors.As(err, &ae) && ae.ErrorCode() == "InsufficientInstanceCapacity" {
@@ -320,7 +319,7 @@ func (a *API) TerminateInstances(ids []string) error {
320319
return nil
321320
}
322321
input := &ec2.TerminateInstancesInput{
323-
InstanceIds: ids,
322+
InstanceIds: ids,
324323
}
325324

326325
if _, err := a.ec2.TerminateInstances(context.TODO(), input); err != nil {

0 commit comments

Comments
 (0)