This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "aws-sdk-core" | |
require "json" | |
ami_list = { "AWSAmazonLinuxAMI" => {} } | |
aws = Aws::EC2::Client.new(:region => 'us-east-1') | |
aws.describe_regions.regions.each do |region| | |
#next unless region.region_name == "ap-northeast-1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
//requires | |
var request = require('request'); | |
require('request').debug = true | |
var aws = require('aws-sdk'); | |
var async = require('async'); | |
//consts | |
var bucket_name = 'S3_BUCKET_NAME'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Activate Cloudtrail and create S3 Bucket in each region. | |
# Usage: ./activate.rb --profile <profile_name> | |
# or | |
# Usage: ./activate.rb -k <access_key> -s <secret_key> | |
require 'aws-sdk-v1' | |
require 'optparse' | |
begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'aws-sdk-v1' | |
require 'optparse' | |
def create_ssh_config(region, profile_name = '', ptr_records = {}) | |
AWS.memoize do | |
region.vpcs.each do |vpc| | |
# Exist bastion server in VPC? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'optparse' | |
require 'logger' | |
require 'yaml' | |
begin | |
require 'aws/profile_parser' | |
rescue LoadError; end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'optparse' | |
require 'logger' | |
require 'yaml' | |
begin | |
require 'aws/profile_parser' | |
rescue LoadError; end |
NewerOlder