Table of Contents |
---|
Introduction
We can create one or more aliases for our Lambda function. A Lambda alias is like a pointer to a specific function version. We can access the function version using the alias Amazon Resource Name (ARN).
...
Checklist | Description |
AWS Access Key | AWS Access Key of the user. |
AWS Secret Key | Password for the Access Key |
AWS Default Region | Default region can be set. eg. ap-south-1 |
AWS CLI installation | AWS CLI needs to be installed where the plugin operation shall run (FlexDeploy server) |
AWS CLI in class path | AWS CLI should be added to the class path on the FlexDeploy Server. Else the path can also be set under FlexDeploy environment level property |
AWS Lambda Function | AWS Lambda Function should be already present. |
AWS Lambda Alias | AWS Lambda Alias should be already present. |
...
To create or update the Lambda Alias we can use the upsertLambdaAlias operation available in the AWS plugin, please refer to the tutorial document for more information.
In our AWS Lambda Function we have three Aliases, we will get the details of Prod Alias.
...
Pre-requisite
Configure IAM User
...
AWS CLI should be installed in the m/c where the plugin is to be executed. Preferably add AWS CLI path in m/c classpath.
Workflow Detail
Navigate to the Workflows tab and create a utility workflow using the “+”(Click to create new Workflow) button as highlighted below.
...
The Workflow Group and Subgroup define the folder hierarchy. Once both workflows are created it should look like the below. No constraint on workflow or folder naming convention.
...
The steps of the workflow execution can be configured through the Workflow Definition section.
...
Step-i: Get Alias Details
This step will get the details of the Alias and will set the response message, function version and additional weights detail as plugin output. Name of the Alias is the mandatory field.
...
Project Configuration
Navigate to the Project tab and create a Project with a logical name(AWS-Lambda-Get-Alias in this case)
...
Configure the utility workflow that has been created in previous steps as shown below.
...
Project Properties
...
Lambda Function name: Name of the Function to get the Alias details.
Target Properties
Select Topology from the menu and then select Targets. Select the target group and environment, provide the properties detail, according to the description.
Properties | Mandatory field | Description |
Cloud Account | Optional | Select the Cloud Account to connect the Lambda Function. |
CLI Path | Optional | Directory where Cloud CLI is installed. |
AWS Region | Optional | Value of the AWS Region. |
Below given are the environment-specific values which need to be updated.
...
Override Properties at Project Level
Let assume a scenario, where we want to change Cloud account for any specific project. Apart from setting at environment level, it can also be set at project properties by using Override Property. Please check below mentioned steps.
Navigate to the Project Configuration tab as shown above.
Next, select the PROPERTIES option from the left-hand pane.
Click on the OVERRIDE option.
Select the Cloud Account option from Property.
Select the Environment from the drop down list.
Select the Target Group from the drop down list.
...
Execution Result
After successful execution of the operation, we can see the Alias details.
...
Below is the plugin output, it contains Alias response, function version and Additional weights.
...