diff --git a/lib/srv/server/ssm_install.go b/lib/srv/server/ssm_install.go index 3c23f672884a3..7d1f28a42252e 100644 --- a/lib/srv/server/ssm_install.go +++ b/lib/srv/server/ssm_install.go @@ -23,8 +23,6 @@ import ( "errors" "fmt" "log/slog" - "maps" - "slices" "strings" "github.com/aws/aws-sdk-go/aws" @@ -283,7 +281,11 @@ type instanceIDsSSMState struct { } func instanceIDsFrom(m map[string]string) []string { - return slices.Collect(maps.Keys(m)) + ret := make([]string, 0, len(m)) + for k := range m { + ret = append(ret, k) + } + return ret } // describeSSMAgentState returns the instanceIDsSSMState for all the instances.