func ParseRequest(event json.RawMessage) (*http.Request, error) {
	var input LambdaInput
	if err := json.Unmarshal(event, &input); err != nil {
		return nil, err
	}
	v := url.Values{}
	for key, value := range input.Params {
		v.Set(key, value)
	}
	req, err := http.NewRequest(input.Method, input.Path+"?"+v.Encode(), bytes.NewBufferString(input.Body))
	if err != nil {
		return nil, err
	}
	for key, value := range input.Headers {
		req.Header.Set(key, value)
	}
	req.Header.Set("Content-Type", "application/json")
	return req, nil
}
ParseRequest parses the Lambda event into a standard HTTP request.
package main
import (
	"bytes"
	"encoding/json"
	"net/http"
	"net/http/httptest"
	"net/url"
)
type (
	LambdaInput struct {
		Body    string            `json:"body"`
		Headers map[string]string `json:"headers"`
		Method  string            `json:"httpMethod"`
		Path    string            `json:"path"`
		Params  map[string]string `json:"queryStringParameters"`
	}
	LambdaOutput struct {
		StatusCode int               `json:"statusCode"`
		Headers    map[string]string `json:"headers"`
		Body       string            `json:"body"`
	}
)