SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
AWS Command Line Interface
 (aws-cli)をつかってみた
           #awspad
          2013-02-18

        ひろせ まさあき
自己紹介
• ひろせ まさあき @hirose31
 • インフラエンジニア :D
 • 『サーバ/インフラを支える技術』, 2008
• 最近の関心事
 • NATインスタンスの冗長化 (single subnet, multiAZ)
 • タダでELBを暖機する方法
 • サブネットとかVPCに名前つけたいですぅ
aws-cli?
aws-cli
• 2012-12公開
• 最新 0.5.3 (Developer Preview)
 • http://aws.amazon.com/cli/
 • https://github.com/aws/aws-cli
 • http://docs.aws.amazon.com/cli/latest/
    userguide/cli-chap-welcome.html
aws-cli
          VS
      EC2 API tool
• 1コマンドで複数サービスに対応
• Python (not Java)
• 結果がJSON (textも可)
• bash, zshの補完可能
AWS::CLIWrapper
  Perl module, wrapping aws-cli


use	
  AWS::CLIWrapper;
	
  
my	
  $aws	
  = AWS::CLIWrapper->new;
	
  
my	
  $res	
  = $aws->ec2('describe-instances', {
    instance_ids	
  => ['i-XXXXX', 'i-YYYYY'],
   });
	
  
使い方 / 環境設定
$ export AWS_ACCESS_KEY_ID=<access_key>
$ export AWS_SECRET_ACCESS_KEY=<secret_key>
$ export AWS_DEFAULT_REGION=us-west-2
                        or
$ export AWS_CONFIG_FILE=/path/to/config_file
使い方 / help

$ aws help
$ aws ec2 help
$ aws ec2 describe-instances help
使い方 / 引数
• string
   • そのまま文字列
• list
   •     --instance-ids 'i-AAA' 'i-BBB' (space separaed)
   ×     'i-AAA i-BBB' (NOT quoted as single string)
   ×     'i-AAA, i-BBB' (NOT comma separated)
   ×     '["i-AAA", "i-BBB"]' (NOT JSON)

• structure
   • JSON
• list + structure = space separated + JSON
   • --filters '{"name":"tag:Name","values": ["web*","db*"]}' '{"name"...}'
使い方 / 補完

bash
      $ complete -C aws_completer aws
zsh
      $ source bin/zsh_complete.sh
使い方 / jq
     • jq
      • lightweight and flexible command-line
            JSON processor
        • http://stedolan.github.com/jq/
$ aws ec2 describe-instances | 
  jq '.reservationSet[].instancesSet[] | {instanceId, instanceType}'
{
  "instanceType": "m2.2xlarge",
  "instanceId": "i-AAA"
}
{
  "instanceType": "c1.xlarge",
  "instanceId": "i-BBB"
}
...
おはまり
• AWS_DEFAULT_REGIONが効かない!!
 • 0.5.0で修正
 • https://github.com/aws/aws-cli/pull/36
おはまり
• ec2 create-tagsが動かない!!
 • 0.5.0で修正
 • https://github.com/aws/aws-cli/issues/33
おはまりかも?と思ったら
       aws --debug SERVICE COMMAND ...

$ aws --debug ec2 describe-instances --filters '{"name":"tag:Name","values":
["web*","db*"]}'
...
AWSAccessKeyId=XXX&Action=DescribeInstances&Filter.1.Name=tag%3AName&Filter.1.Value.
1=web%2A&Filter.1.Value.2=db
%2A&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-02-17T15%3A47%3A36.
787450&Version=2012-12-01
...




       で、API リファレンスとにらめっこ
今後
• 対応サービスの追加
          EC2 VPC ELB
           Auto Scaling
           SQS SNS SES
Elastic Beanstalk CloudFormation
               IAM

           S3 RDS Route 53
    CloudFront ElastiCache SimpleDB
             CloudWatch...
今後
• あれ?おかしいな?と思ったら…
 • https://github.com/aws/aws-cli
 • issue
 • pull request
Thanks :D

Contenu connexe

Tendances

Cinnamon - simple deploy tool
Cinnamon - simple deploy toolCinnamon - simple deploy tool
Cinnamon - simple deploy toolYuki Shibazaki
 
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみました
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみましたJAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみました
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみましたTamirlan Torgayev
 
Ruby on Rails on MySQL チューニング入門
Ruby on Rails on MySQL チューニング入門Ruby on Rails on MySQL チューニング入門
Ruby on Rails on MySQL チューニング入門だいすけ さとう
 
おすすめ gem
おすすめ gemおすすめ gem
おすすめ gemchocoby
 
WordPress関数の処理コストを考えよう
WordPress関数の処理コストを考えようWordPress関数の処理コストを考えよう
WordPress関数の処理コストを考えようNaoki Matsuda
 
Jmespathをもっと広めたい
Jmespathをもっと広めたいJmespathをもっと広めたい
Jmespathをもっと広めたいTetsunori Nishizawa
 
サーバーレスアプリケーションの作り方
サーバーレスアプリケーションの作り方サーバーレスアプリケーションの作り方
サーバーレスアプリケーションの作り方Yoichi Toyota
 
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版Masahiro Nagano
 
当社のawsへの取組
当社のawsへの取組当社のawsへの取組
当社のawsへの取組Mercari Inc.
 
Rails3.1rc4を試してみた
Rails3.1rc4を試してみたRails3.1rc4を試してみた
Rails3.1rc4を試してみたTakahiro Hidaka
 
AWS ESC + Ansibleで お手軽 Blue-Green Deployment
AWS ESC + Ansibleで お手軽 Blue-Green DeploymentAWS ESC + Ansibleで お手軽 Blue-Green Deployment
AWS ESC + Ansibleで お手軽 Blue-Green DeploymentKentaro NOMURA
 
同じサービスを ECSとOpsWorksで 運用してみた
同じサービスをECSとOpsWorksで運用してみた同じサービスをECSとOpsWorksで運用してみた
同じサービスを ECSとOpsWorksで 運用してみたJun Ichikawa
 
[東京] JapanSharePointGroup 勉強会 #2
[東京] JapanSharePointGroup 勉強会 #2[東京] JapanSharePointGroup 勉強会 #2
[東京] JapanSharePointGroup 勉強会 #2Atsuo Yamasaki
 
Jaws−横浜ハンズオンーCloudFormation 1/3
Jaws−横浜ハンズオンーCloudFormation 1/3Jaws−横浜ハンズオンーCloudFormation 1/3
Jaws−横浜ハンズオンーCloudFormation 1/3Yasuhiro Araki, Ph.D
 
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」fukuoka.ex
 
Leap MotionとLambdaで「第九」を鳴らしてみる
Leap MotionとLambdaで「第九」を鳴らしてみるLeap MotionとLambdaで「第九」を鳴らしてみる
Leap MotionとLambdaで「第九」を鳴らしてみるTsuyoshi Seino
 

Tendances (20)

Using Windows Azure
Using Windows AzureUsing Windows Azure
Using Windows Azure
 
Cinnamon - simple deploy tool
Cinnamon - simple deploy toolCinnamon - simple deploy tool
Cinnamon - simple deploy tool
 
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみました
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみましたJAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみました
JAWS-UG コンテナ支部 #15 - Amazon ECSの開発環境を動的に管理するツールを作ってみました
 
Ruby on Rails on MySQL チューニング入門
Ruby on Rails on MySQL チューニング入門Ruby on Rails on MySQL チューニング入門
Ruby on Rails on MySQL チューニング入門
 
おすすめ gem
おすすめ gemおすすめ gem
おすすめ gem
 
Amazon ECS事始め
Amazon ECS事始めAmazon ECS事始め
Amazon ECS事始め
 
WordPress関数の処理コストを考えよう
WordPress関数の処理コストを考えようWordPress関数の処理コストを考えよう
WordPress関数の処理コストを考えよう
 
Jmespathをもっと広めたい
Jmespathをもっと広めたいJmespathをもっと広めたい
Jmespathをもっと広めたい
 
PHP on Cloud
PHP on CloudPHP on Cloud
PHP on Cloud
 
サーバーレスアプリケーションの作り方
サーバーレスアプリケーションの作り方サーバーレスアプリケーションの作り方
サーバーレスアプリケーションの作り方
 
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
ISUCONで学ぶ Webアプリケーションのパフォーマンス向上のコツ 実践編 完全版
 
当社のawsへの取組
当社のawsへの取組当社のawsへの取組
当社のawsへの取組
 
Rails3.1rc4を試してみた
Rails3.1rc4を試してみたRails3.1rc4を試してみた
Rails3.1rc4を試してみた
 
AWS ESC + Ansibleで お手軽 Blue-Green Deployment
AWS ESC + Ansibleで お手軽 Blue-Green DeploymentAWS ESC + Ansibleで お手軽 Blue-Green Deployment
AWS ESC + Ansibleで お手軽 Blue-Green Deployment
 
同じサービスを ECSとOpsWorksで 運用してみた
同じサービスをECSとOpsWorksで運用してみた同じサービスをECSとOpsWorksで運用してみた
同じサービスを ECSとOpsWorksで 運用してみた
 
[東京] JapanSharePointGroup 勉強会 #2
[東京] JapanSharePointGroup 勉強会 #2[東京] JapanSharePointGroup 勉強会 #2
[東京] JapanSharePointGroup 勉強会 #2
 
Amazon ElastiCacheのはじめ方
Amazon ElastiCacheのはじめ方Amazon ElastiCacheのはじめ方
Amazon ElastiCacheのはじめ方
 
Jaws−横浜ハンズオンーCloudFormation 1/3
Jaws−横浜ハンズオンーCloudFormation 1/3Jaws−横浜ハンズオンーCloudFormation 1/3
Jaws−横浜ハンズオンーCloudFormation 1/3
 
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」
Elixir入門「第3回:Phoenix 1.3で高速webアプリ & REST APIアプリをサクッと書いてみる」
 
Leap MotionとLambdaで「第九」を鳴らしてみる
Leap MotionとLambdaで「第九」を鳴らしてみるLeap MotionとLambdaで「第九」を鳴らしてみる
Leap MotionとLambdaで「第九」を鳴らしてみる
 

En vedette

AWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAmazon Web Services
 
Titus AWS VPC networking for containers
Titus AWS VPC networking for containersTitus AWS VPC networking for containers
Titus AWS VPC networking for containersAndrew Leung
 
Deep Dive into AWS CLI - the command line interface
Deep Dive into AWS CLI - the command line interfaceDeep Dive into AWS CLI - the command line interface
Deep Dive into AWS CLI - the command line interfaceJohn Varghese
 
Enterprise Application on AWS
Enterprise Application on AWSEnterprise Application on AWS
Enterprise Application on AWSfurbing
 
Continuous delivery and deployment on AWS
Continuous delivery and deployment on AWSContinuous delivery and deployment on AWS
Continuous delivery and deployment on AWSShiva Narayanaswamy
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...Amazon Web Services
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDanilo Poccia
 
AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...Amazon Web Services
 
AWS May 2016 Webinar Series - AWS Services Overview
AWS May 2016 Webinar Series - AWS Services OverviewAWS May 2016 Webinar Series - AWS Services Overview
AWS May 2016 Webinar Series - AWS Services OverviewAmazon Web Services
 
The Fundamentals of Networking in AWS: VPC and Connectivity Options - Business
The Fundamentals of Networking in AWS: VPC and Connectivity Options - BusinessThe Fundamentals of Networking in AWS: VPC and Connectivity Options - Business
The Fundamentals of Networking in AWS: VPC and Connectivity Options - BusinessAmazon Web Services
 
Deep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line InterfaceDeep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line InterfaceAmazon Web Services
 
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish GanesanScale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish GanesanAmazon Web Services
 
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...Amazon Web Services
 
Applying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationApplying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationKacy Clarke
 
Introduction to AWS VPC, Guidelines, and Best Practices
Introduction to AWS VPC, Guidelines, and Best PracticesIntroduction to AWS VPC, Guidelines, and Best Practices
Introduction to AWS VPC, Guidelines, and Best PracticesGary Silverman
 
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShellAmazon Web Services Japan
 
AWS 101: Introduction to AWS
AWS 101: Introduction to AWSAWS 101: Introduction to AWS
AWS 101: Introduction to AWSIan Massingham
 

En vedette (20)

AWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and RavelloAWS Webcast - Continuous integration with AWS and Ravello
AWS Webcast - Continuous integration with AWS and Ravello
 
Titus AWS VPC networking for containers
Titus AWS VPC networking for containersTitus AWS VPC networking for containers
Titus AWS VPC networking for containers
 
Deep Dive into AWS CLI - the command line interface
Deep Dive into AWS CLI - the command line interfaceDeep Dive into AWS CLI - the command line interface
Deep Dive into AWS CLI - the command line interface
 
Enterprise Application on AWS
Enterprise Application on AWSEnterprise Application on AWS
Enterprise Application on AWS
 
Continuous delivery and deployment on AWS
Continuous delivery and deployment on AWSContinuous delivery and deployment on AWS
Continuous delivery and deployment on AWS
 
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...Webinar aws 101   a walk through the aws cloud- introduction to cloud computi...
Webinar aws 101 a walk through the aws cloud- introduction to cloud computi...
 
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and ToolsDeployment and Management on AWS:
 A Deep Dive on Options and Tools
Deployment and Management on AWS:
 A Deep Dive on Options and Tools
 
Perl and AWS
Perl and AWSPerl and AWS
Perl and AWS
 
AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...AWS Webinar: How to architect and deploy a multi tier share point server farm...
AWS Webinar: How to architect and deploy a multi tier share point server farm...
 
AWS May 2016 Webinar Series - AWS Services Overview
AWS May 2016 Webinar Series - AWS Services OverviewAWS May 2016 Webinar Series - AWS Services Overview
AWS May 2016 Webinar Series - AWS Services Overview
 
Overview of AWS Services for your Enterprise
Overview of AWS Services for your Enterprise Overview of AWS Services for your Enterprise
Overview of AWS Services for your Enterprise
 
The Fundamentals of Networking in AWS: VPC and Connectivity Options - Business
The Fundamentals of Networking in AWS: VPC and Connectivity Options - BusinessThe Fundamentals of Networking in AWS: VPC and Connectivity Options - Business
The Fundamentals of Networking in AWS: VPC and Connectivity Options - Business
 
Deep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line InterfaceDeep Dive: AWS Command Line Interface
Deep Dive: AWS Command Line Interface
 
Amazon EC2 Masterclass
Amazon EC2 MasterclassAmazon EC2 Masterclass
Amazon EC2 Masterclass
 
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish GanesanScale New Business Peaks with Amazon AutoScaling - Harish Ganesan
Scale New Business Peaks with Amazon AutoScaling - Harish Ganesan
 
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...AWS September Webinar Series -  Build Cross-Platform Mobile Apps with AWS and...
AWS September Webinar Series - Build Cross-Platform Mobile Apps with AWS and...
 
Applying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migrationApplying systems thinking to AWS enterprise application migration
Applying systems thinking to AWS enterprise application migration
 
Introduction to AWS VPC, Guidelines, and Best Practices
Introduction to AWS VPC, Guidelines, and Best PracticesIntroduction to AWS VPC, Guidelines, and Best Practices
Introduction to AWS VPC, Guidelines, and Best Practices
 
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell
[AWSマイスターシリーズ] AWS CLI / AWS Tools for Windows PowerShell
 
AWS 101: Introduction to AWS
AWS 101: Introduction to AWSAWS 101: Introduction to AWS
AWS 101: Introduction to AWS
 

Similaire à Introduction of aws-cli

AWS Black Belt Tech シリーズ 2015 - AWS Elastic Beanstalk
AWS Black Belt Tech シリーズ 2015 - AWS Elastic BeanstalkAWS Black Belt Tech シリーズ 2015 - AWS Elastic Beanstalk
AWS Black Belt Tech シリーズ 2015 - AWS Elastic BeanstalkAmazon Web Services Japan
 
ナウなヤングにCloud Formationが流行ってほしい
ナウなヤングにCloud Formationが流行ってほしいナウなヤングにCloud Formationが流行ってほしい
ナウなヤングにCloud Formationが流行ってほしいSugawara Genki
 
BCPに活かせ!一撃 CloudFormation
BCPに活かせ!一撃 CloudFormationBCPに活かせ!一撃 CloudFormation
BCPに活かせ!一撃 CloudFormation真吾 吉田
 
⑯jQueryをおぼえよう!その2
⑯jQueryをおぼえよう!その2⑯jQueryをおぼえよう!その2
⑯jQueryをおぼえよう!その2Nishida Kansuke
 
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
AWS Black Belt Online Seminar 2017 AWS Elastic BeanstalkAWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
AWS Black Belt Online Seminar 2017 AWS Elastic BeanstalkAmazon Web Services Japan
 
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法decode2016
 
ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報Kazuki Takai
 
AWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroAWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroVOYAGE GROUP
 
AWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroAWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroKenta Suzuki
 
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAmazon Web Services Japan
 
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきか
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきかElastiCacheを利用する上でキャッシュをどのように有効に使うべきか
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきかAmazon Web Services Japan
 
AWS Black Belt Techシリーズ AWS Command Line Interface
AWS Black Belt Techシリーズ  AWS Command Line InterfaceAWS Black Belt Techシリーズ  AWS Command Line Interface
AWS Black Belt Techシリーズ AWS Command Line InterfaceAmazon Web Services Japan
 
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance Environment
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance EnvironmentJAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance Environment
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance EnvironmentJin k
 
無料セミナー20170321 awsから始めるlinux入門
無料セミナー20170321 awsから始めるlinux入門無料セミナー20170321 awsから始めるlinux入門
無料セミナー20170321 awsから始めるlinux入門Trainocate Japan, Ltd.
 
Programming AWS with Perl at YAPC::Asia 2013
Programming AWS with Perl at YAPC::Asia 2013Programming AWS with Perl at YAPC::Asia 2013
Programming AWS with Perl at YAPC::Asia 2013Yasuhiro Horiuchi
 
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76 2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76 Yasuhiro Horiuchi
 
serverless framework + AWS Lambda with Python
serverless framework + AWS Lambda with Pythonserverless framework + AWS Lambda with Python
serverless framework + AWS Lambda with Pythonmasahitojp
 
20170422 azure portal cli 使いこなし
20170422 azure portal cli 使いこなし20170422 azure portal cli 使いこなし
20170422 azure portal cli 使いこなしTakayoshi Tanaka
 

Similaire à Introduction of aws-cli (20)

AWS Black Belt Tech シリーズ 2015 - AWS Elastic Beanstalk
AWS Black Belt Tech シリーズ 2015 - AWS Elastic BeanstalkAWS Black Belt Tech シリーズ 2015 - AWS Elastic Beanstalk
AWS Black Belt Tech シリーズ 2015 - AWS Elastic Beanstalk
 
ナウなヤングにCloud Formationが流行ってほしい
ナウなヤングにCloud Formationが流行ってほしいナウなヤングにCloud Formationが流行ってほしい
ナウなヤングにCloud Formationが流行ってほしい
 
BCPに活かせ!一撃 CloudFormation
BCPに活かせ!一撃 CloudFormationBCPに活かせ!一撃 CloudFormation
BCPに活かせ!一撃 CloudFormation
 
⑯jQueryをおぼえよう!その2
⑯jQueryをおぼえよう!その2⑯jQueryをおぼえよう!その2
⑯jQueryをおぼえよう!その2
 
AWS運用自動化への第一歩 
AWS運用自動化への第一歩 AWS運用自動化への第一歩 
AWS運用自動化への第一歩 
 
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
AWS Black Belt Online Seminar 2017 AWS Elastic BeanstalkAWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
AWS Black Belt Online Seminar 2017 AWS Elastic Beanstalk
 
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法
DEV-010_エンプラ系業務 Web アプリ開発に効く! 実践的 SPA 型モダン Web アプリ開発の選択手法
 
ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報ArcBox のおさらいと最新情報
ArcBox のおさらいと最新情報
 
AWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroAWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguro
 
AWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguroAWS SDK for Go in #jawsmeguro
AWS SDK for Go in #jawsmeguro
 
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows PowershellAWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
AWS Black Belt Tech シリーズ 2015 AWS CLI & AWS Tools for Windows Powershell
 
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきか
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきかElastiCacheを利用する上でキャッシュをどのように有効に使うべきか
ElastiCacheを利用する上でキャッシュをどのように有効に使うべきか
 
AWS小ネタ集
AWS小ネタ集AWS小ネタ集
AWS小ネタ集
 
AWS Black Belt Techシリーズ AWS Command Line Interface
AWS Black Belt Techシリーズ  AWS Command Line InterfaceAWS Black Belt Techシリーズ  AWS Command Line Interface
AWS Black Belt Techシリーズ AWS Command Line Interface
 
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance Environment
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance EnvironmentJAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance Environment
JAWSDAYS2017 新訳 とあるアーキテクトのクラウドデザインパターン目録 AMI Maintenance Environment
 
無料セミナー20170321 awsから始めるlinux入門
無料セミナー20170321 awsから始めるlinux入門無料セミナー20170321 awsから始めるlinux入門
無料セミナー20170321 awsから始めるlinux入門
 
Programming AWS with Perl at YAPC::Asia 2013
Programming AWS with Perl at YAPC::Asia 2013Programming AWS with Perl at YAPC::Asia 2013
Programming AWS with Perl at YAPC::Asia 2013
 
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76 2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76
2013年 AWSサービスアップデート 一気ふりかえり at BP Study #76
 
serverless framework + AWS Lambda with Python
serverless framework + AWS Lambda with Pythonserverless framework + AWS Lambda with Python
serverless framework + AWS Lambda with Python
 
20170422 azure portal cli 使いこなし
20170422 azure portal cli 使いこなし20170422 azure portal cli 使いこなし
20170422 azure portal cli 使いこなし
 

Plus de Masaaki HIROSE

Redunduncy of NAT instance on AWS/VPC
Redunduncy of NAT instance on AWS/VPCRedunduncy of NAT instance on AWS/VPC
Redunduncy of NAT instance on AWS/VPCMasaaki HIROSE
 
How to inspect a RUNNING perl process
How to inspect a RUNNING perl processHow to inspect a RUNNING perl process
How to inspect a RUNNING perl processMasaaki HIROSE
 
『Ficia』インフラとPerlにまつわるエトセトラ
『Ficia』インフラとPerlにまつわるエトセトラ『Ficia』インフラとPerlにまつわるエトセトラ
『Ficia』インフラとPerlにまつわるエトセトラMasaaki HIROSE
 
Shibuya.pm #9 My First XS
Shibuya.pm #9 My First XSShibuya.pm #9 My First XS
Shibuya.pm #9 My First XSMasaaki HIROSE
 

Plus de Masaaki HIROSE (6)

JVM! JVM! JVM!
JVM! JVM! JVM!JVM! JVM! JVM!
JVM! JVM! JVM!
 
Redunduncy of NAT instance on AWS/VPC
Redunduncy of NAT instance on AWS/VPCRedunduncy of NAT instance on AWS/VPC
Redunduncy of NAT instance on AWS/VPC
 
How to inspect a RUNNING perl process
How to inspect a RUNNING perl processHow to inspect a RUNNING perl process
How to inspect a RUNNING perl process
 
『Ficia』インフラとPerlにまつわるエトセトラ
『Ficia』インフラとPerlにまつわるエトセトラ『Ficia』インフラとPerlにまつわるエトセトラ
『Ficia』インフラとPerlにまつわるエトセトラ
 
Shibuya.pm #9 My First XS
Shibuya.pm #9 My First XSShibuya.pm #9 My First XS
Shibuya.pm #9 My First XS
 
Aio
AioAio
Aio
 

Dernier

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 

Dernier (10)

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 

Introduction of aws-cli

  • 1. AWS Command Line Interface (aws-cli)をつかってみた #awspad 2013-02-18 ひろせ まさあき
  • 2. 自己紹介 • ひろせ まさあき @hirose31 • インフラエンジニア :D • 『サーバ/インフラを支える技術』, 2008 • 最近の関心事 • NATインスタンスの冗長化 (single subnet, multiAZ) • タダでELBを暖機する方法 • サブネットとかVPCに名前つけたいですぅ
  • 4. aws-cli • 2012-12公開 • 最新 0.5.3 (Developer Preview) • http://aws.amazon.com/cli/ • https://github.com/aws/aws-cli • http://docs.aws.amazon.com/cli/latest/ userguide/cli-chap-welcome.html
  • 5. aws-cli VS EC2 API tool • 1コマンドで複数サービスに対応 • Python (not Java) • 結果がJSON (textも可) • bash, zshの補完可能
  • 6. AWS::CLIWrapper Perl module, wrapping aws-cli use  AWS::CLIWrapper;   my  $aws  = AWS::CLIWrapper->new;   my  $res  = $aws->ec2('describe-instances', {     instance_ids  => ['i-XXXXX', 'i-YYYYY'],    });  
  • 7. 使い方 / 環境設定 $ export AWS_ACCESS_KEY_ID=<access_key> $ export AWS_SECRET_ACCESS_KEY=<secret_key> $ export AWS_DEFAULT_REGION=us-west-2 or $ export AWS_CONFIG_FILE=/path/to/config_file
  • 8. 使い方 / help $ aws help $ aws ec2 help $ aws ec2 describe-instances help
  • 9. 使い方 / 引数 • string • そのまま文字列 • list • --instance-ids 'i-AAA' 'i-BBB' (space separaed) × 'i-AAA i-BBB' (NOT quoted as single string) × 'i-AAA, i-BBB' (NOT comma separated) × '["i-AAA", "i-BBB"]' (NOT JSON) • structure • JSON • list + structure = space separated + JSON • --filters '{"name":"tag:Name","values": ["web*","db*"]}' '{"name"...}'
  • 10. 使い方 / 補完 bash $ complete -C aws_completer aws zsh $ source bin/zsh_complete.sh
  • 11. 使い方 / jq • jq • lightweight and flexible command-line JSON processor • http://stedolan.github.com/jq/ $ aws ec2 describe-instances | jq '.reservationSet[].instancesSet[] | {instanceId, instanceType}' { "instanceType": "m2.2xlarge", "instanceId": "i-AAA" } { "instanceType": "c1.xlarge", "instanceId": "i-BBB" } ...
  • 12. おはまり • AWS_DEFAULT_REGIONが効かない!! • 0.5.0で修正 • https://github.com/aws/aws-cli/pull/36
  • 13. おはまり • ec2 create-tagsが動かない!! • 0.5.0で修正 • https://github.com/aws/aws-cli/issues/33
  • 14. おはまりかも?と思ったら aws --debug SERVICE COMMAND ... $ aws --debug ec2 describe-instances --filters '{"name":"tag:Name","values": ["web*","db*"]}' ... AWSAccessKeyId=XXX&Action=DescribeInstances&Filter.1.Name=tag%3AName&Filter.1.Value. 1=web%2A&Filter.1.Value.2=db %2A&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2013-02-17T15%3A47%3A36. 787450&Version=2012-12-01 ... で、API リファレンスとにらめっこ
  • 15. 今後 • 対応サービスの追加 EC2 VPC ELB Auto Scaling SQS SNS SES Elastic Beanstalk CloudFormation IAM S3 RDS Route 53 CloudFront ElastiCache SimpleDB CloudWatch...
  • 16. 今後 • あれ?おかしいな?と思ったら… • https://github.com/aws/aws-cli • issue • pull request