New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cdk-spot-one

Package Overview
Dependencies
Maintainers
1
Versions
703
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk-spot-one

EC2 Spot Block with Single Instance and EIP

  • 0.1.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
increased by76.67%
Maintainers
1
Weekly downloads
 
Created
Source

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:

import { SpotFleet } from 'cdk-spot-one';

const fleet = new SpotFleet(stack, 'SpotFleet', {
  targetCapacity: 1,
  instanceInterruptionBehavior: InstanceInterruptionBehavior.HIBERNATE,
  defaultInstanceType: new ec2.InstanceType('c5.large'),
  eipAllocationId: 'eipalloc-0d1bc6d85895a5410',
  vpcSubnet: {
    subnetType: ec2.SubnetType.PUBLIC,
  },
  terminateInstancesWithExpiration: true,
})

// fleet to expire after 6 hours
fleet.expireAfter(Duration.hours(6))

Keywords

FAQs

Package last updated on 18 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc