pip install aws-shell
aws-shell
control
+ d
#!/bin/bash | |
# git の remote branch をすべてローカルに clone する | |
# git clone all remote branches locally | |
# https://coderwall.com/p/0ypmka/git-clone-all-remote-branches-locally | |
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do | |
git branch --track ${branch#remotes/origin/} $branch | |
done |
''' | |
Rotate AWS access keys for each profile in the users ${HOME}/.aws/credentials file. | |
Note: the default profile is not altered | |
Author: John Auld | |
''' | |
import configparser | |
import os | |
import boto3 |
# coding: utf-8 | |
# バケットにファイルを作成する | |
import boto | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
AWS_KEY_ID = 'aws_key_id' | |
AWS_SECRET_KEY = 'aws_secret_key' | |
BUCKET_NAME = 'bucket_name' |
### Cloudwatch Events ### | |
# Event rule: Runs at 8pm during working days | |
resource "aws_cloudwatch_event_rule" "start_instances_event_rule" { | |
name = "start_instances_event_rule" | |
description = "Starts stopped EC2 instances" | |
schedule_expression = "cron(0 8 ? * MON-FRI *)" | |
depends_on = ["aws_lambda_function.ec2_start_scheduler_lambda"] | |
} | |
# Runs at 8am during working days |