diff --git a/builtin/credential/aws-ec2/path_login.go b/builtin/credential/aws-ec2/path_login.go index 33b7c884e..9462c27a0 100644 --- a/builtin/credential/aws-ec2/path_login.go +++ b/builtin/credential/aws-ec2/path_login.go @@ -83,8 +83,7 @@ func (b *backend) validateInstance(s logical.Storage, instanceID, region string) if status.Reservations[0].Instances[0].State == nil { return nil, fmt.Errorf("instance state in instance description is nil") } - if *status.Reservations[0].Instances[0].State.Code != 16 || - *status.Reservations[0].Instances[0].State.Name != "running" { + if *status.Reservations[0].Instances[0].State.Name != "running" { return nil, fmt.Errorf("instance is not in 'running' state") } return status, nil