urls
Creates, updates, deletes or gets an url
resource or lists urls
in a region
Overview
Name | urls |
Type | Resource |
Description | Resource Type definition for AWS::Lambda::Url |
Id | aws.lambda.urls |
Fields
Name | Datatype | Description |
---|---|---|
target_function_arn | string | The Amazon Resource Name (ARN) of the function associated with the Function URL. |
qualifier | string | The alias qualifier for the target function. If TargetFunctionArn is unqualified then Qualifier must be passed. |
auth_type | string | Can be either AWS_IAM if the requests are authorized via IAM, or NONE if no authorization is configured on the Function URL. |
invoke_mode | string | The invocation mode for the function's URL. Set to BUFFERED if you want to buffer responses before returning them to the client. Set to RESPONSE_STREAM if you want to stream responses, allowing faster time to first byte and larger response payload sizes. If not set, defaults to BUFFERED. |
function_arn | string | The full Amazon Resource Name (ARN) of the function associated with the Function URL. |
function_url | string | The generated url for this resource. |
cors | object | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | TargetFunctionArn, AuthType, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all urls
in a region.
SELECT
region,
target_function_arn,
qualifier,
auth_type,
invoke_mode,
function_arn,
function_url,
cors
FROM aws.lambda.urls
WHERE region = 'us-east-1';
Gets all properties from an individual url
.
SELECT
region,
target_function_arn,
qualifier,
auth_type,
invoke_mode,
function_arn,
function_url,
cors
FROM aws.lambda.urls
WHERE region = 'us-east-1' AND data__Identifier = '<FunctionArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new url
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lambda.urls (
TargetFunctionArn,
AuthType,
region
)
SELECT
'{{ TargetFunctionArn }}',
'{{ AuthType }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lambda.urls (
TargetFunctionArn,
Qualifier,
AuthType,
InvokeMode,
Cors,
region
)
SELECT
'{{ TargetFunctionArn }}',
'{{ Qualifier }}',
'{{ AuthType }}',
'{{ InvokeMode }}',
'{{ Cors }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: url
props:
- name: TargetFunctionArn
value: '{{ TargetFunctionArn }}'
- name: Qualifier
value: '{{ Qualifier }}'
- name: AuthType
value: '{{ AuthType }}'
- name: InvokeMode
value: '{{ InvokeMode }}'
- name: Cors
value:
AllowCredentials: '{{ AllowCredentials }}'
AllowHeaders:
- '{{ AllowHeaders[0] }}'
AllowMethods:
- '{{ AllowMethods[0] }}'
AllowOrigins:
- '{{ AllowOrigins[0] }}'
ExposeHeaders:
- '{{ ExposeHeaders[0] }}'
MaxAge: '{{ MaxAge }}'
DELETE
example
/*+ delete */
DELETE FROM aws.lambda.urls
WHERE data__Identifier = '<FunctionArn>'
AND region = 'us-east-1';
Permissions
To operate on the urls
resource, the following permissions are required:
Create
lambda:CreateFunctionUrlConfig
Read
lambda:GetFunctionUrlConfig
Update
lambda:UpdateFunctionUrlConfig
List
lambda:ListFunctionUrlConfigs
Delete
lambda:DeleteFunctionUrlConfig