Using sam local start-api is great but
- it's slow handling requests
 
- it would be nice to have the option of running code stand alone outside Lambda
 
I'd like to have a toggle to fall back to net/http only:
ApexGatewayDisabled := os.Getenv("APEX_GATEWAY_DISABLED")
if ApexGatewayDisabled == "true" {
	log.Fatal(http.ListenAndServe(":3000", nil))
} else {
	log.Fatal(gateway.ListenAndServe(":3000", nil))
}
 
Everywhere AWS specific functionality is used above condition must also be checked.
Does this approach make sense or is there a better way?