SlideShare a Scribd company logo
1 of 63
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS re:INVENT
AWS CLI: 2017 and Beyond
K y l e K n a p p , A m a z o n W e b S e r v i c e s
N o v e m b e r 2 9 , 2 0 1 7
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Unified tool to manage AWS services
AWS Command Line Interface
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
$ aws s3api list-buckets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
$ aws s3api list-buckets
{
"Owner": {...},
"Buckets": [
{
"CreationDate": "2017-01-31T22:34:19.000Z",
"Name": “mybucket"
}
]
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
botocore
$ aws s3api list-buckets
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
CLI arguments: [s3api, list-buckets]
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS CLI
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
Client call:
# Python code
response = s3_client.list_buckets()
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
Endpoint URL: https://s3-us-west-2.amazonaws.com
HTTP request method: GET
HTTP request headers:
X-Amz-Content-SHA256: e3b0c44298fc1c149afb…
X-Amz-Date: 20171112T194250Z
Authorization: AWS4-HMAC-SHA256 Credential=…
HTTP request body: None
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
HTTP_RESPONSE
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
HTTP response status code: 200
HTTP resonse headers:
x-amz-id-2: Fu6qoG5k/iJvkz…
server: AmazonS3
transfer-encoding: chunked
x-amz-request-id: 9E682628048A343652
date: Sun, 12 Nov 2017 19:42:50 GMT
content-type': application/xml
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
HTTP_RESPONSE
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
HTTP response body:
<?xml version="1.0" encoding="UTF-8"?>
<ListAllMyBucketsResult xmlns="http://s3.amazonaws...">
<Owner>...</Owner>
<Buckets>
<Bucket>...</Bucket>
</Buckets>
</ListAllMyBucketsResult>
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
PARSED_RESPONSE HTTP_RESPONSE
CLI_ARGUMENTS
botocore
$ aws s3api list-buckets
Parsed response:
{
"Owner": {...},
"Buckets": [{...}]
}
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
PARSED_RESPONSE HTTP_RESPONSE
CLI_ARGUMENTS
botocore
CLI_RC
$ aws s3api list-buckets
Return code: 0
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
PARSED_RESPONSE HTTP_RESPONSE
CLI_ARGUMENTS
botocore
CLI_RC
API_CALL
$ aws s3api list-buckets
{
"Owner": {...},
"Buckets": [
{
"CreationDate": "2017-01-31T22:34:19.000Z",
"Name": “mybucket"
}
]
}
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
PARSED_RESPONSE HTTP_RESPONSE
SIGNATURE_DATAAPI_CALLCLI_ARGUMENTS
CLI_RC
--debug
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HTTP_REQUEST
AWS CLI
PARSED_RESPONSE HTTP_RESPONSE
CLI_ARGUMENTS
botocore
CLI_RC
--debug
API_CALL
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 cli_history
 aws history show
 aws history list
 Providing credentials
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Credential chain
export AWS_ACCESS_KEY_ID=...
~/.aws/credentials
~/.aws/config
Amazon EC2 Instance
Metadata
Amazon ECS
container
credentials
Credential chain
AWS CLI
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Credential chain
Credential chain
AWS credentials AWS CLI
$ aws s3 ls
export AWS_ACCESS_KEY_ID=...
~/.aws/credentials
~/.aws/config
Amazon EC2 Instance
Metadata
Amazon ECS
container
credentials
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Credential chain
export AWS_ACCESS_KEY_ID=...
~/.aws/credentials
~/.aws/config
Amazon EC2 Instance
Metadata
Amazon ECS
container
credentials
Credential chain
AWS SDK for Python
Custom credential provider
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Credential chain
export AWS_ACCESS_KEY_ID=...
~/.aws/credentials
~/.aws/config
Amazon EC2 Instance
Metadata
Amazon ECS
container
credentials
Credential chain
AWS CLI
Custom credential provider
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Credential chain
export AWS_ACCESS_KEY_ID=...
~/.aws/credentials
~/.aws/config
Amazon EC2 Instance
Metadata
Amazon ECS
container
credentials
Credential chain
AWS CLI
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
~ / . a w s / c o n f i g
[default]
aws_access_key_id = AKIDF...
aws_secret_access_key = 1rHl...
[profile dev]
credential_process = /usr/local/bin/awscreds-custom
AWS CLI
$ aws s3 ls --profile dev
stdout (rc=0)
{
“AccessKeyId”: “ADIF...”,
“SecretAccessKey”: “2rFt...”,
“Version”: 1
}
InvokeProcess(/usr/local/bin/awscreds-custom)
awscreds-custom
AWS
credentials
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SAML
AssumeRoleWithSAML
LDAP identity store Identity provider (IdP)
role
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
SAML
AssumeRoleWithSAML
LDAP identity store Identity provider (IdP)
role
AWS CLI
saml-creds
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple account structure
org account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple account structure
org account
team account team account team account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple account structure
org account
team account team account team account
role
AssumeRole
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Assume role
[profile admin-org-account]
aws_access_key_id = AKIDF...
aws_secret_access_key = 1rHl...
[profile admin-team-account]
source_profile = admin-org-account
role_arn = arn:...:role/admin-team-account
~/.aws/config
$ aws s3 ls --profile admin-team-account
admin-team-account role
AssumeRole
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple account structure
org account
team account team account team account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multiple account structure
org account
team account team account team account
project account project account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Assume role
[profile admin-org-account]
aws_access_key_id = AKIDF...
aws_secret_access_key = 1rHl...
[profile admin-team-account]
source_profile = admin-org-account
role_arn = arn:...:role/admin-team-account
[profile admin-project-account]
source_profile = admin-team-account
role_arn = arn:...admin-project-account
~/.aws/config
$ aws s3 ls --profile admin-project-account
admin-team-account role
admin-project-account role
AssumeRole
AssumeRole
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Assume role
[profile admin-team-account]
credential_source = Ec2InstanceMetadata
role_arn = arn:...role/admin-team-account
~/.aws/config
$ aws s3 ls --profile admin-team-account
admin-team-account role
Amazon EC2 Instance
Metadata
AssumeRole
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Assume role
[profile admin-team-account]
credential_source = EcsContainer
role_arn = arn:...role/admin-team-account
~/.aws/config
AssumeRole
Amazon ECS
container
credentials
admin-team-account role
$ aws s3 ls --profile admin-team-account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Assume role
[profile admin-team-account]
credential_source = Environment
role_arn = arn:...role/admin-team-account
~/.aws/config
AssumeRole
export AWS_ACCESS_KEY_ID=...
admin-team-account role
$ aws s3 ls --profile admin-team-account
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 credential_process
 source_profile
 credential_source
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 Amazon S3
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
aws s3 cp
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[default]
region = us-east-1
~/.aws/config
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[default]
region = us-east-1
s3 =
max_concurrent_requests = 20
multipart_chunksize = 16MB
multipart_threshold = 64MB
max_queue_size = 10000
~/.aws/config
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
[default]
region = us-east-1
s3 =
max_concurrent_requests = 20
multipart_chunksize = 16MB
multipart_threshold = 64MB
max_queue_size = 10000
~/.aws/config
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
max_concurrent_requests = 3
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
max_concurrent_requests = 4
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
Thread 3
IO Thread
IO Queue
Thread 4
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
max_concurrent_requests = 2
Amazon S3 bucket
AWS CLI
Thread pool
Disk
Thread 1
Thread 2
IO Thread
IO Queue
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 Providing credentials
 Amazon S3
 max_bandwidth
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Improvements in 2017
 Debugging
 cli_history
 aws history show
 aws history list
 Providing credentials
 credential_process
 source_profile
 credential_source
 Amazon S3
 max_bandwidth
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Helpful Links
• AWS CLI repository: https://github.com/aws/aws-cli
• Process providers: https://github.com/awslabs/awsprocesscreds/
• re:Invent scripts: https://github.com/awslabs/awscli-reinvent-examples
• AWS CLI Blog: https://aws.amazon.com/blogs/developer/category/cli/
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you!
@ t h e k y l e k n a p p

More Related Content

What's hot

AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...
AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...
AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...Amazon Web Services
 
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksContainers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksAmazon Web Services
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateAmazon Web Services
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Amazon Web Services
 
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Amazon Web Services
 
Building Global Serverless Backends
Building Global Serverless BackendsBuilding Global Serverless Backends
Building Global Serverless BackendsAmazon Web Services
 
CON307_Building Effective Container Images
CON307_Building Effective Container ImagesCON307_Building Effective Container Images
CON307_Building Effective Container ImagesAmazon Web Services
 
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Amazon Web Services
 
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...Using AWS Management Tools to Enable Governance, Compliance, Operational, and...
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...Amazon Web Services
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksAmazon Web Services
 
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Amazon Web Services
 
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Amazon Web Services
 
CMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSCMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSAmazon Web Services
 
Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Amazon Web Services
 
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017Amazon Web Services
 
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeCTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeAmazon Web Services
 

What's hot (20)

AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...
AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...
AWS Compute: What’s New in Amazon EC2, Containers and Serverless - CMP218 - r...
 
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech TalksContainers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
Containers on AWS: What You Missed at re:Invent 2017 - AWS Online Tech Talks
 
Deep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & FargateDeep Dive into Amazon ECS & Fargate
Deep Dive into Amazon ECS & Fargate
 
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
Moving to Containers: Building with Docker and Amazon ECS - CON310 - re:Inven...
 
Amazon ECS Deep Dive
Amazon ECS Deep DiveAmazon ECS Deep Dive
Amazon ECS Deep Dive
 
Deep dive into AWS fargate
Deep dive into AWS fargateDeep dive into AWS fargate
Deep dive into AWS fargate
 
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
Build a Java Spring Application on Amazon ECS - CON332 - re:Invent 2017
 
Kubernetes on AWS
Kubernetes on AWSKubernetes on AWS
Kubernetes on AWS
 
Building Global Serverless Backends
Building Global Serverless BackendsBuilding Global Serverless Backends
Building Global Serverless Backends
 
CON307_Building Effective Container Images
CON307_Building Effective Container ImagesCON307_Building Effective Container Images
CON307_Building Effective Container Images
 
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017Batch Processing with Containers on AWS - CON304 - re:Invent 2017
Batch Processing with Containers on AWS - CON304 - re:Invent 2017
 
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...Using AWS Management Tools to Enable Governance, Compliance, Operational, and...
Using AWS Management Tools to Enable Governance, Compliance, Operational, and...
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech Talks
 
Deep Dive into AWS Fargate
Deep Dive into AWS FargateDeep Dive into AWS Fargate
Deep Dive into AWS Fargate
 
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
Authoring and Deploying Serverless Applications with AWS SAM - SRV311 - re:In...
 
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
Elastic Load Balancing Deep Dive and Best Practices - NET402 - re:Invent 2017
 
CMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWSCMP209_Getting started with Docker on AWS
CMP209_Getting started with Docker on AWS
 
Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017Containers on AWS - State of the Union - CON201 - re:Invent 2017
Containers on AWS - State of the Union - CON201 - re:Invent 2017
 
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017
Deep Dive into Container Scheduling with Amazon ECS - CON404 - re:Invent 2017
 
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@EdgeCTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
CTD201_Introduction to Amazon CloudFront and AWS Lambda@Edge
 

Similar to AWS CLI: 2017 and Beyond - DEV307 - re:Invent 2017

CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018
CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018
CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018Martijn van Dongen
 
How to use IAM roles grant access to AWS
How to use IAM roles grant access to AWSHow to use IAM roles grant access to AWS
How to use IAM roles grant access to AWSAmazon Web Services
 
Best Practices for Active Directory with AWS Workloads
Best Practices for Active Directory with AWS WorkloadsBest Practices for Active Directory with AWS Workloads
Best Practices for Active Directory with AWS WorkloadsAmazon Web Services
 
Soup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWSSoup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWSAmazon Web Services
 
SRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeSRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeAmazon Web Services
 
GPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through FailureGPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through FailureAmazon Web Services
 
SID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWSSID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWSAmazon Web Services
 
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017Amazon Web Services
 
Deep Dive on Serverless App Development
Deep Dive on Serverless App DevelopmentDeep Dive on Serverless App Development
Deep Dive on Serverless App DevelopmentAmazon Web Services
 
Deep Dive On Serverless App Development
Deep Dive On Serverless App DevelopmentDeep Dive On Serverless App Development
Deep Dive On Serverless App DevelopmentAmazon Web Services
 
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...Amazon Web Services
 
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...Amazon Web Services
 
Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018Teri Radichel
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWSAdrian Hornsby
 
A Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your CloudA Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your CloudAmazon Web Services
 
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...Amazon Web Services
 
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018Amazon Web Services
 
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...Amazon Web Services
 

Similar to AWS CLI: 2017 and Beyond - DEV307 - re:Invent 2017 (20)

CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018
CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018
CloudFormation techniques from the Dutch trenches (DVC07) - AWS re:Invent 2018
 
How to use IAM roles grant access to AWS
How to use IAM roles grant access to AWSHow to use IAM roles grant access to AWS
How to use IAM roles grant access to AWS
 
Best Practices for Active Directory with AWS Workloads
Best Practices for Active Directory with AWS WorkloadsBest Practices for Active Directory with AWS Workloads
Best Practices for Active Directory with AWS Workloads
 
Soup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWSSoup to Nuts: Identity Federation for AWS
Soup to Nuts: Identity Federation for AWS
 
SRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the EdgeSRV312_Taking Serverless to the Edge
SRV312_Taking Serverless to the Edge
 
GPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through FailureGPSTEC302_Anti-Patterns- Learning through Failure
GPSTEC302_Anti-Patterns- Learning through Failure
 
SID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWSSID344-Soup to Nuts Identity Federation for AWS
SID344-Soup to Nuts Identity Federation for AWS
 
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
How to Build a Backend for an Alexa Smart Home Skill - ALX316 - re:Invent 2017
 
Deep Dive on Serverless App Development
Deep Dive on Serverless App DevelopmentDeep Dive on Serverless App Development
Deep Dive on Serverless App Development
 
Deep Dive On Serverless App Development
Deep Dive On Serverless App DevelopmentDeep Dive On Serverless App Development
Deep Dive On Serverless App Development
 
Containers on AWS
Containers on AWSContainers on AWS
Containers on AWS
 
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...
VMware Cloud on AWS: A World of Unique Integrations Between VMware and AWS - ...
 
Federation & Access Management
Federation & Access ManagementFederation & Access Management
Federation & Access Management
 
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...
Unleash the Power of Temporary AWS Credentials (a.k.a. IAM roles) (SEC390-R1)...
 
Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018Red Team vs. Blue Team on AWS ~ re:Invent 2018
Red Team vs. Blue Team on AWS ~ re:Invent 2018
 
Serverless in Action on AWS
Serverless in Action on AWSServerless in Action on AWS
Serverless in Action on AWS
 
A Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your CloudA Practitioners Guide to Securing Your Cloud
A Practitioners Guide to Securing Your Cloud
 
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
Introduction to Version 3 of the AWS SDK for JavaScript (TypeScript) (DEV379-...
 
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018
What's New with the AWS CLI (DEV322-R1) - AWS re:Invent 2018
 
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...
Become a Serverless Black Belt: Optimizing Your Serverless Applications - SRV...
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

AWS CLI: 2017 and Beyond - DEV307 - re:Invent 2017

  • 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS re:INVENT AWS CLI: 2017 and Beyond K y l e K n a p p , A m a z o n W e b S e r v i c e s N o v e m b e r 2 9 , 2 0 1 7
  • 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Unified tool to manage AWS services AWS Command Line Interface
  • 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  Amazon S3
  • 4. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  Amazon S3
  • 5. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI
  • 6. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI $ aws s3api list-buckets
  • 7. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI $ aws s3api list-buckets { "Owner": {...}, "Buckets": [ { "CreationDate": "2017-01-31T22:34:19.000Z", "Name": “mybucket" } ] }
  • 8. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI botocore $ aws s3api list-buckets
  • 9. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI CLI_ARGUMENTS botocore $ aws s3api list-buckets CLI arguments: [s3api, list-buckets]
  • 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CLI CLI_ARGUMENTS botocore $ aws s3api list-buckets Client call: # Python code response = s3_client.list_buckets() API_CALL
  • 11. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI CLI_ARGUMENTS botocore $ aws s3api list-buckets Endpoint URL: https://s3-us-west-2.amazonaws.com HTTP request method: GET HTTP request headers: X-Amz-Content-SHA256: e3b0c44298fc1c149afb… X-Amz-Date: 20171112T194250Z Authorization: AWS4-HMAC-SHA256 Credential=… HTTP request body: None API_CALL
  • 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI HTTP_RESPONSE CLI_ARGUMENTS botocore $ aws s3api list-buckets HTTP response status code: 200 HTTP resonse headers: x-amz-id-2: Fu6qoG5k/iJvkz… server: AmazonS3 transfer-encoding: chunked x-amz-request-id: 9E682628048A343652 date: Sun, 12 Nov 2017 19:42:50 GMT content-type': application/xml API_CALL
  • 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI HTTP_RESPONSE CLI_ARGUMENTS botocore $ aws s3api list-buckets HTTP response body: <?xml version="1.0" encoding="UTF-8"?> <ListAllMyBucketsResult xmlns="http://s3.amazonaws..."> <Owner>...</Owner> <Buckets> <Bucket>...</Bucket> </Buckets> </ListAllMyBucketsResult> API_CALL
  • 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI PARSED_RESPONSE HTTP_RESPONSE CLI_ARGUMENTS botocore $ aws s3api list-buckets Parsed response: { "Owner": {...}, "Buckets": [{...}] } API_CALL
  • 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI PARSED_RESPONSE HTTP_RESPONSE CLI_ARGUMENTS botocore CLI_RC $ aws s3api list-buckets Return code: 0 API_CALL
  • 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI PARSED_RESPONSE HTTP_RESPONSE CLI_ARGUMENTS botocore CLI_RC API_CALL $ aws s3api list-buckets { "Owner": {...}, "Buckets": [ { "CreationDate": "2017-01-31T22:34:19.000Z", "Name": “mybucket" } ] }
  • 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI PARSED_RESPONSE HTTP_RESPONSE SIGNATURE_DATAAPI_CALLCLI_ARGUMENTS CLI_RC --debug
  • 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. HTTP_REQUEST AWS CLI PARSED_RESPONSE HTTP_RESPONSE CLI_ARGUMENTS botocore CLI_RC --debug API_CALL
  • 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  cli_history  aws history show  aws history list  Providing credentials  Amazon S3
  • 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  Amazon S3
  • 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Credential chain export AWS_ACCESS_KEY_ID=... ~/.aws/credentials ~/.aws/config Amazon EC2 Instance Metadata Amazon ECS container credentials Credential chain AWS CLI
  • 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Credential chain Credential chain AWS credentials AWS CLI $ aws s3 ls export AWS_ACCESS_KEY_ID=... ~/.aws/credentials ~/.aws/config Amazon EC2 Instance Metadata Amazon ECS container credentials
  • 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Credential chain export AWS_ACCESS_KEY_ID=... ~/.aws/credentials ~/.aws/config Amazon EC2 Instance Metadata Amazon ECS container credentials Credential chain AWS SDK for Python Custom credential provider
  • 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Credential chain export AWS_ACCESS_KEY_ID=... ~/.aws/credentials ~/.aws/config Amazon EC2 Instance Metadata Amazon ECS container credentials Credential chain AWS CLI Custom credential provider
  • 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Credential chain export AWS_ACCESS_KEY_ID=... ~/.aws/credentials ~/.aws/config Amazon EC2 Instance Metadata Amazon ECS container credentials Credential chain AWS CLI
  • 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. ~ / . a w s / c o n f i g [default] aws_access_key_id = AKIDF... aws_secret_access_key = 1rHl... [profile dev] credential_process = /usr/local/bin/awscreds-custom AWS CLI $ aws s3 ls --profile dev stdout (rc=0) { “AccessKeyId”: “ADIF...”, “SecretAccessKey”: “2rFt...”, “Version”: 1 } InvokeProcess(/usr/local/bin/awscreds-custom) awscreds-custom AWS credentials
  • 28. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 29. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SAML AssumeRoleWithSAML LDAP identity store Identity provider (IdP) role
  • 30. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. SAML AssumeRoleWithSAML LDAP identity store Identity provider (IdP) role AWS CLI saml-creds
  • 31. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 32. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple account structure org account
  • 33. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple account structure org account team account team account team account
  • 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple account structure org account team account team account team account role AssumeRole
  • 35. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Assume role [profile admin-org-account] aws_access_key_id = AKIDF... aws_secret_access_key = 1rHl... [profile admin-team-account] source_profile = admin-org-account role_arn = arn:...:role/admin-team-account ~/.aws/config $ aws s3 ls --profile admin-team-account admin-team-account role AssumeRole
  • 36. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple account structure org account team account team account team account
  • 37. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Multiple account structure org account team account team account team account project account project account
  • 38. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Assume role [profile admin-org-account] aws_access_key_id = AKIDF... aws_secret_access_key = 1rHl... [profile admin-team-account] source_profile = admin-org-account role_arn = arn:...:role/admin-team-account [profile admin-project-account] source_profile = admin-team-account role_arn = arn:...admin-project-account ~/.aws/config $ aws s3 ls --profile admin-project-account admin-team-account role admin-project-account role AssumeRole AssumeRole
  • 39. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Assume role [profile admin-team-account] credential_source = Ec2InstanceMetadata role_arn = arn:...role/admin-team-account ~/.aws/config $ aws s3 ls --profile admin-team-account admin-team-account role Amazon EC2 Instance Metadata AssumeRole
  • 40. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Assume role [profile admin-team-account] credential_source = EcsContainer role_arn = arn:...role/admin-team-account ~/.aws/config AssumeRole Amazon ECS container credentials admin-team-account role $ aws s3 ls --profile admin-team-account
  • 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Assume role [profile admin-team-account] credential_source = Environment role_arn = arn:...role/admin-team-account ~/.aws/config AssumeRole export AWS_ACCESS_KEY_ID=... admin-team-account role $ aws s3 ls --profile admin-team-account
  • 42. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 43. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  credential_process  source_profile  credential_source  Amazon S3
  • 44. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  Amazon S3
  • 45. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 46. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 47. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 48. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 49. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 50. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 51. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 52. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. aws s3 cp Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 53. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. [default] region = us-east-1 ~/.aws/config
  • 54. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. [default] region = us-east-1 s3 = max_concurrent_requests = 20 multipart_chunksize = 16MB multipart_threshold = 64MB max_queue_size = 10000 ~/.aws/config
  • 55. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. [default] region = us-east-1 s3 = max_concurrent_requests = 20 multipart_chunksize = 16MB multipart_threshold = 64MB max_queue_size = 10000 ~/.aws/config
  • 56. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. max_concurrent_requests = 3 Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue
  • 57. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. max_concurrent_requests = 4 Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 Thread 3 IO Thread IO Queue Thread 4
  • 58. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. max_concurrent_requests = 2 Amazon S3 bucket AWS CLI Thread pool Disk Thread 1 Thread 2 IO Thread IO Queue
  • 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Demo
  • 60. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  Providing credentials  Amazon S3  max_bandwidth
  • 61. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Improvements in 2017  Debugging  cli_history  aws history show  aws history list  Providing credentials  credential_process  source_profile  credential_source  Amazon S3  max_bandwidth
  • 62. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Helpful Links • AWS CLI repository: https://github.com/aws/aws-cli • Process providers: https://github.com/awslabs/awsprocesscreds/ • re:Invent scripts: https://github.com/awslabs/awscli-reinvent-examples • AWS CLI Blog: https://aws.amazon.com/blogs/developer/category/cli/
  • 63. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you! @ t h e k y l e k n a p p