Skip to content

Instantly share code, notes, and snippets.

View kavinarvind's full-sized avatar

kavinarvind kavinarvind

View GitHub Profile
@kavinarvind
kavinarvind / AWSFargate_SSM.yml
Created August 16, 2021 22:13
AWS Fargate SSM Document
description: Triggers AWS Lambda Fargate Function
schemaVersion: '0.3'
parameters:
Region:
description: (Required) Name of the Region
type: String
default: us-east-1
Cluster:
description: (Required) Name of the ECS cluster
type: String
@kavinarvind
kavinarvind / AWSFargate_LambdaFunction.js
Created August 16, 2021 22:12
AWSFargate_LambdaFunction
exports.handler = async function (event)
const AWS = require('aws-sdk');
console.log("Starting lambda");
AWS.config.region = event.key4;
const ecs = new AWS.ECS({ apiVersion: '2014-11-13' });
const sns = new AWS.SNS({ apiVersion: '2016-11-15' });
const FARGATE_CLUSTERS = [
{
cluster: event.key1,