Skip to content

Instantly share code, notes, and snippets.

@kalinchernev
Created October 26, 2018 09:25
Show Gist options
  • Save kalinchernev/52788e980c4b73f854b72a2ff7c59134 to your computer and use it in GitHub Desktop.
Save kalinchernev/52788e980c4b73f854b72a2ff7c59134 to your computer and use it in GitHub Desktop.
const runParams = {
taskDefinition: RUNNER,
launchType: "FARGATE",
networkConfiguration: {
awsvpcConfiguration: {
assignPublicIp: "ENABLED",
subnets: [SUBNET]
}
},
overrides: {
containerOverrides: [
{
environment: [
{
name: "AWS_LAMBDA_HANDLER_EVENT",
value: JSON.stringify(initialMessage)
},
{
name: "AWS_LAMBDA_HANDLER_CONTEXT",
value: JSON.stringify(context)
},
{
name: "AWS_LAMBDA_HANDLER_NAME",
value: handlerData.name
},
{
name: "AWS_LAMBDA_HANDLER_PATH",
value: handlerData.path
}
],
name: RUNNER
}
]
}
};
await ecs.runTask(runParams).promise();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment