Skip to content

Commit

Permalink
add check for default region
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Vlasic committed Jul 8, 2021
1 parent 83a8958 commit 43083e0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ func NewSDK() (*SDK, error) {
return nil, fmt.Errorf("unable to load SDK configuration - %v", err)
}

if config.Region == "" {
return nil, fmt.Errorf("default region is not specified - to specify a region either set the AWS_REGION environment variable or set the region through config file")
}

return &SDK{
config: config,
}, nil
Expand Down

0 comments on commit 43083e0

Please sign in to comment.