Skip to main content

aliases

Creates, updates, deletes or gets an alias resource or lists aliases in a region

Overview

Namealiases
TypeResource
DescriptionResource Type definition for AWS::Lambda::Alias
Idaws.lambda.aliases

Fields

NameDatatypeDescription
function_namestringThe name of the Lambda function.
alias_arnstringLambda Alias ARN generated by the service.
provisioned_concurrency_configobjectSpecifies a provisioned concurrency configuration for a function's alias.
descriptionstringA description of the alias.
function_versionstringThe function version that the alias invokes.
routing_configobjectThe routing configuration of the alias.
namestringThe name of the alias.
regionstringAWS region.

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

Methods

NameAccessible byRequired Params
create_resourceINSERTFunctionName, FunctionVersion, Name, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all aliases in a region.

SELECT
region,
function_name,
alias_arn,
provisioned_concurrency_config,
description,
function_version,
routing_config,
name
FROM aws.lambda.aliases
WHERE region = 'us-east-1';

Gets all properties from an individual alias.

SELECT
region,
function_name,
alias_arn,
provisioned_concurrency_config,
description,
function_version,
routing_config,
name
FROM aws.lambda.aliases
WHERE region = 'us-east-1' AND data__Identifier = '<AliasArn>';

INSERT example

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

/*+ create */
INSERT INTO aws.lambda.aliases (
FunctionName,
FunctionVersion,
Name,
region
)
SELECT
'{{ FunctionName }}',
'{{ FunctionVersion }}',
'{{ Name }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lambda.aliases
WHERE data__Identifier = '<AliasArn>'
AND region = 'us-east-1';

Permissions

To operate on the aliases resource, the following permissions are required:

Create

lambda:CreateAlias,
lambda:PutProvisionedConcurrencyConfig,
lambda:GetProvisionedConcurrencyConfig

Read

lambda:GetAlias,
lambda:GetProvisionedConcurrencyConfig

Delete

lambda:DeleteAlias,
lambda:GetAlias

List

lambda:ListAliases

Update

lambda:UpdateAlias,
lambda:GetAlias,
lambda:PutProvisionedConcurrencyConfig,
lambda:DeleteProvisionedConcurrencyConfig,
lambda:GetProvisionedConcurrencyConfig,
codedeploy:CreateDeployment,
codedeploy:GetDeployment,
codedeploy:GetDeploymentGroup,
codedeploy:GetDeploymentConfig,
codedeploy:StopDeployment