JumpHost.
import { JumpBox } from '@time-loop/cdk-jump-box'
new JumpBox(scope: Construct, id: Namer, props: JumpBoxProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
No description. |
id |
multi-convention-namer.Namer |
No description. |
props |
JumpBoxProps |
No description. |
- Type: constructs.Construct
- Type: multi-convention-namer.Namer
- Type: JumpBoxProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { JumpBox } from '@time-loop/cdk-jump-box'
JumpBox.isConstruct(x: any)
Checks if x
is a construct.
Use this method instead of instanceof
to properly detect Construct
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the constructs
library on
disk are seen as independent, completely different libraries. As a
consequence, the class Construct
in each copy of the constructs
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the constructs
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
asg |
aws-cdk-lib.aws_autoscaling.IAutoScalingGroup |
No description. |
keyPair |
cdk-ec2-key-pair.KeyPair |
No description. |
role |
aws-cdk-lib.aws_iam.IRole |
No description. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
No description. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly asg: IAutoScalingGroup;
- Type: aws-cdk-lib.aws_autoscaling.IAutoScalingGroup
public readonly keyPair: KeyPair;
- Type: cdk-ec2-key-pair.KeyPair
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
import { JumpBoxProps } from '@time-loop/cdk-jump-box'
const jumpBoxProps: JumpBoxProps = { ... }
Name | Type | Description |
---|---|---|
vpc |
aws-cdk-lib.aws_ec2.IVpc |
Which VPC should the jumpbox be in? |
desiredCapacity |
number |
the desired capacity of the auto scaling group. |
instanceType |
aws-cdk-lib.aws_ec2.InstanceType |
No description. |
keyPair |
cdk-ec2-key-pair.KeyPair |
You must provide either a keypair or a kmsKey. |
kmsKey |
aws-cdk-lib.aws_kms.Key |
You must provide either a keypair or a kmsKey. |
machineImage |
aws-cdk-lib.aws_ec2.IMachineImage |
Default to latest Amazon Linux 2022 AMI for ARM64. |
maxCapacity |
number |
the maximum capacity of the auto scaling group. |
minCapacity |
number |
the minimum capacity of the auto scaling group. |
role |
aws-cdk-lib.aws_iam.IRole |
No description. |
securityGroup |
aws-cdk-lib.aws_ec2.ISecurityGroup |
No description. |
sshAccess |
boolean |
No description. |
vpcSubnets |
aws-cdk-lib.aws_ec2.SubnetSelection |
No description. |
public readonly vpc: IVpc;
- Type: aws-cdk-lib.aws_ec2.IVpc
Which VPC should the jumpbox be in?
public readonly desiredCapacity: number;
- Type: number
- Default: undefined
the desired capacity of the auto scaling group.
public readonly instanceType: InstanceType;
- Type: aws-cdk-lib.aws_ec2.InstanceType
- Default: aws_ec2.InstanceType.of(aws_ec2.InstanceClass.T4A,aws_ec2.InstanceSize.NANO)
public readonly keyPair: KeyPair;
- Type: cdk-ec2-key-pair.KeyPair
You must provide either a keypair or a kmsKey.
You must not provide both. If a keyPair is provided, it will simply be used.
public readonly kmsKey: Key;
- Type: aws-cdk-lib.aws_kms.Key
You must provide either a keypair or a kmsKey.
You must not provide both. If a kmsKey is provided, a keyPair will be generated.
Why not auto-generate a key? Jumpboxes exist to provide a route to access secured resources. Those resources MUST be encrypted at rest for compliance reasons. That implies your service already is using a KMS key. These things aren't free. It makes sense to require re-using the key associated with the resource.
public readonly machineImage: IMachineImage;
- Type: aws-cdk-lib.aws_ec2.IMachineImage
- Default: MachineImage.latestAmazonLinux({generation:AmazonLinuxGeneration.AMAZON_LINUX_2022,edition:AmazonLinuxEdition.STANDARD,cpuType:AmazonLinuxCpuType.ARM_64})
Default to latest Amazon Linux 2022 AMI for ARM64.
public readonly maxCapacity: number;
- Type: number
- Default: 1
the maximum capacity of the auto scaling group.
public readonly minCapacity: number;
- Type: number
- Default: 0
the minimum capacity of the auto scaling group.
public readonly role: IRole;
- Type: aws-cdk-lib.aws_iam.IRole
- Default: create a role
public readonly securityGroup: ISecurityGroup;
- Type: aws-cdk-lib.aws_ec2.ISecurityGroup
- Default: create a security group
public readonly sshAccess: boolean;
- Type: boolean
- Default: false implement SSH access
public readonly vpcSubnets: SubnetSelection;
- Type: aws-cdk-lib.aws_ec2.SubnetSelection
- Default: default subnet selection