event_invoke_configs
Creates, updates, deletes or gets an event_invoke_config resource or lists event_invoke_configs in a region
Overview
| Name | event_invoke_configs |
| Type | Resource |
| Description | The AWS::Lambda::EventInvokeConfig resource configures options for asynchronous invocation on a version or an alias. |
| Id | awscc.lambda.event_invoke_configs |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
destination_config | object | A configuration object that specifies the destination of an event after Lambda processes it. For more information, see Adding a destination. |
function_name | string | The name of the Lambda function. |
maximum_event_age_in_seconds | integer | The maximum age of a request that Lambda sends to a function for processing. |
maximum_retry_attempts | integer | The maximum number of times to retry when the function returns an error. |
qualifier | string | The identifier of a version or alias. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
function_name | string | The name of the Lambda function. |
qualifier | string | The identifier of a version or alias. |
region | string | AWS region. |
For more information, see AWS::Lambda::EventInvokeConfig.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | event_invoke_configs | INSERT | FunctionName, Qualifier, region |
delete_resource | event_invoke_configs | DELETE | Identifier, region |
update_resource | event_invoke_configs | UPDATE | Identifier, PatchDocument, region |
list_resources | event_invoke_configs_list_only | SELECT | region |
get_resource | event_invoke_configs | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual event_invoke_config.
SELECT
region,
destination_config,
function_name,
maximum_event_age_in_seconds,
maximum_retry_attempts,
qualifier
FROM awscc.lambda.event_invoke_configs
WHERE
region = '{{ region }}' AND
Identifier = '{{ function_name }}|{{ qualifier }}';
Lists all event_invoke_configs in a region.
SELECT
region,
function_name,
qualifier
FROM awscc.lambda.event_invoke_configs_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new event_invoke_config resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.lambda.event_invoke_configs (
FunctionName,
Qualifier,
region
)
SELECT
'{{ function_name }}',
'{{ qualifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.lambda.event_invoke_configs (
DestinationConfig,
FunctionName,
MaximumEventAgeInSeconds,
MaximumRetryAttempts,
Qualifier,
region
)
SELECT
'{{ destination_config }}',
'{{ function_name }}',
'{{ maximum_event_age_in_seconds }}',
'{{ maximum_retry_attempts }}',
'{{ qualifier }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: event_invoke_config
props:
- name: destination_config
value:
on_failure:
destination: '{{ destination }}'
- name: function_name
value: '{{ function_name }}'
- name: maximum_event_age_in_seconds
value: '{{ maximum_event_age_in_seconds }}'
- name: maximum_retry_attempts
value: '{{ maximum_retry_attempts }}'
- name: qualifier
value: '{{ qualifier }}'
UPDATE example
Use the following StackQL query and manifest file to update a event_invoke_config resource, using stack-deploy.
/*+ update */
UPDATE awscc.lambda.event_invoke_configs
SET PatchDocument = string('{{ {
"DestinationConfig": destination_config,
"MaximumEventAgeInSeconds": maximum_event_age_in_seconds,
"MaximumRetryAttempts": maximum_retry_attempts
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ function_name }}|{{ qualifier }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.lambda.event_invoke_configs
WHERE
Identifier = '{{ function_name }}|{{ qualifier }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the event_invoke_configs resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
lambda:PutFunctionEventInvokeConfig
lambda:GetFunctionEventInvokeConfig
lambda:UpdateFunctionEventInvokeConfig
lambda:DeleteFunctionEventInvokeConfig
lambda:ListFunctionEventInvokeConfigs