Skip to content

LaunchTemplate

Source: src/AWS/AutoScaling/LaunchTemplate.ts

A launch template that preserves the Host authoring model used by AWS.EC2.Instance, but packages that host configuration for use with an Auto Scaling Group.

const template = yield* Effect.gen(function* () {
yield* Http.serve(HttpServerResponse.json({ ok: true }));
return {
main: import.meta.filename,
imageId,
instanceType: "t3.small",
securityGroupIds: [securityGroup.groupId],
port: 3000,
};
}).pipe(
Effect.provide(AWS.EC2.HttpServer),
AWS.AutoScaling.LaunchTemplate("ApiTemplate"),
);