Skip to content

LambdaRunnerProviderProps Struct ​

Initializer ​

ts
import { LambdaRunnerProviderProps } from '@cloudsnorkel/cdk-github-runners'

const lambdaRunnerProviderProps: LambdaRunnerProviderProps = { ... }
python
import cloudsnorkel.cdk_github_runners

cloudsnorkel.cdk_github_runners.LambdaRunnerProviderProps(
  default_labels: bool = None,
  log_retention: RetentionDays = None,
  ephemeral_storage_size: Size = None,
  group: str = None,
  image_builder: IRunnerImageBuilder = None,
  labels: typing.List[str] = None,
  memory_size: typing.Union[int, float] = None,
  security_groups: typing.List[ISecurityGroup] = None,
  subnet_selection: SubnetSelection = None,
  timeout: Duration = None,
  vpc: IVpc = None
)
java
import com.cloudsnorkel.cdk.github.runners.LambdaRunnerProviderProps;

LambdaRunnerProviderProps.builder()
//  .defaultLabels(java.lang.Boolean)
//  .logRetention(RetentionDays)
//  .ephemeralStorageSize(Size)
//  .group(java.lang.String)
//  .imageBuilder(IRunnerImageBuilder)
//  .labels(java.util.List<java.lang.String>)
//  .memorySize(java.lang.Number)
//  .securityGroups(java.util.List<ISecurityGroup>)
//  .subnetSelection(SubnetSelection)
//  .timeout(Duration)
//  .vpc(IVpc)
    .build();
csharp
using CloudSnorkel;

new LambdaRunnerProviderProps {
    bool DefaultLabels = null,
    RetentionDays LogRetention = null,
    Size EphemeralStorageSize = null,
    string Group = null,
    IRunnerImageBuilder ImageBuilder = null,
    string[] Labels = null,
    double MemorySize = null,
    ISecurityGroup[] SecurityGroups = null,
    SubnetSelection SubnetSelection = null,
    Duration Timeout = null,
    IVpc Vpc = null
};
go
import "github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners"

&cloudsnorkelcdkgithubrunners.LambdaRunnerProviderProps {
	DefaultLabels: *bool,
	LogRetention: github.com/aws/aws-cdk-go/awscdk/v2.aws_logs.RetentionDays,
	EphemeralStorageSize: github.com/aws/aws-cdk-go/awscdk/v2.Size,
	Group: *string,
	ImageBuilder: github.com/CloudSnorkel/cdk-github-runners-go/cloudsnorkelcdkgithubrunners.IRunnerImageBuilder,
	Labels: *[]*string,
	MemorySize: *f64,
	SecurityGroups: *[]github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.ISecurityGroup,
	SubnetSelection: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.SubnetSelection,
	Timeout: github.com/aws/aws-cdk-go/awscdk/v2.Duration,
	Vpc: github.com/aws/aws-cdk-go/awscdk/v2.aws_ec2.IVpc,
}

Properties ​

defaultLabelsdefault_labelsdefaultLabelsDefaultLabelsDefaultLabels ​

defaultLabels?: boolean

default_labels?: bool

defaultLabels?: java.lang.Boolean

DefaultLabels?: bool

DefaultLabels?: *bool

Add default labels based on OS and architecture of the runner.

This will tell GitHub Runner to add default labels like self-hosted, linux, x64, and arm64.

Default: true

logRetentionlog_retentionlogRetentionLogRetentionLogRetention ​

logRetention?: RetentionDays

log_retention?: RetentionDays

logRetention?: RetentionDays

LogRetention?: RetentionDays

LogRetention?: RetentionDays

The number of days log events are kept in CloudWatch Logs.

When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to INFINITE.

Default: logs.RetentionDays.ONE_MONTH

ephemeralStorageSizeephemeral_storage_sizeephemeralStorageSizeEphemeralStorageSizeEphemeralStorageSize ​

ephemeralStorageSize?: Size

ephemeral_storage_size?: Size

ephemeralStorageSize?: Size

EphemeralStorageSize?: Size

EphemeralStorageSize?: Size

The size of the function’s /tmp directory in MiB.

Default: 10 GiB

groupgroupgroupGroupGroup ​

group?: string

group?: str

group?: java.lang.String

Group?: string

Group?: *string

GitHub Actions runner group name.

If specified, the runner will be registered with this group name. Setting a runner group can help managing access to self-hosted runners. It requires a paid GitHub account and organization level runner registration.

The group must exist or the runner will not start.

Users will still be able to trigger this runner with the correct labels. But the runner will only be able to run jobs from repos allowed to use the group.

Default: undefined

imageBuilderimage_builderimageBuilderImageBuilderImageBuilder ​

imageBuilder?: IRunnerImageBuilder

image_builder?: IRunnerImageBuilder

imageBuilder?: IRunnerImageBuilder

ImageBuilder?: IRunnerImageBuilder

ImageBuilder?: IRunnerImageBuilder

Runner image builder used to build Docker images containing GitHub Runner and all requirements.

The image builder must contain the RunnerImageComponent.lambdaEntrypoint() component.

The image builder determines the OS and architecture of the runner.

Default: LambdaRunnerProvider.imageBuilder()

labelslabelslabelsLabelsLabels ​

labels?: string[]

labels?: typing.List[str]

labels?: java.util.List<java.lang.String>

Labels?: string[]

Labels?: *[]*string

GitHub Actions labels used for this provider.

These labels are used to identify which provider should spawn a new on-demand runner. Every job sends a webhook with the labels it's looking for based on runs-on. We match the labels from the webhook with the labels specified here. If all the labels specified here are present in the job's labels, this provider will be chosen and spawn a new runner.

Default: ['lambda']

memorySizememory_sizememorySizeMemorySizeMemorySize ​

memorySize?: number

memory_size?: typing.Union[int, float]

memorySize?: java.lang.Number

MemorySize?: double

MemorySize?: *f64

The amount of memory, in MB, that is allocated to your Lambda function.

Lambda uses this value to proportionally allocate the amount of CPU power. For more information, see Resource Model in the AWS Lambda Developer Guide.

Default: 2048

securityGroupssecurity_groupssecurityGroupsSecurityGroupsSecurityGroups ​

securityGroups?: ISecurityGroup[]

security_groups?: typing.List[ISecurityGroup]

securityGroups?: java.util.List<ISecurityGroup>

SecurityGroups?: ISecurityGroup[]

SecurityGroups?: *[]ISecurityGroup

Security groups to assign to this instance.

Default: public lambda with no security group

subnetSelectionsubnet_selectionsubnetSelectionSubnetSelectionSubnetSelection ​

subnetSelection?: SubnetSelection

subnet_selection?: SubnetSelection

subnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

SubnetSelection?: SubnetSelection

Where to place the network interfaces within the VPC.

Default: no subnet

timeouttimeouttimeoutTimeoutTimeout ​

timeout?: Duration

timeout?: Duration

timeout?: Duration

Timeout?: Duration

Timeout?: Duration

The function execution time (in seconds) after which Lambda terminates the function.

Because the execution time affects cost, set this value based on the function's expected execution time.

Default: Duration.minutes(15)

vpcvpcvpcVpcVpc ​

vpc?: IVpc

vpc?: IVpc

vpc?: IVpc

Vpc?: IVpc

Vpc?: IVpc

VPC to send the runner's outbound traffic through.

The network interfaces never get a public IP, so the subnets need a NAT gateway (or VPC endpoints) to reach GitHub, ECR and CloudWatch. Public subnets won't work.

Default: no VPC, runners get public internet access

Released under the Apache-2.0 License.