The Mac environment wasn't ready on my company machine yet.
http://aws.amazon.com/jp/cli/
The way Python pip commands are installed has changed. As you can see from the brew guide, it seems that sudo is required because Mavericks does pass the path where python's easy_install did not pass before.
Is that so. Do you need sudo? Sorry.
command
# install python
brew install python
# install pip command
sudo easy_install pip
# install aws cli
sudo pip install awscli
# set completer
complete -C aws_completer aws
Installation is OK with just this. Set environment variables.
.bash_profile
export AWS_ACCESS_KEY_ID="Your access key"
export AWS_SECRET_ACCESS_KEY="Your secret access key"
Reload
command
source $HOME/.bash_profile
I will try using it.
command
aws s3 ls
If you see a list of buckets, it's working fine. The command line tools are much richer than before, so it's convenient, but I can't deny that it's difficult to use unless there are too many options and suggestions on tabs.
It's nice to see more s3 commands compared to java command line tools. Basic commands such as ls, cp, rm, mv can be used, and mb (make bucket) and rb (remove bucket) can be used. You can also use sync to sync the files in the folder.
command
# create bucket
aws s3 mb --region=ap-northeast-1 s3://testcreatebucketforpcli
# ls
aws s3 ls s3://testcreatebucketforpcli
# sync local to s3
aws s3 --region=ap-northeast-1 sync . s3://testcreatebucketforpcli/tmp
You can do more than java command line tools. It's nice to have an s3 command, but it's still difficult to use because it feels like it's still there.
Personally, I would like to think about what kind of interface is easy to use in the future.
Recommended Posts