Skip to main content

versions

Creates, updates, deletes or gets a version resource or lists versions in a region

Overview

Nameversions
TypeResource
DescriptionResource Type definition for AWS::Lambda::Version
Idawscc.lambda.versions

Fields

NameDatatypeDescription
function_arnstringThe ARN of the version.
versionstringThe version number.
code_sha256stringOnly 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.
descriptionstringA description for the version to override the description in the function configuration. Updates are not supported for this property.
function_namestringThe name of the Lambda function.
provisioned_concurrency_configobjectSpecifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
runtime_policyobjectSpecifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual.
regionstringAWS region.

For more information, see AWS::Lambda::Version.

Methods

NameResourceAccessible byRequired Params
create_resourceversionsINSERTFunctionName, region
delete_resourceversionsDELETEIdentifier, region
list_resourcesversions_list_onlySELECTregion
get_resourceversionsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual version.

SELECT
region,
function_arn,
version,
code_sha256,
description,
function_name,
provisioned_concurrency_config,
runtime_policy
FROM awscc.lambda.versions
WHERE
region = '{{ region }}' AND
Identifier = '{{ function_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new version resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.lambda.versions (
FunctionName,
region
)
SELECT
'{{ function_name }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.lambda.versions
WHERE
Identifier = '{{ function_arn }}' 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:

ParameterDescription
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 versions resource, the following permissions are required:

lambda:PublishVersion,
lambda:GetFunctionConfiguration,
lambda:PutProvisionedConcurrencyConfig,
lambda:GetProvisionedConcurrencyConfig,
lambda:PutRuntimeManagementConfig,
lambda:GetRuntimeManagementConfig