Skip to content

Instantly share code, notes, and snippets.

pgqueme / aws-lambda-update-ecs-service
Last active Aug 12, 2017
Update an AWS ECS Service by updating it's Task Definition. Code works with Environment Variables. Forked from @dennis-tra
View aws-lambda-update-ecs-service
//Original Gist published by dennis-tra
exports.handler = (event, context, callback) => {
var aws = require('aws-sdk');
aws.config.update({region: process.env.ECS_REGION});
var ecs = new aws.ECS();
//Fetching last Task Definition
ecs.describeTaskDefinition({ taskDefinition: process.env.ECS_TASK_NAME }, function(err, data) {