function_url_configs
Creates, updates, deletes, gets or lists a function_url_configs resource.
Overview
| Name | function_url_configs |
| Type | Resource |
| Id | aws.lambda.function_url_configs |
Fields
The following fields are returned by SELECT queries:
- get_function_url_config
| Name | Datatype | Description |
|---|---|---|
auth_type | string | The type of authentication that your function URL uses. Set to AWS_IAM if you want to restrict access to authenticated users only. Set to NONE if you want to bypass IAM authentication to create a public endpoint. For more information, see Control access to Lambda function URLs. (NONE, AWS_IAM) |
cors | object | The cross-origin resource sharing (CORS) settings for your Lambda function URL. Use CORS to grant access to your function URL from any origin. You can also use CORS to control access for specific HTTP headers and methods in requests to your function URL. |
creation_time | string | When the function URL was created, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). (pattern: <code>.*</code>) |
function_arn | string | The Amazon Resource Name (ARN) of your function. (pattern: <code>arn:(aws[a-zA-Z-]*)?:lambda:(eusc-)?[a-z]{2}((-gov)|(-iso([a-z]?)))?-[a-z]+-\d{1}:\d{12}:function:[a-zA-Z0-9-]+(:($LATEST|[a-zA-Z0-9-]+))?</code>) |
function_url | string | The HTTP URL endpoint for your function. |
invoke_mode | string | Use one of the following options: BUFFERED – This is the default option. Lambda invokes your function using the Invoke API operation. Invocation results are available when the payload is complete. The maximum payload size is 6 MB. RESPONSE_STREAM – Your function streams payload results as they become available. Lambda invokes your function using the InvokeWithResponseStream API operation. The maximum response payload size is 200 MB. (BUFFERED, RESPONSE_STREAM) |
last_modified_time | string | When the function URL configuration was last updated, in ISO-8601 format (YYYY-MM-DDThh:mm:ss.sTZD). (pattern: <code>.*</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_function_url_config | select | function_name, region | Qualifier | Returns details about a Lambda function URL. |
create_function_url_config | insert | function_name, region, AuthType | Qualifier | Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function. |
update_function_url_config | update | function_name, region | Qualifier | Updates the configuration for a Lambda function URL. |
delete_function_url_config | delete | function_name, region | Qualifier | Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL results in a different URL address. |
list_function_url_configs | exec | function_name, region | Marker, MaxItems | Returns a list of Lambda function URLs for the specified function. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
function_name | string | The name or ARN of the Lambda function. Name formats Function name – my-function. Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function. Partial ARN – 123456789012:function:my-function. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. |
region | string | AWS region (default: us-east-1) |
Marker | string | Specify the pagination token that's returned by a previous request to retrieve the next page of results. |
MaxItems | integer | The maximum number of function URLs to return in the response. Note that ListFunctionUrlConfigs returns a maximum of 50 items in each response, even if you set the number higher. |
Qualifier | string | The alias name. |
SELECT examples
- get_function_url_config
Returns details about a Lambda function URL.
SELECT
auth_type,
cors,
creation_time,
function_arn,
function_url,
invoke_mode,
last_modified_time
FROM aws.lambda.function_url_configs
WHERE function_name = '{{ function_name }}' -- required
AND region = '{{ region }}' -- required
AND Qualifier = '{{ Qualifier }}'
;
INSERT examples
- create_function_url_config
- Manifest
Creates a Lambda function URL with the specified configuration parameters. A function URL is a dedicated HTTP(S) endpoint that you can use to invoke your function.
INSERT INTO aws.lambda.function_url_configs (
AuthType,
Cors,
InvokeMode,
function_name,
region,
Qualifier
)
SELECT
'{{ AuthType }}' /* required */,
'{{ Cors }}',
'{{ InvokeMode }}',
'{{ function_name }}',
'{{ region }}',
'{{ Qualifier }}'
RETURNING
auth_type,
cors,
creation_time,
function_arn,
function_url,
invoke_mode
;
# Description fields are for documentation purposes
- name: function_url_configs
props:
- name: function_name
value: "{{ function_name }}"
description: Required parameter for the function_url_configs resource.
- name: region
value: "{{ region }}"
description: Required parameter for the function_url_configs resource.
- name: AuthType
value: "{{ AuthType }}"
valid_values: ['NONE', 'AWS_IAM']
- name: Cors
description: |
The cross-origin resource sharing (CORS) settings for your Lambda function URL. Use CORS to grant access to your function URL from any origin. You can also use CORS to control access for specific HTTP headers and methods in requests to your function URL.
value:
AllowCredentials: {{ AllowCredentials }}
AllowHeaders:
- "{{ AllowHeaders }}"
AllowMethods:
- "{{ AllowMethods }}"
AllowOrigins:
- "{{ AllowOrigins }}"
ExposeHeaders:
- "{{ ExposeHeaders }}"
MaxAge: {{ MaxAge }}
- name: InvokeMode
value: "{{ InvokeMode }}"
valid_values: ['BUFFERED', 'RESPONSE_STREAM']
- name: Qualifier
value: "{{ Qualifier }}"
description: The alias name.
description: The alias name.
UPDATE examples
- update_function_url_config
Updates the configuration for a Lambda function URL.
UPDATE aws.lambda.function_url_configs
SET
AuthType = '{{ AuthType }}',
Cors = '{{ Cors }}',
InvokeMode = '{{ InvokeMode }}'
WHERE
function_name = '{{ function_name }}' --required
AND region = '{{ region }}' --required
AND Qualifier = '{{ Qualifier}}'
RETURNING
auth_type,
cors,
creation_time,
function_arn,
function_url,
invoke_mode,
last_modified_time;
DELETE examples
- delete_function_url_config
Deletes a Lambda function URL. When you delete a function URL, you can't recover it. Creating a new function URL results in a different URL address.
DELETE FROM aws.lambda.function_url_configs
WHERE function_name = '{{ function_name }}' --required
AND region = '{{ region }}' --required
AND Qualifier = '{{ Qualifier }}'
;
Lifecycle Methods
- list_function_url_configs
Returns a list of Lambda function URLs for the specified function.
EXEC aws.lambda.function_url_configs.list_function_url_configs
@function_name='{{ function_name }}' --required,
@region='{{ region }}' --required,
@Marker='{{ Marker }}',
@MaxItems='{{ MaxItems }}'
;