SlideShare a Scribd company logo
$ aws help$ aws help
@benbridts
pip install awsclipip install awscli
$ pip3 install awscli --upgrade --user
$ aws --version
aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore/1.12.243
cat ~/.aws/configcat ~/.aws/config
[default]
output = json
region = eu-west-1
[profile source]
# this is 123456789012
output = json
region = eu-west-1
[profile account1]
source_profile = source
role_arn = arn:aws:iam::111111111111:role/user
mfa_serial = arn:aws:iam::123456789012:mfa/benbridts
cat ~/.aws/configcat ~/.aws/config
[profile source]
# this is 123456789012
output = json
region = eu-west-1
[profile account1]
source_profile = source
role_arn = arn:aws:iam::111111111111:role/user
mfa_serial = arn:aws:iam::123456789012:mfa/benbridts
[profile account2]
source_profile = account1
role_arn = arn:aws:iam::2222222222222:role/user
cat ~/.aws/configcat ~/.aws/config
[profile from-env-source]
# Environment, Ec2InstanceMetadata or EcsContainer
credential_source = Ec2InstanceMetadata
role_arn = arn:aws:iam::2222222222222:role/user
external_id = foobar123
--debug--debug
$ aws iam list-users --debug
[...] Arguments entered to CLI: ['iam', 'list-users', '--debug']
[...] Making request for OperationModel(name=ListUsers) (verify_ssl=True) w
[...] CanonicalRequest:
POST
/
[...]
[...] Response headers: {'x-amzn-requestid': 'ef717a10-c75c-11e8-bd73-cb79e
[...] Response body:
b'<ListUsersResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">n'
[...]
{"Users": [ [...] ]}
--debug--debug
historyhistory
$ aws configure set cli_history enabled
$ aws history list
f95b837e-3040-403c-9f24-7e9524c95f83 2019-10-06 10:06:24 PM iam list-user
094ab0ff-e941-4f3d-b3d3-9d7b2d1a3eab 2019-10-06 10:06:15 PM configure set
[...]
historyhistory
$ aws history show f4692e20-873c-4aa2-9a84-39048132d2f2
AWS CLI command entered
at time: 2019-10-06 22:06:24.166
with AWS CLI version: aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore/
with arguments: ['iam', 'list-users']
historyhistory
[0] API call made
at time: 2019-10-06 22:06:24.267
to service: iam
using operation: ListUsers
with parameters: {}
historyhistory
[0] HTTP request sent
at time: 2019-10-06 22:06:24.270
to URL: https://iam.amazonaws.com/
with method: POST
with headers: {
"Authorization": "...",
"Content-Length": "35",
"Content-Type": "application/x-www-form-urlencoded; charset=utf-8",
"User-Agent": "aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore
"X-Amz-Date": "20191006T200624Z",
"X-Amz-Security-Token": "..."
}
with body: Action=ListUsers&Version=2010-05-08
historyhistory
[0] HTTP response received
at time: 2019-10-06 22:06:24.767
with status code: 200
with headers: {...}
with body: <!--?xml version="1.0" ?-->
<listusersresponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
<listusersresult>
<istruncated>false</istruncated>
<users>
</users></listusersresult>
<responsemetadata>
<requestid>c5fe79e4-e874-11e9-9f4a-d591847819f7</requestid>
</responsemetadata>
</listusersresponse>
historyhistory
[0] HTTP response parsed
at time: 2019-10-06 22:06:24.767
parsed to: {
"IsTruncated": false,
"ResponseMetadata": {
"HTTPHeaders": {
"content-length": "289",
"content-type": "text/xml",
"date": "Sun, 06 Oct 2019 20:06:24 GMT",
"x-amzn-requestid": "c5fe79e4-e874-11e9-9f4a-d59184
},
"HTTPStatusCode": 200,
"RequestId": "c5fe79e4-e874-11e9-9f4a-d591847819f7"
},
"Users": []
historyhistory
AWS CLI command exited
at time: 2019-10-06 22:06:24.770
with return code: 0
cli_follow_urlparamcli_follow_urlparam
$ aws ssm put-parameter 
--name search --value https://google.com --type String
An error occurred (ValidationException) when calling the PutParameter
operation: 1 validation error detected: Value '[...]' at 'value' failed
to satisfy constraint: Member must have length less than or equal to 32768
$ aws configure set cli_follow_urlparam false
$ aws ssm put-parameter 
--name search --value https://google.com --type String
{
"Version": 1
}
s3 --make-it-go-fasts3 --make-it-go-fast
# ~/.aws/config
# https://docs.aws.amazon.com/cli/latest/topic/s3-config.html
[profile example]
s3 =
max_concurrent_requests = 20
max_queue_size = 10000
multipart_threshold = 64MB
multipart_chunksize = 16MB
# this one can make it go slow
max_bandwidth = 50MB/s
# mutualy exclusive
use_accelerate_endpoint = true
use_dualstack_endpoint = false
# ...
aliasalias
# ~/.aws/cli/alias
# https://github.com/awslabs/awscli-aliases
[toplevel]
whoami = sts get-caller-identity
$ aws whoami
{
"UserId": "AIDAIXXXXXXXXXXXXXXXX",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/benbridts"
}
--query--query
$ aws s3api list-buckets | jq -r '.Buckets[].Name'
example-bucket
foobar
bucket3
$ aws s3api list-buckets --query 'Buckets[].Name'
[
"example-bucket",
"foobar",
"bucket3"
]
$ aws s3api list-buckets --query 'Buckets[].Name' --output text
example-bucket foobar bucket3
moremore
bash/zsh/tcsh/fish completion
aws cloudformation wait stack-create-complete
cfn-lint
aws-encryption-cli
aws-shell
aws-vault
git branch -rgit branch -r
whoamiwhoami
$ whoami
Ben Bridts
$ jobs
Principal AWS Technologist at Cloudar
AWS APN Ambassador
$ sendmail ben@cloudar.be
$ curl https://twitter.com/benbridts
$ curl https://cloudar.be

More Related Content

PDF
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
PDF
ZendFramework2 & Symfony2
PDF
OWASP TOP 10 for PHP Programmers
PDF
OWASP Top 10 at International PHP Conference 2014 in Berlin
PDF
Blog Hacks 2011
PPT
SQL Injection in PHP
PPTX
21. CodeIgniter search
PDF
Pemrograman Web 9 - Input Form DB dan Session
WordPress Plugin & Theme Security - WordCamp Melbourne - February 2011
ZendFramework2 & Symfony2
OWASP TOP 10 for PHP Programmers
OWASP Top 10 at International PHP Conference 2014 in Berlin
Blog Hacks 2011
SQL Injection in PHP
21. CodeIgniter search
Pemrograman Web 9 - Input Form DB dan Session

What's hot (19)

PPTX
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
PPTX
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
PDF
Pemrograman Web 8 - MySQL
RTF
Document
PDF
Codeigniter : Two Step View - Concept Implementation
PPTX
Tax management-system
PPTX
Secure PHP Coding - Part 2
PDF
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
PPTX
Sql inyection
PPTX
So cal0365productivitygroup feb2019
PPTX
Secure PHP Coding - Part 1
PDF
Twib in Yokoahma.pm 2010/3/5
PPTX
Prepared Statement 올바르게 사용하기
PDF
Check username availability with vue.js and PHP
PDF
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
PDF
Defeating Cross-Site Scripting with Content Security Policy
PDF
Google drive on linux
PDF
nodum.io MongoDB Meetup (Dutch)
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
Pemrograman Web 8 - MySQL
Document
Codeigniter : Two Step View - Concept Implementation
Tax management-system
Secure PHP Coding - Part 2
エロサイト管理者の憂鬱3 - Hokkaiodo.pm#4 -
Sql inyection
So cal0365productivitygroup feb2019
Secure PHP Coding - Part 1
Twib in Yokoahma.pm 2010/3/5
Prepared Statement 올바르게 사용하기
Check username availability with vue.js and PHP
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Defeating Cross-Site Scripting with Content Security Policy
Google drive on linux
nodum.io MongoDB Meetup (Dutch)
Ad

Similar to Ben Bridts - $ aws help (10)

PDF
Python3 (boto3) for aws
PDF
「リモートペアプロでマントルを突き抜けろ!」AWS Cloud9でリモートペアプロ&楽々サーバーレス開発
PDF
Pwned Cloud Society - BsidesSLC 2017
PPTX
CLI.pptx
PDF
DevOps_project.pdf
PDF
Aws cli
PDF
Aws cli
PDF
Let CodeCommit work for you
PPTX
Deep Dive into AWS CLI - the command line interface
PDF
Hands-On AWS: Java SDK + CLI for Cloud Developers
Python3 (boto3) for aws
「リモートペアプロでマントルを突き抜けろ!」AWS Cloud9でリモートペアプロ&楽々サーバーレス開発
Pwned Cloud Society - BsidesSLC 2017
CLI.pptx
DevOps_project.pdf
Aws cli
Aws cli
Let CodeCommit work for you
Deep Dive into AWS CLI - the command line interface
Hands-On AWS: Java SDK + CLI for Cloud Developers
Ad

More from AWSCOMSUM (20)

PDF
Introducing AWS DeepRacer: David Smith
PDF
Beyond serverless.pptx
PPTX
Will hall - Accelerating Infrastructure as Code and Configuration Management ...
PDF
Onur Salk & Onur Gurdamar - Everything as Code: Creating an application stack...
PDF
Nils Mohr & Jake Pearce - 100 years of flight data at British Airways. Past, ...
PDF
Phil Basford - machine learning at scale with aws sage maker
PDF
Dan pudwell - AWS community summit-oct-2019
PDF
Mike fowler - Getting started with machine learning (london 2019)
PPTX
Efi Merdler Kravitz - 7 things you should know before going serverless
PDF
Michelle Chismon - Anything is possible!* Learning with AWS DeepLens *But not...
PDF
Bernd Rücker - Lost in transaction? Strategies to manage consistency in serve...
PDF
Richard pablo - IoT Provisioning Solving the nightmare
PDF
Matt Houghton - AWS Comsum - October 2019
PDF
Bruno Amaro Almeida - What can aws tell us about fake and credible news medi...
PDF
Serhat Can- 4 keytakeaways from running serverless on production for 4 years
PDF
Stuart jones - Deconstructing the monolith. Migrating complex systems simply ...
PPTX
Dwp achieving cloud adoption at enterprise scale | Diptesh Patel
PDF
RUNNING AWS LOCALLY
PDF
Multi accountstrategy | david lewthwaite
PDF
Serverless for Visual Journalism at the BBC | Doug Winter
Introducing AWS DeepRacer: David Smith
Beyond serverless.pptx
Will hall - Accelerating Infrastructure as Code and Configuration Management ...
Onur Salk & Onur Gurdamar - Everything as Code: Creating an application stack...
Nils Mohr & Jake Pearce - 100 years of flight data at British Airways. Past, ...
Phil Basford - machine learning at scale with aws sage maker
Dan pudwell - AWS community summit-oct-2019
Mike fowler - Getting started with machine learning (london 2019)
Efi Merdler Kravitz - 7 things you should know before going serverless
Michelle Chismon - Anything is possible!* Learning with AWS DeepLens *But not...
Bernd Rücker - Lost in transaction? Strategies to manage consistency in serve...
Richard pablo - IoT Provisioning Solving the nightmare
Matt Houghton - AWS Comsum - October 2019
Bruno Amaro Almeida - What can aws tell us about fake and credible news medi...
Serhat Can- 4 keytakeaways from running serverless on production for 4 years
Stuart jones - Deconstructing the monolith. Migrating complex systems simply ...
Dwp achieving cloud adoption at enterprise scale | Diptesh Patel
RUNNING AWS LOCALLY
Multi accountstrategy | david lewthwaite
Serverless for Visual Journalism at the BBC | Doug Winter

Recently uploaded (20)

PDF
Hybrid model detection and classification of lung cancer
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Encapsulation theory and applications.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Hybrid model detection and classification of lung cancer
Programs and apps: productivity, graphics, security and other tools
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Univ-Connecticut-ChatGPT-Presentaion.pdf
Getting Started with Data Integration: FME Form 101
MIND Revenue Release Quarter 2 2025 Press Release
1. Introduction to Computer Programming.pptx
Tartificialntelligence_presentation.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Zenith AI: Advanced Artificial Intelligence
DP Operators-handbook-extract for the Mautical Institute
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Enhancing emotion recognition model for a student engagement use case through...
1 - Historical Antecedents, Social Consideration.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Hindi spoken digit analysis for native and non-native speakers
A comparative study of natural language inference in Swahili using monolingua...
Encapsulation theory and applications.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Ben Bridts - $ aws help

  • 1. $ aws help$ aws help @benbridts
  • 2. pip install awsclipip install awscli $ pip3 install awscli --upgrade --user $ aws --version aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore/1.12.243
  • 3. cat ~/.aws/configcat ~/.aws/config [default] output = json region = eu-west-1 [profile source] # this is 123456789012 output = json region = eu-west-1 [profile account1] source_profile = source role_arn = arn:aws:iam::111111111111:role/user mfa_serial = arn:aws:iam::123456789012:mfa/benbridts
  • 4. cat ~/.aws/configcat ~/.aws/config [profile source] # this is 123456789012 output = json region = eu-west-1 [profile account1] source_profile = source role_arn = arn:aws:iam::111111111111:role/user mfa_serial = arn:aws:iam::123456789012:mfa/benbridts [profile account2] source_profile = account1 role_arn = arn:aws:iam::2222222222222:role/user
  • 5. cat ~/.aws/configcat ~/.aws/config [profile from-env-source] # Environment, Ec2InstanceMetadata or EcsContainer credential_source = Ec2InstanceMetadata role_arn = arn:aws:iam::2222222222222:role/user external_id = foobar123
  • 6. --debug--debug $ aws iam list-users --debug [...] Arguments entered to CLI: ['iam', 'list-users', '--debug'] [...] Making request for OperationModel(name=ListUsers) (verify_ssl=True) w [...] CanonicalRequest: POST / [...] [...] Response headers: {'x-amzn-requestid': 'ef717a10-c75c-11e8-bd73-cb79e [...] Response body: b'<ListUsersResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">n' [...] {"Users": [ [...] ]}
  • 8. historyhistory $ aws configure set cli_history enabled $ aws history list f95b837e-3040-403c-9f24-7e9524c95f83 2019-10-06 10:06:24 PM iam list-user 094ab0ff-e941-4f3d-b3d3-9d7b2d1a3eab 2019-10-06 10:06:15 PM configure set [...]
  • 9. historyhistory $ aws history show f4692e20-873c-4aa2-9a84-39048132d2f2 AWS CLI command entered at time: 2019-10-06 22:06:24.166 with AWS CLI version: aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore/ with arguments: ['iam', 'list-users']
  • 10. historyhistory [0] API call made at time: 2019-10-06 22:06:24.267 to service: iam using operation: ListUsers with parameters: {}
  • 11. historyhistory [0] HTTP request sent at time: 2019-10-06 22:06:24.270 to URL: https://iam.amazonaws.com/ with method: POST with headers: { "Authorization": "...", "Content-Length": "35", "Content-Type": "application/x-www-form-urlencoded; charset=utf-8", "User-Agent": "aws-cli/1.16.253 Python/3.7.3 Darwin/18.7.0 botocore "X-Amz-Date": "20191006T200624Z", "X-Amz-Security-Token": "..." } with body: Action=ListUsers&Version=2010-05-08
  • 12. historyhistory [0] HTTP response received at time: 2019-10-06 22:06:24.767 with status code: 200 with headers: {...} with body: <!--?xml version="1.0" ?--> <listusersresponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/"> <listusersresult> <istruncated>false</istruncated> <users> </users></listusersresult> <responsemetadata> <requestid>c5fe79e4-e874-11e9-9f4a-d591847819f7</requestid> </responsemetadata> </listusersresponse>
  • 13. historyhistory [0] HTTP response parsed at time: 2019-10-06 22:06:24.767 parsed to: { "IsTruncated": false, "ResponseMetadata": { "HTTPHeaders": { "content-length": "289", "content-type": "text/xml", "date": "Sun, 06 Oct 2019 20:06:24 GMT", "x-amzn-requestid": "c5fe79e4-e874-11e9-9f4a-d59184 }, "HTTPStatusCode": 200, "RequestId": "c5fe79e4-e874-11e9-9f4a-d591847819f7" }, "Users": []
  • 14. historyhistory AWS CLI command exited at time: 2019-10-06 22:06:24.770 with return code: 0
  • 15. cli_follow_urlparamcli_follow_urlparam $ aws ssm put-parameter --name search --value https://google.com --type String An error occurred (ValidationException) when calling the PutParameter operation: 1 validation error detected: Value '[...]' at 'value' failed to satisfy constraint: Member must have length less than or equal to 32768 $ aws configure set cli_follow_urlparam false $ aws ssm put-parameter --name search --value https://google.com --type String { "Version": 1 }
  • 16. s3 --make-it-go-fasts3 --make-it-go-fast # ~/.aws/config # https://docs.aws.amazon.com/cli/latest/topic/s3-config.html [profile example] s3 = max_concurrent_requests = 20 max_queue_size = 10000 multipart_threshold = 64MB multipart_chunksize = 16MB # this one can make it go slow max_bandwidth = 50MB/s # mutualy exclusive use_accelerate_endpoint = true use_dualstack_endpoint = false # ...
  • 17. aliasalias # ~/.aws/cli/alias # https://github.com/awslabs/awscli-aliases [toplevel] whoami = sts get-caller-identity $ aws whoami { "UserId": "AIDAIXXXXXXXXXXXXXXXX", "Account": "123456789012", "Arn": "arn:aws:iam::123456789012:user/benbridts" }
  • 18. --query--query $ aws s3api list-buckets | jq -r '.Buckets[].Name' example-bucket foobar bucket3 $ aws s3api list-buckets --query 'Buckets[].Name' [ "example-bucket", "foobar", "bucket3" ] $ aws s3api list-buckets --query 'Buckets[].Name' --output text example-bucket foobar bucket3
  • 19. moremore bash/zsh/tcsh/fish completion aws cloudformation wait stack-create-complete cfn-lint aws-encryption-cli aws-shell aws-vault
  • 20. git branch -rgit branch -r
  • 21. whoamiwhoami $ whoami Ben Bridts $ jobs Principal AWS Technologist at Cloudar AWS APN Ambassador $ sendmail ben@cloudar.be $ curl https://twitter.com/benbridts $ curl https://cloudar.be