Skip to content

Commit

Permalink
fixed bug in env-vars where sagaemaker model exists but primarycontai…
Browse files Browse the repository at this point in the history
…ner does not
  • Loading branch information
sethsec-bf committed Mar 27, 2023
1 parent 3652866 commit 8ef71a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aws/env-vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,10 @@ func (m *EnvsModule) getSagemakerEnvironmentVariablesPerRegion(r string, wg *syn
m.CommandCounter.Error++
break
}
if err == nil {

// find the number of environment variables in the model in a pointer safe way

if DescribeModel.PrimaryContainer != nil {

if len(DescribeModel.PrimaryContainer.Environment) > 0 {
name := fmt.Sprintf("[Model] %s", aws.ToString(DescribeModel.ModelName))
Expand Down

0 comments on commit 8ef71a6

Please sign in to comment.