Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@clickup/instance-to-ami-cdk
Advanced tools
A CDK construct to create an AMI from a healthy Instance time to time and update the Launch Template with it
See also full API documentation.
The main idea behind InstanceToAmi CDK construct:
Usage example in CDK (myASG
of type AutoScalingGroup/CfnAutoScalingGroup and
myLT
of type LaunchTemplate/CfnLaunchTemplate should be created earlier in
your CDK code):
class MyStack extends Stack {
constructor(...) {
...
const myLT = new LaunchTemplate(...); // or CfnLaunchTemplate
const myASG = new AutoScalingGroup(...); // or CfnAutoScalingGroup
...
new InstanceToAmi(this, "InstanceToAmi", {
name: "instance-to-ami",
autoScalingGroups: [{
autoScalingGroup: myASG,
launchTemplate: myLT,
}],
addToRoles: [myInstanceRole]
});
}
}
To execute that state machine on a healthy Instance:
aws lambda invoke \
--function-name 'instance-to-ami' \
--payload '{"instanceId":"i-1234567890","deps":"my-deps","minIntervalSec":3600}' \
/dev/stdout | jq -s '.[0]'
Example of the result:
Or, if it's running already (concurrent runs protection):
You may optionally pass deps
parameter which describes some post-boot
downloadable state of the Instance (e.g. the list of Docker image ids downloaded
by that Instance after it's booted). If the value of deps
is seen the 1st time
within the succeeded Executions, then the Lambda will not try to throttle the
runs (i.e. "ran-recently-so-skipped" and "already-running" states will not
happen, it will always start the Snapshot creation).
Generating a Snapshot and an Image typically takes ~10 minutes (it happens in background after the Lambda returns in ~5 seconds). In the end, the Launch Template and the Auto Scaling Group of the Instance you provided will be updated.
The library also exposes several helper functions useful in cloud-init scripts:
FAQs
A CDK construct to create an AMI from a healthy Instance time to time and update the Launch Template with it
The npm package @clickup/instance-to-ami-cdk receives a total of 3 weekly downloads. As such, @clickup/instance-to-ami-cdk popularity was classified as not popular.
We found that @clickup/instance-to-ami-cdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.