This example will detail creating an uppercase endpoint which will be accessed as my-deployment.url/api/uppercase. This endpoint will convert the provided querystring to uppercase using only Bash functions and standard Unix CLI tools.

You can use the http_response_redirect function to set the location and status code. The default status code is 302 temporary redirect but you could use a permanent redirect by setting the second argument to 301.

Bash, by itself, is not very useful for writing Lambda handler logic because it
does not have a standard library. For this reason, import
is installed and configured by default, which allows your script to easily include
additional functionality and helper logic.

For example, the querystring import may be
used to parse input parameters from the request URL: