#!/bin/sh if [ ! -f ~/.aws/config ]; then mkdir ~/.aws echo -n "AWS_ACCESS_KEY_ID:" read AWS_ACCESS_KEY_ID echo -n "AWS_SECRET_ACCESS_KEY:" read AWS_SECRET_ACCESS_KEY cat << EOM >> ~/.aws/config [default] output = text region = ap-northeast-1 aws_access_key_id = ${AWS_ACCESS_KEY_ID} aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY} EOM chmod 0400 ~/.aws/config cat << EOM >> ~/.aws/credentials [default] aws_access_key_id = ${AWS_ACCESS_KEY_ID} aws_secret_access_key = ${AWS_SECRET_ACCESS_KEY} EOM chmod 0400 ~/.aws/credentials fi
【2014/12/18 AWS CLIの仕様変更につき修正】