Skip to main content

AWS Lambda Deployments Overview

This content is for Harness FirstGen. Switch to NextGen.This topic describes the concept of a Harness AWS Lambda deployment by describing the high-level steps involved.

For a quick tutorial, see the AWS Lambda Quickstart.

Before You Begin

Before learning about Harness AWS Lambda deployments, you should have an understanding of Harness Key Concepts.

What Does Harness Need Before You Start?

A Harness AWS Lambda deployment requires the following:

  • AWS account - An AWS account you can connect to Harness.
  • Lambda function file stored on an artifact server, typically AWS S3.

Artifact Source Support

Harness supports the following artifact sources with Lambda:

What Does Harness Deploy?

Setting up a Lambda deployment is as simple as adding your function zip file, configuring function compute settings, and adding aliases and tags. Harness takes care of the rest of the deployment, making it consistent, reusable, and safe with automatic rollback.

Basically, the Harness setup for Lambda is akin to using the AWS CLI  aws lambda  create-functionupdate-function-code, and  update-function-configuration commands, as well as the many other commands that are needed.

The benefit with Harness is that you can set up your Lambda deployment once, with no scripting, and then have your Lambda functions deployed automatically as they are updated in your AWS S3 bucket. You can even templatize the deployment Environment and Workflow for use by other devops and developers in your team.

Furthermore, Harness manages Lambda function versioning to perform rollback when needed.

What Does a Harness AWS Lambda Deployment Involve?

The following list describes the major steps of a Harness AWS Lambda deployment:

StepNameDescription and Links
1Install the Harness Shell Script or ECS Delegate in AWS.Typically, the Shell Script or ECS Delegate is installed in the same AWS VPC as your Lambda functions.When you set up a Harness AWS Cloud Provider, you can use the same IAM credentials as the installed Delegate.The IAM role you assign to the Delegate requires the standard Lambda Permissions.See Delegate Installation and Management.See Lambda Permissions from AWS.
2Add an AWS Cloud Provider.An AWS Cloud Provider is a connection to your AWS account.If you use AWS S3 to store your Lambda function files, the AWS Cloud Provider is used to obtain the Lambda function file from AWS S3.The AWS Cloud Provider is also used to connect to Lambda and deploy your function.When you set up a Harness AWS Cloud Provider, you can use the same IAM credentials as the installed Delegate.See Add Cloud Providers.
3Create the Harness Application for your Lambda CD Pipeline.The Harness Application represents a group of microservices, their deployment pipelines, and all the building blocks for those pipelines. Harness represents your release process using a logical group of one or more entities: Services, Environments, Workflows, Pipelines, Triggers, and Infrastructure Provisioners. Applications organize all of the entities and configurations in Harness CD.See Create an Application.
4Create the Harness Service using the AWS Lambda Deployment Type.Add a Lambda function file as an artifact in a Harness Service, define a function specification, and any config variables and files.See Services for Lambda.
5Create the Harness Environment and Infrastructure Definition for your deployment, and any overrides.Using the Harness AWS Cloud Provider you set up, you can select the IAM role, region, and other components of the target environment for your deployment.You can also override any Service settings, such as config variables and files. This enables you to use a single Service with multiple Harness Environments.See Define Your Kubernetes Target Infrastructure.
6Create the Basic deployment for Lambda in Harness Workflows.The Workflow deploys the Lambda function as defined in the Harness Service to the AWS Lambda environment in the Harness Infrastructure Definition.See Lambda Workflows and Deployments.
7Deploy the Workflow.Once you've deployed a Workflow, learn how to improve your AWS Lambda CD:* Deploy Individual Workflows

Next Steps

Read the following topics to build on what you've learned: