aliases
Creates, updates, deletes or gets an alias
resource or lists aliases
in a region
Overview
Name | aliases |
Type | Resource |
Description | Resource Type definition for AWS::Lambda::Alias |
Id | aws.lambda.aliases |
Fields
Name | Datatype | Description |
---|---|---|
function_name | string | The name of the Lambda function. |
alias_arn | string | Lambda Alias ARN generated by the service. |
provisioned_concurrency_config | object | Specifies a provisioned concurrency configuration for a function's alias. |
description | string | A description of the alias. |
function_version | string | The function version that the alias invokes. |
routing_config | object | The routing configuration of the alias. |
name | string | The name of the alias. |
region | string | AWS region. |
For more information, see AWS::Lambda::Alias
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | FunctionName, FunctionVersion, Name, 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 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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lambda.aliases (
FunctionName,
FunctionVersion,
Name,
region
)
SELECT
'{{ FunctionName }}',
'{{ FunctionVersion }}',
'{{ Name }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lambda.aliases (
FunctionName,
ProvisionedConcurrencyConfig,
Description,
FunctionVersion,
RoutingConfig,
Name,
region
)
SELECT
'{{ FunctionName }}',
'{{ ProvisionedConcurrencyConfig }}',
'{{ Description }}',
'{{ FunctionVersion }}',
'{{ RoutingConfig }}',
'{{ Name }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: alias
props:
- name: FunctionName
value: '{{ FunctionName }}'
- name: ProvisionedConcurrencyConfig
value:
ProvisionedConcurrentExecutions: '{{ ProvisionedConcurrentExecutions }}'
- name: Description
value: '{{ Description }}'
- name: FunctionVersion
value: '{{ FunctionVersion }}'
- name: RoutingConfig
value:
AdditionalVersionWeights:
- FunctionWeight: null
FunctionVersion: '{{ FunctionVersion }}'
- name: Name
value: '{{ Name }}'
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