Skip to content

Commit

Permalink
Merge pull request #9 from NVIDIA/sshUser
Browse files Browse the repository at this point in the history
Enable AWS ENV VAR key auth
  • Loading branch information
ArangoGutierrez authored Feb 14, 2024
2 parents 227eeed + 8d9ac35 commit a7bd07b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/provider/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ type Client struct {

func New(log *logger.FunLogger, env v1alpha1.Environment, cacheFile string) (*Client, error) {
// Create an AWS session and configure the EC2 client
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion(env.Spec.Region))
region := env.Spec.Region
if envRegion := os.Getenv("AWS_REGION"); envRegion != "" {
region = envRegion
}
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithRegion(region))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a7bd07b

Please sign in to comment.