
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@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' \
--cli-binary-format raw-in-base64-out \
--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
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 13 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.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.