Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
cdk-eks-spotblocks
is a JSII construct library for AWS CDK to provison Amazon EKS cluster with EC2 Spot Blocks
for defined workloads with the advantages of ensured availability and considerable price reduction for your kubernetes workload.
aws-eks
construct libraries by extending its capabilitiesaddSpotFleet()
to create your spot fleet for your clusterblockDuration
, validFrom
and validUntil
for fine-graned controlimport * as eksspot from 'eks-spot-blocks';
import * as cdk from '@aws-cdk/core';
import * as ec2 from '@aws-cdk/aws-ec2';
const clusterStack = new eksspot.EksSpotCluster(stack, 'Cluster', {
clusterVersion: eks.KubernetesVersion.V1_16,
});
clusterStack.addSpotFleet('FirstFleet', {
blockDuration: eksspot.BlockDuration.SIX_HOURS,
targetCapacity: 1,
defaultInstanceType: new ec2.InstanceType('p3.2xlarge'),
validUntil: clusterStack.addHours(new Date(), 6).toISOString(),
terminateInstancesWithExpiration: true
})
clusterStack.addSpotFleet('SecondFleet', {
blockDuration: eksspot.BlockDuration.ONE_HOUR,
targetCapacity: 2,
defaultInstanceType: new ec2.InstanceType('c5.large'),
validUntil: clusterStack.addHours(new Date(), 1).toISOString(),
terminateInstancesWithExpiration: true
})
check eks-spot-blocks-demo for a full AWS CDK demo with this construct library.
const clusterStack = new EksSpotCluster(stack, 'Cluster', {
clusterVersion: eks.KubernetesVersion.V1_16,
customAmiId: 'ami-xxxxxx'
});
eks-spot-blocks
support existing eks clusters created by eksctl
, terraform
or any other tools?No. This construct library does not support existing Amazon EKS clusters. You have to create the cluster as well as the spot fleet altogether in this construct library.
Python
and Java
?Not at this moment. But we plan to publish this construct with JSII
so we can install this library via npm
, pypi
, maven
or nuget
.
You can block the fleet with hourly increments up to 6 hours.
blockDuration
?Spot Blocks ensure the availability of your spot instances during the blockDuration
and avoid termination during the price disruption. After the blockDuration
, by default, your spot instances will still be in running
state but it doesn't ensure the availability, which means it might be terminated anytime after the blockDuration
.
blockDuration
to save the money?Yes. Basically you can configure validFrom
, validUntil
and terminateInstancesWithExpiration
to achieve this.
However, consider the following scenario
<deploy start at 1:00>|--------(one hour)-----------------------|<2:00>
|<fleet created at 1:05>--------(one-hour block)-------|<2:05>
Your fleet will be terminated at 2:00
rather at 2:05
.
tains
and labels
supported?Yes.
(samples TBD)
Yes. Including Beijing(cn-north-1
) and Ningxia(cn-northwest-1
).
According to this document
Spot Instances are also available to run for a predefined duration – in hourly increments up to six hours in length – at a discount of up to 30-50% compared to On-Demand pricing.
aws-eks
construct library?Probably. As it's still in the preliminary stage, we are still collecting feedbacks from the community to make eks-spot-blocks
ready for production workloads. Eventually we will commit this feature to the upstream aws-eks
construct library in AWS CDK through pull requests.
FAQs
A sample JSII construct lib for AWS CDK
We found that eks-spot-blocks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.