Skip to main content

High level CDK construct to provision GitLab integrations with AWS

Project description

NPM version PyPI version release


High level CDK construct to provision GitLab integrations with AWS


Use the npm dist tag to opt in CDKv1 or CDKv2:

// for CDKv2
npm install cdk-gitlab
npm install cdk-gitlab@latest

// for CDKv1
npm install cdk-gitlab@cdkv1


import { Provider, FargateJobExecutor, FargateRunner, JobExecutorImage } from 'cdk-gitlab';

const provider = new Provider(stack, 'GitlabProvider', { vpc });

// create a Amazon EKS cluster
provider.createFargateEksCluster(stack, 'GitlabEksCluster', {
  clusterOptions: {
    version: eks.KubernetesVersion.V1_19,

// create a default fargate runner with its job executor

// alternatively, create the runner and the executor indivicually.
// first, create the executor
const executor = new FargateJobExecutor(stack, 'JobExecutor', {
  image: JobExecutorImage.DEBIAN,

// second, create the runner with the task definition of the executor
new FargateRunner(stack, 'FargateRunner', {

// TBD - create Amazon EC2 runner for the GitLab


Fargate Runner with Amazon ECS

On deployment with createFargateRunner(), the Fargate Runner will be provisioned in Amazon ECS with AWS Fargate and Amazon ECS Capacity Providers. By default, the FARGATE and FARGATE_SPOT capacity providers are available for the Amazon ECS cluster and the runner and job executor will run on FARGATE_SPOT. You can specify your custom clusterDefaultCapacityProviderStrategy and serviceDefaultCapacityProviderStrategy properties from the FargateRunner construct for different capacity provider strategies.



Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-gitlab-2.0.241.tar.gz (2.7 MB view hashes)

Uploaded source

Built Distribution

cdk_gitlab-2.0.241-py3-none-any.whl (2.7 MB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page