func (c *Client) CreateAPIGateway(name string, tags map[string]string) (string, error) {
	createAPIResponse, err := c.APIGatewayV2().CreateApi(&apigatewayv2.CreateApiInput{
		Name:         aws.String(name),
		ProtocolType: aws.String(apigatewayv2.ProtocolTypeHttp),
		Tags:         aws.StringMap(tags),
	})
	if err != nil {
		return "", errors.Wrap(err, "failed to create api gateway")
	}
	if createAPIResponse.ApiId == nil {
		return "", errors.ErrorUnexpected("failed to create api gateway")
	}
	_, err = c.APIGatewayV2().CreateStage(&apigatewayv2.CreateStageInput{
		ApiId:      createAPIResponse.ApiId,
		AutoDeploy: aws.Bool(true),
		StageName:  aws.String("$default"),
		Tags:       aws.StringMap(tags),
	})
	if err != nil {
		c.DeleteAPIGateway(*createAPIResponse.ApiId)  
		return "", errors.Wrap(err, "failed to create $default api gateway stage")
	}
	return *createAPIResponse.ApiId, nil
}
CreateAPIGateway Creates a new API Gateway with the default stage
package aws
import (
	"fmt"
	"strings"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/apigatewayv2"
	"github.com/cortexlabs/cortex/pkg/lib/errors"
)