Skip to content

Instantly share code, notes, and snippets.

Avatar

Pablo Quemé pgqueme

View GitHub Profile
@pgqueme
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
//https://gist.github.com/dennis-tra/ae0dacbab1576d956bf62b4ab2209f5b
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) {
You can’t perform that action at this time.