Skip to content

Instantly share code, notes, and snippets.

View rifki192's full-sized avatar

Rifki rifki192

  • Bogor, Indonesia
View GitHub Profile
@rifki192
rifki192 / sqsMover.py
Created May 26, 2016 03:39
simple python script for move queue between AWS SQS
conf = {
"sqs-access-key": "",
"sqs-secret-key": "",
"sqs-queue-src": "",
"sqs-queue-dest": "",
"sqs-region": "ap-southeast-1",
}
import boto.sqs
conn = boto.sqs.connect_to_region(
@rifki192
rifki192 / ECS-Container-Autoscale.js
Created June 23, 2016 05:56 — forked from djenriquez/ECS-Container-Autoscale.js
AWS ECS Container Autoscale Lambda function: Create a CloudWatch CPU metric for high and low alarms. Create SNS topics to trigger from each alarm. Subscribe the lambda function to the SNS topics. Let magic happen.
console.log('Loading event');
//Import AWS-SDK
var AWS = require('aws-sdk');
//Fetch the assigned cpu requirements for a task definition
var fetchRequiredCPU = function(taskDefinitionData)
{
var cpu = taskDefinitionData.taskDefinition.containerDefinitions[0].cpu;
return cpu;
};
#!/bin/bash
instanceID=$1
date=$(date +%Y%m%d)
downloadLog () {
local log=$1
aws rds download-db-log-file-portion \
--output text \
@rifki192
rifki192 / requirements.txt
Created November 9, 2016 04:29
Serverless curator elasticsearch ver 3.5.1 (AWS ES Supported)
certifi==2016.8.8
elasticsearch-curator==3.5.1
PyYAML==3.11