Skip to main content

Upgrade

This topic provides instructions for upgrading the Upwind components for AWS Lambda. Upwind provides newer versions so you can keep your environment up-to-date. Newer versions can include bug fixes, security enhancements, and other improvements for the Upwind components.

Upgrading the Upwind Cluster Manager

Follow these steps to upgrade the Upwind Cluster Manager via Terraform.

  1. Navigate to the directory for your Terraform project in your terminal. This directory contains your current Terraform configuration.

    cd /path/to/my-terraform-project
  2. Open the main.tf file within this directory.

  3. Locate the upwind_integration_aws_ecs_utility_cluster module block within the main.tf file. Update the source variable to point to the new module source path. For example:

    module "upwind_integration_aws_ecs_utility_cluster" {
    source = "https://get.upwind.io/.../[OLD].tar.gz"
    source = "https://get.upwind.io/.../[NEW].tar.gz"
    }
    note

    The URL of the latest module source can be found in the Terraform setup section under Components → Integrations in the Upwind Management Console. All Terraform modules will be migrated to the Terraform Registry in the future, allowing the use of Version Constraints .

  4. Before proceeding, ensure the configuration settings are tailored to your environment.

  5. Run the following command to initialize Terraform within the project directory:

    terraform init -upgrade
  6. Run the following command to apply the Terraform configuration and update the necessary resources:

    terraform apply
  7. Review the changes that Terraform plans to make and enter yes when prompted to confirm the changes. Terraform will update the necessary infrastructure and resources in your AWS account to upgrade the Upwind components, based on the provided configuration.

  8. Once the terraform apply command has successfully executed, the necessary infrastructure and resources should be upgraded within a few moments.

Verify upgrade success

To verify that the upgrade was successful, run the following command:

aws ecs describe-services \
--cluster [your-cluster-name] \
--services upwind-cluster-manager

Expected output (simplified):

[
{
"serviceName": "upwind-cluster-manager",
"status": "ACTIVE",
"desiredCount": 1,
"runningCount": 1,
"deployments": [
{
"status": "PRIMARY",
"desiredCount": 1,
"runningCount": 1,
"createdAt": "<recent timestamp>",
"rolloutState": "COMPLETED"
}
]
}
]

Upgrading Lambda functions

This section describes how to upgrade the Upwind Lambda Tracer extension in your Lambda functions. The steps differ based on if the Lambda function is deployed as a .zip archive or container.

You can use the upwindctl tool to easily upgrade .zip archive Lambda functions.

Install upwindctl

curl -s https://get.upwind.io/upwindctl.sh | sh

To add upwindctl to your PATH, append this line to your shell config:

. "$HOME/.upwindctl/env"

To upgrade upwindctl you can simply re-run the installation command:

curl -s https://get.upwind.io/upwindctl.sh | sh

Upgrade Lambda functions

info

To configure Lambda functions to communicate with an Upwind Cluster Manager you can provide the --report-to-cluster-manager flag to the lambda list and lambda instrument commands.

The upwindctl lambda list command will show a list of Lambda functions, along with an indication of if they are instrumented, and if they are up to date or not:

upwindctl lambda list

You can also use a filter to only show Lambda functions that have an update available:

upwindctl lambda list --update-available

Upgrading the Upwind Lambda Tracer extension in Lambda functions can be done by simply re-running the upwindctl lambda instrument command.

To upgrade a specific function by name:

upwindctl lambda instrument --function-name my-lambda-function

To operate on multiple Lambda functions you can use the --bulk flag, a confirmation prompt will appear before taking any action.

upwindctl lambda instrument --bulk

To upgrade only functions which are already instrumented and have an update available:

upwindctl lambda instrument --bulk --update-available

Note that the upwindctl tool offers a number of other options, such as filtering functions by VPC ID or tags:

upwindctl lambda instrument --bulk --vpc-id vpc-XXX
upwindctl lambda instrument --bulk --tags Key=some-tag,Values=some-value

To see a list of available configuration options you can run e.g.:

upwindctl lambda instrument -h

Manual instrumentation of Lambda functions

If you prefer to use another method such as Terraform to manage function configurations you can follow these steps:

  1. Run the following command to get the latest Upwind Lambda Tracer layer ARN:
upwindctl lambda show-latest-versions --aws-region $LAMBDA_FUNCTION_REGION

This will show the ARN of the latest Upwind Lambda Tracer layer, for both amd64 (X86_64) and arm64. Note that the ARNs are region specific, so make sure the region matches the region your Lambda functions reside in. You can use the --aws-region flag to specify a region explicitly.

  1. Update the layer in the Lambda function configuration, by ARN
  2. Make sure that the AWS_LAMBDA_EXEC_WRAPPER environment variable is set in the Lambda function configuration:
AWS_LAMBDA_EXEC_WRAPPER=/opt/bin/upwind-tracer.sh