Metadata-Version: 2.1
Name: cdk-spot-one
Version: 0.1.6
Summary: EC2 Spot Block with Single Instance and EIP
Home-page: https://github.com/pahud/cdk-spot-one.git
Author: Pahud Hsieh<hunhsieh@amazon.com>
License: Apache-2.0
Project-URL: Source, https://github.com/pahud/cdk-spot-one.git
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: JavaScript
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Typing :: Typed
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: jsii (<2.0.0,>=1.9.0)
Requires-Dist: publication (>=0.0.3)
Requires-Dist: aws-cdk.aws-ec2 (==1.52.0)
Requires-Dist: aws-cdk.aws-iam (==1.52.0)
Requires-Dist: aws-cdk.core (==1.52.0)
Requires-Dist: aws-cdk.custom-resources (==1.52.0)
Requires-Dist: constructs (==3.0.4)

# Welcome to `cdk-spot-one`

EC2 Spot Block with Single Instance and EIP

# Sample

Create a single EC2 spot instance for 6 hours with EIP attached:

```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
from cdk_spot_one import SpotFleet

fleet = SpotFleet(stack, "SpotFleet",
    target_capacity=1,
    instance_interruption_behavior=InstanceInterruptionBehavior.HIBERNATE,
    default_instance_type=ec2.InstanceType("c5.large"),
    eip_allocation_id="eipalloc-0d1bc6d85895a5410",
    vpc_subnet={
        "subnet_type": ec2.SubnetType.PUBLIC
    },
    terminate_instances_with_expiration=True
)

# fleet to expire after 6 hours
fleet.expire_after(Duration.hours(6))
```


