diff --git a/pkg/project/provider/aws.go b/pkg/project/provider/aws.go index 1ee95fc941..fdd9a9c185 100644 --- a/pkg/project/provider/aws.go +++ b/pkg/project/provider/aws.go @@ -63,8 +63,8 @@ func (a *AwsProvider) Env() (map[string]string, error) { func (a *AwsProvider) Init(app string, stage string, args map[string]interface{}) error { ctx := context.Background() - if os.Getenv("SST_AWS_NO_PROFILE") != "" { - delete(args, "profile") + if value := os.Getenv("AWS_PROFILE"); value != "" { + a.profile = value } if val, ok := args["profile"]; ok && val != "" { delete(args, "profile") @@ -73,9 +73,6 @@ func (a *AwsProvider) Init(app string, stage string, args map[string]interface{} // so we wipe it from args and put it in env which is not saved to the state a.profile = val.(string) } - if value := os.Getenv("AWS_PROFILE"); value != "" { - a.profile = value - } cfg, err := config.LoadDefaultConfig( ctx,