mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 08:09:43 -05:00
feat(lambda): list function URL configurations (#8410)
ListFunctionUrlConfigs answers GET /2021-10-31/functions/{FunctionName}/urls,
which returned 404 before. It returns the stored URL configurations of the
unpublished function and its aliases, with signed markers scoped to the
function, account and Region, and refuses GovCloud and China like the other
URL operations. MaxItems and the marker go through LambdaPagination, and a
missing or foreign function answers Function not found.
The URL, S3 code and permission tests share one Node.js ZIP builder,
LambdaCodeFixtures.nodeJsZip.
Signed-off-by: Jackson Price <jxnprice@amazon.com>
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
704f895982
commit
e7767b8bac
9 files changed
+498
-35
No files matched your search
+10
-2
@@ -43,6 +43,7 @@ Floci Lambda runs your function code locally inside real Docker containers - clo
|
||||
| `ListCodeSigningConfigs` | List the configurations in the region |
|
||||
| `CreateFunctionUrlConfig` | Provision a function URL |
|
||||
| `GetFunctionUrlConfig` | Read function URL config |
|
||||
| `ListFunctionUrlConfigs` | List a function's URL configurations across its unpublished version and aliases, with marker pagination |
|
||||
| `UpdateFunctionUrlConfig` | Update function URL config |
|
||||
| `DeleteFunctionUrlConfig` | Delete function URL config |
|
||||
| `ListTags` | List tags on a function or event source mapping |
|
||||
@@ -463,13 +464,20 @@ disabled fails with Lambda's error as the resource status reason.
|
||||
|
||||
Function URLs are also reachable directly on `/{proxy:.*}` under the Lambda URL controller, which routes the request into the normal `Invoke` path.
|
||||
|
||||
`ListFunctionUrlConfigs` lists the unpublished function's URL and its alias URLs.
|
||||
It accepts `MaxItems` from 1 through 50, defaulting to 50, and resumes with `Marker`.
|
||||
Pagination uses Lambda's shared validation: out-of-range integers return
|
||||
`ValidationException`, non-integers return `SerializationException`, and an invalid
|
||||
marker returns `InvalidParameterValueException` with `Invalid pagination key.`.
|
||||
Missing or inaccessible function references return `ResourceNotFoundException`.
|
||||
|
||||
A function URL with `InvokeMode: RESPONSE_STREAM` streams the response: each chunk the handler writes reaches the caller as it is written. When the handler uses `awslambda.HttpResponseStream.from`, the status code, headers and cookies come from its prelude. Otherwise the response is a `200` with the content type the handler set, `application/octet-stream` by default. A function that fails before its stream starts, in its init or by timing out, answers `502`. An error the handler throws ends the body where it stopped, an empty `200` if it wrote nothing: the runtime reports it in HTTP trailers, which Floci's runtime API does not read. A handler that does not stream is answered as with `BUFFERED`.
|
||||
|
||||
Function URLs are not available in AWS GovCloud (US) or in the China Regions
|
||||
([GovCloud guide](https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-lambda.html),
|
||||
[China guide](https://docs.amazonaws.cn/en_us/aws/latest/userguide/lambda.html)), so
|
||||
`CreateFunctionUrlConfig` is an `InvalidParameterValueException` in those regions, and an
|
||||
`AWS::Lambda::Url` in a CloudFormation stack there fails with it. See
|
||||
`CreateFunctionUrlConfig` and `ListFunctionUrlConfigs` return `InvalidParameterValueException`
|
||||
in those regions, and an `AWS::Lambda::Url` in a CloudFormation stack there fails with it. See
|
||||
[AWS Partitions](../configuration/partitions.md).
|
||||
|
||||
**Versions:** `CreateFunction` and `UpdateFunctionCode` honour `Publish`, publishing a version
|
||||
|
||||
Reference in new issue
Block a user