Prepare a Function
The first step to create your own Serverless Function is coding it. Currently, you can do this using Python or Go by choosing the appropriate language template.
Each template gives you a basic structure to find a single Function within which all the tasks must run. This is your main Function, and everything starts and ends with it. You can (and probably should) use auxiliary Functions to refactor your code, but make sure the main Function is there. Please don't rename it or change its definition.
- Path
- Method (POST, GET, PUT, PATCH, or DELETE)
- Headers
- Query Parameters
- Body
This information is the data you can provide to your Function.
- Set a status code
- Use the response body
- Add headers to the response
- Go template documentation
- Python template documentation