Export the resources defined in extensions_api_client.go
- Dominant language
- Go
- Stars
- 3.8k
- Forks
- 578
- Avg merge
- 8h 18m
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
In order for a Lambda Extension to work, [you need to register it with the Extensions API during the Lambda's `Init` phase](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#runtimes-extensions-api-reg).
The AWS docs show [how to make the API call to register an extension](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#extensions-registration-api-a), and [they provide an OpenAPI document for the Extensions API](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#runtimes-extensions-registration-api), but you would either have to generate Go bindings from this document, or you would have to [manually] write an implementation based on it.
[This repo already contains an Extensions API client](https://github.com/aws/aws-lambda-go/blob/main/lambda/extensions_api_client.go) (for the `register` and `next` endpoints), but all of the resources within this package are unexported.
**Describe the solution you'd like**
I would like to export the resources inside of the `extensions_api_client.go` file - this would mean that developers who wish to author Lambda Extensions would have a common client to use.
**Describe alternatives you've considered**
I considered generating client bindings using [the OpenAPI document that AWS provides in their documentation](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html#runtimes-extensions-registration-api), but this file isn't versioned, and there's no way to be notified of an update to the file.
**Additional context**
There are additional paths/methods on the Extensions API that aren't defined within this repo (`/extension/init/error` and `/extension/exit/error`).
Contributor guide
Assessment
This issue has not been assessed yet.