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.1.tar.gz
(22.1 kB
view hashes)
Built Distribution
Close
Hashes for cdk_ec2spot-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31db7ca12e2955dd78177d633f9c2efad922e7334a7c5b4cfb0baccc2b5bf8e7 |
|
MD5 | fc3a96cbbe821fd6708765d959703ba9 |
|
BLAKE2b-256 | 63b7dba48c0c25666d0b7bf77f37fd17968c1dc0df166c0ccc77bffd2cd551d3 |