CDK construct library for EC2 Spot
Project description
cdk-ec2spot
CDK construct library that allows you to create EC2 Spot instances with AWS AutoScaling Group or SpotFleet
Sample
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
import cdk_ec2spot as ec2spot
# create a ec2spot provider
provider = ec2spot.Provider(stack, "Provider")
# import or create a vpc
vpc = provider.get_or_create_vpc(stack)
# create an AutoScalingGroup with Launch Template for spot instances
provider.create_auto_scaling_group("SpotASG",
vpc=vpc,
default_capacity_size=2,
instance_type=ec2.InstanceType("m5.large")
)
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-ec2spot-0.0.10.tar.gz
(47.6 kB
view hashes)
Built Distribution
Close
Hashes for cdk_ec2spot-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fea6bc31e6ab30f76e2a25e7ede05541609c141fe5949853f3be8ba44990c116 |
|
MD5 | ee5a7cb65e7ff5a19e6359cc8ea2fa12 |
|
BLAKE2b-256 | b656ec94c5d09ab18605b0837728d2215a2697b580168b6be4c250b846ad689d |