versions
Creates, updates, deletes or gets a version
resource or lists versions
in a region
Overview
Name | versions |
Type | Resource |
Description | Resource Type definition for AWS::Lambda::Version |
Id | aws.lambda.versions |
Fields
Name | Datatype | Description |
---|---|---|
function_arn | string | The ARN of the version. |
version | string | The version number. |
code_sha256 | string | Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property. |
description | string | A description for the version to override the description in the function configuration. Updates are not supported for this property. |
function_name | string | The name of the Lambda function. |
policy | object | The resource policy of your function |
provisioned_concurrency_config | object | Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property. |
runtime_policy | object | Specifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | FunctionName, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all versions
in a region.
SELECT
region,
function_arn,
version,
code_sha256,
description,
function_name,
policy,
provisioned_concurrency_config,
runtime_policy
FROM aws.lambda.versions
WHERE region = 'us-east-1';
Gets all properties from an individual version
.
SELECT
region,
function_arn,
version,
code_sha256,
description,
function_name,
policy,
provisioned_concurrency_config,
runtime_policy
FROM aws.lambda.versions
WHERE region = 'us-east-1' AND data__Identifier = '<FunctionArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new version
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lambda.versions (
FunctionName,
region
)
SELECT
'{{ FunctionName }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lambda.versions (
CodeSha256,
Description,
FunctionName,
Policy,
ProvisionedConcurrencyConfig,
RuntimePolicy,
region
)
SELECT
'{{ CodeSha256 }}',
'{{ Description }}',
'{{ FunctionName }}',
'{{ Policy }}',
'{{ ProvisionedConcurrencyConfig }}',
'{{ RuntimePolicy }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: version
props:
- name: CodeSha256
value: '{{ CodeSha256 }}'
- name: Description
value: '{{ Description }}'
- name: FunctionName
value: '{{ FunctionName }}'
- name: Policy
value: {}
- name: ProvisionedConcurrencyConfig
value:
ProvisionedConcurrentExecutions: '{{ ProvisionedConcurrentExecutions }}'
- name: RuntimePolicy
value:
RuntimeVersionArn: '{{ RuntimeVersionArn }}'
UpdateRuntimeOn: '{{ UpdateRuntimeOn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.lambda.versions
WHERE data__Identifier = '<FunctionArn>'
AND region = 'us-east-1';
Permissions
To operate on the versions
resource, the following permissions are required:
Create
lambda:PublishVersion,
lambda:GetFunctionConfiguration,
lambda:PutProvisionedConcurrencyConfig,
lambda:GetProvisionedConcurrencyConfig,
lambda:PutRuntimeManagementConfig,
lambda:GetRuntimeManagementConfig
Read
lambda:GetFunctionConfiguration,
lambda:GetProvisionedConcurrencyConfig,
lambda:GetRuntimeManagementConfig
Delete
lambda:GetFunctionConfiguration,
lambda:DeleteFunction
List
lambda:ListVersionsByFunction