New Interested in participating in the HCP Waypoint Private Beta Program? Apply here
  • Infrastructure
    • terraform
    • packer
  • Networking
    • consul
  • Security
    • vault
    • boundary
  • Applications
    • nomad
    • waypoint
    • vagrant
  • HashiCorp Cloud Platform

    A fully managed platform to automate infrastructure on any cloud with HashiCorp products.

    • consul
    • terraform
    • vault
    • packerbeta
    Visit cloud.hashicorp.com
  • Overview
  • Tutorials
  • Docs
  • CLI
  • Plugins
  • Community
GitHub
Download
    • v0.8.x (latest)
    • v0.7.x
    • v0.6.x
    • v0.5.x
    • v0.4.x
    • v0.3.x
    • v0.2.x
    • v0.1.x
  • aws-ec2
  • aws-ecs
  • aws-lambda
  • aws-ssm
  • azure-container-instance
  • docker
  • exec
  • google-cloud-run
  • helm
  • kubernetes
  • nomad
  • pack
  • terraform-cloud
  • vault

The Waypoint website is being redesigned to help you find what you are looking for more effectively.

Type '/' to Search

»AWS Lambda

»Image Support Only

The AWS Lambda deploy plugin only supports AWS Lambda deployments that utilize ECR images rather than .zip files.

We recommend that the docker build plugin is used to generate these images.

Below is a simple Dockerfile, handler code, and waypoint.hcl for building, deploying, and releasing using Waypoint.

»handler.rb

require 'json'

def handler(event:, context:)
    qs = event.fetch("queryStringParameters", {})

    name = qs.fetch("name", "unknown user")

    STDERR.puts "Handling ALB request for #{name}"

    {
        "statusCode": 200,
        "statusDescription": "200 OK",
        "isBase64Encoded": false,
        "headers": {
            "Content-Type": "text/html"
        },
        "body": "<html><body><h1>Hello there #{name} from Lambda!</h1></body></html>"
    }
end
require 'json'

def handler(event:, context:)
    qs = event.fetch("queryStringParameters", {})

    name = qs.fetch("name", "unknown user")

    STDERR.puts "Handling ALB request for #{name}"

    {
        "statusCode": 200,
        "statusDescription": "200 OK",
        "isBase64Encoded": false,
        "headers": {
            "Content-Type": "text/html"
        },
        "body": "<html><body><h1>Hello there #{name} from Lambda!</h1></body></html>"
    }
end

»Dockerfile

FROM public.ecr.aws/lambda/ruby:2.7

COPY handler.rb /var/task

CMD [ "handler.handler" ]
FROM public.ecr.aws/lambda/ruby:2.7

COPY handler.rb /var/task

CMD [ "handler.handler" ]

»waypoint.hcl

project = "hello"

app "hello-ruby" {
  build {
    use "docker" {}

    registry {
      use "aws-ecr" {
        region = "us-west-2"
        repository = "hello-ruby"
        tag = gitrefpretty()
      }
    }
  }

  deploy {
    use "aws-lambda" {
      region = "us-west-2"
    }
  }

  release {
    use "aws-alb" {

    }
  }
}
project = "hello"

app "hello-ruby" {
  build {
    use "docker" {}

    registry {
      use "aws-ecr" {
        region = "us-west-2"
        repository = "hello-ruby"
        tag = gitrefpretty()
      }
    }
  }

  deploy {
    use "aws-lambda" {
      region = "us-west-2"
    }
  }

  release {
    use "aws-alb" {

    }
  }
}

»Reference

»docker (builder)

Build a Docker image from a Dockerfile.

If a Docker server is available (either locally or via environment variables such as "DOCKER_HOST"), then "docker build" will be used to build an image from a Dockerfile.

»Dockerless Builds

Many hosted environments, such as Kubernetes clusters, don't provide access to a Docker server. In these cases, it is desirable to perform what is called a "dockerless" build: building a Docker image without access to a Docker daemon. Waypoint supports dockerless builds.

Waypoint performs Dockerless builds by leveraging Kaniko within on-demand launched runners. This should work in all supported Waypoint installation environments by default and you should not have to specify any additional configuration.

»Interface

  • Output: docker.Image

»Examples

build {
  use "docker" {
    buildkit    = false
    disable_entrypoint = false
  }
}
build {
  use "docker" {
    buildkit    = false
    disable_entrypoint = false
  }
}

»Required Parameters

These parameters are used in the use stanza for this plugin.

»auth (category)

The authentication information to log into the docker repository.

»auth.auth
  • Type: string
  • Optional
»auth.email
  • Type: string
  • Optional
»auth.hostname

Hostname of Docker registry.

  • Type: string
  • Optional
»auth.identityToken

Token used to authenticate user.

  • Type: string
  • Optional
»auth.password

Password of Docker registry account.

  • Type: string
  • Optional
»auth.registryToken

Bearer tokens to be sent to Docker registry.

  • Type: string
  • Optional
»auth.serverAddress

Address of Docker registry.

  • Type: string
  • Optional
»auth.username

Username of Docker registry account.

  • Type: string
  • Optional

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»build_args

Build args to pass to docker for the build step.

An array of strings of build-time variables passed as build-arg to docker for the build step.

  • Type: map of string to string
  • Optional

»buildkit

If set, use the buildkit builder from Docker.

  • Type: bool
  • Optional

»context

Build context path.

  • Type: string
  • Optional

»disable_entrypoint

If set, the entrypoint binary won't be injected into the image.

The entrypoint binary is what provides extended functionality such as logs and exec. If it is not injected at build time the expectation is that the image already contains it.

  • Type: bool
  • Optional

»dockerfile

The path to the Dockerfile.

Set this when the Dockerfile is not APP-PATH/Dockerfile.

  • Type: string
  • Optional

»no_cache

Do not use cache when building the image.

Ensures a clean image build.

  • Type: bool
  • Optional

»platform

Set target platform to build container if server is multi-platform capable.

Must enable Docker buildkit to use the 'platform' flag.

  • Type: string
  • Optional

»target

The target build stage in a multi-stage Dockerfile.

If buildkit is enabled unused stages will be skipped.

  • Type: string
  • Optional

»Output Attributes

Output attributes can be used in your waypoint.hcl as variables via artifact or deploy.

»architecture

  • Type: string

»image

  • Type: string

»location

  • Type: docker.isImage_Location

»tag

  • Type: string

»aws-ecr (registry)

Store a docker image within an Elastic Container Registry on AWS.

»Interface

  • Input: docker.Image
  • Output: ecr.Image

»Examples

registry {
    use "aws-ecr" {
      region = "us-east-1"
      tag = "latest"
    }
}
registry {
    use "aws-ecr" {
      region = "us-east-1"
      tag = "latest"
    }
}

»Mappers

»Allow an ECR Image to be used as a standard docker.Image

  • Input: ecr.Image
  • Output: docker.Image

»Required Parameters

These parameters are used in the use stanza for this plugin.

»tag

The docker tag to assign to the new image.

  • Type: string

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»region

The AWS region the ECR repository is in.

If not set uses the environment variable AWS_REGION or AWS_REGION_DEFAULT.

  • Type: string
  • Optional

»repository

The ECR repository to store the image into.

This defaults to waypoint- then the application name. The repository will be automatically created if needed.

  • Type: string
  • Optional

»Output Attributes

Output attributes can be used in your waypoint.hcl as variables via artifact or deploy.

»architecture

  • Type: string

»image

  • Type: string

»tag

  • Type: string

»aws-lambda (platform)

Deploy functions as OCI Images to AWS Lambda.

»Interface

  • Input: ecr.Image
  • Output: lambda.Deployment

»Examples

deploy {
    use "aws-lambda" {
        region = "us-east-1"
        memory = 512
    }
}
deploy {
    use "aws-lambda" {
        region = "us-east-1"
        memory = 512
    }
}

»Required Parameters

These parameters are used in the use stanza for this plugin.

»region

The AWS region for the ECS cluster.

  • Type: string

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»architecture

The instruction set architecture that the function supports. Valid values are: "x86_64", "arm64".

  • Type: string
  • Optional
  • Default: x86_64

»iam_role

An IAM Role specified by ARN that will be used by the Lambda at execution time.

  • Type: string
  • Optional
  • Default: created automatically

»memory

The amount of memory, in megabytes, to assign the function.

  • Type: int
  • Optional
  • Default: 265

»static_environment

Environment variables to expose to the lambda function.

Environment variables that are meant to configure the application in a static way. This might be to control an image that has multiple modes of operation, selected via environment variable. Most configuration should use the waypoint config commands.

  • Type: map of string to string
  • Optional

»storagemb

The storage size (in MB) of the Lambda function's /tmp directory. Must be a value between 512 and 10240.

  • Type: int
  • Optional
  • Default: 512

»timeout

The number of seconds a function has to return a result.

  • Type: int
  • Optional
  • Default: 60

»Output Attributes

Output attributes can be used in your waypoint.hcl as variables via artifact or deploy.

»func_arn

  • Type: string

»id

  • Type: string

»region

  • Type: string

»target_group_arn

  • Type: string

»ver_arn

  • Type: string

»version

  • Type: string

»aws-alb (releasemanager)

Release target groups by attaching them to an ALB.

»Interface

  • Input: alb.TargetGroup
  • Output: alb.Release

»Mappers

»Allow EC2 Deployments to be hooked up to an ALB

  • Input: ec2.Deployment
  • Output: alb.TargetGroup

»Allow Lambda Deployments to be hooked up to an ALB

  • Input: lambda.Deployment
  • Output: alb.TargetGroup

»Required Parameters

This plugin has no required parameters.

»Optional Parameters

These parameters are used in the use stanza for this plugin.

»certificate

ARN for the certificate to install on the ALB listener.

When this is set, the port automatically changes to 443 unless overriden in this configuration.

  • Type: string
  • Optional

»domain_name

Fully qualified domain name to set for the ALB.

Set along with zone_id to have DNS automatically setup for the ALB. this value should include the full hostname and domain name, for instance app.example.com.

  • Type: string
  • Optional

»listener_arn

The ARN on an existing ALB to configure.

When this is set, no ALB or Listener is created. Instead the application is configured by manipulating this existing Listener. This allows users to configure their ALB outside waypoint but still have waypoint hook the application to that ALB.

  • Type: string
  • Optional

»name

The name to assign the ALB.

Names have to be unique per region.

  • Type: string
  • Optional
  • Default: derived from application name

»port

The TCP port to configure the ALB to listen on.

  • Type: int
  • Optional
  • Default: 80 for HTTP, 443 for HTTPS

»subnets

The subnet ids to allow the ALB to run in.

  • Type: list of string
  • Optional
  • Default: public subnets in the account default VPC

»zone_id

Route53 ZoneID to create a DNS record into.

Set along with domain_name to have DNS automatically setup for the ALB.

  • Type: string
  • Optional
github logoEdit this page

Using Waypoint

The best way to understand what Waypoint can enable for your projects is to give it a try.

Waypoint tutorials
Waypoint documentation
Tutorial

Get Started - Kubernetes

Build, deploy, and release applications to a Kubernetes cluster.

View
Tutorial

Introduction to Waypoint

Waypoint enables you to publish any application to any platform with a single file and a single command.

View

Waypoint is maintained by HashiCorp, Inc.

View Code of Conduct
DocumentationCLI ReferenceTutorialsIntegrations
All systems normal