Skip to content

Commit a45279f

Browse files
refactor: check if region value is empty
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent d2e5db7 commit a45279f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyRespo
8989
}
9090

9191
region := os.Getenv("AWS_DEFAULT_REGION")
92+
if region == "" {
93+
region = os.Getenv("AWS_REGION")
94+
}
9295

9396
instanceType := types.InstanceTypeC7aLarge
9497
instanceTypes := instanceType.Values()

0 commit comments

Comments
 (0)