Skip to content

Ercan Ermis

notes for everyone

Menu
  • AWS
  • Kubernetes
  • Linux
  • DevOps
  • Docker
  • GCP
  • Uncategorized
  • Contact Me
Menu

Differences between AWS CLI v1 and v2

Posted on June 9, 2022July 9, 2022 by Ercan
Share this...
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Reddit
Reddit
Email this to someone
email
Share on StumbleUpon
StumbleUpon
Share on Facebook
Facebook

Sometimes, aws-cli doesn’t run your cli commands if you are using v1. If your aws cli is v1, I should recommend updating. In this article, you’ll learn in which conditions you should use an AWS CLI v2.

AWS CLI v1 is written in Python language and for v1, you should install Python first but if you are using v2, it comes embedded and a Python interpreter is not needed

Auto Prompt feature is amazing! The AWS CLI v2 can prompt you for commands, parameters, and resources when you run an aws command.

You can import your config! Yes, AWS CLI v2 comes with aws configure import option and you can import your .csv credentials generated from the AWS Management Console. A .csv file is imported with the profile name matching the IAM user name. For example aws configure import.

Metadata Support for high-level S3 commands: You can configure additional metadata support for high-level S3 commands with the --copy-props argument.

AWS_REGION: is absolutely a lifesaver! It’s an SDK-compatible variable and it overrides the AWS_DEFAULT_REGION variable on your environment. It’s only available in the AWS CLI.

ddb put and ddb select commands are available on AWS CLI v2 for DynamoDB operations. You can put the items into DynamoDB and search in DynamoDB tables or indexes.

YAML Support: Previously, AWS CLI v1 is only using JSON but in v2, it’s more dynamic for
stream-formats and the yaml.

aws configure list-profiles: You can list all aws cli profiles with one command.

Docker Support: This means you don’t have to install AWS CLI v2 anymore. You can just run the docker container and run your aws cli commands easily. You can run into your CI/CD directly without no worries.

aws logs tail: For CloudWatch Logs groups, you can use aws logs tail command to tails the logs. By default, the command returns logs from all CloudWatch Logs streams during the last 10 minutes.

Single Sign-On: If you are an enterprise user, you probably use an SSO to login to AWS Console. Now, AWS CLI v2 is supporting IdP for sign in requests. For example, maybe you are using the Active Directory or Google Cloud SSO Service. You can also use it via AWS CLI v2.

Client-Side Pager Program: The AWS CLI v2 provides the use of a client-side pager program for output. Default, this feature comes with turned on and returns all output through into your OS default pager program.

Wizards: This is really interesting feature I guess. You can use wizard for some configure, dynamodb, events, iam and lambda. You can follow the example on GitHub. https://github.com/aws/aws-cli/tree/v2/awscli/customizations/wizard/wizards

I hope this article helped you.








Share on Social Media
twitter facebook linkedin reddit
Share this...
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
Share on Reddit
Reddit
Email this to someone
email
Share on StumbleUpon
StumbleUpon
Share on Facebook
Facebook

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Scaling PHP Applications on AWS
  • Create an S3 Bucket and Set a Policy via CLI
  • Issue a Let’s Encrypt SSL with the AWS Route53
  • Automate Let’s Encrypt SSL on AWS Application Load Balancer
  • Let’s Learn Kubernetes – Part 3
  • Deploy a website to S3 and CloudFront with Bitbucket Pipelines
  • Let’s Learn Kubernetes – Part 2
  • Protect your AWS Account with specified IPs
  • Let’s Learn Kubernetes – Part 1
  • Differences between AWS CLI v1 and v2
  • SSL CA Problem on CentOS7 Docker and Solution
  • What do I have?
  • Deploy HA nginx to AWS ECS with Geolocation Routing via Terraform
  • Deploy nginx docker to AWS ECS with Terraform Automation
  • How to Install Node Exporter on Linux Server
  • FortiClient Problem on M1 MacBookPro Problem Solution
  • Connect your AWS to GCP with Terraform via IPSec Site-to-Site VPN
  • Google Cloud Platform Automation with Terraform Easily
  • How to secure your Amazon Web Services account
  • Install UGREEN USB Ethernet Adapter on macOS
  • Redirect 301 HTTPS on App Engine with nginx on Google Cloud Platform
  • Set two different Target Groups on AWS Load Balancer with Terraform
  • Extend your ec2 Linux disk without reboot on Amazon Web Services
  • Create a New Grant User on AWS RDS (MariaDB)
  • Amazon S3 CORS Settings with CloudFront on Amazon Web Services
  • Take your GitLab backup everyday if it works in Docker
  • Find large files in CentOS, ubuntu and MacOS easily
  • Fix “Error: rpmdb open failed” on CentOS or Amazon Linux 2
  • Error: No space left on the device when starting/stopping services only
  • Juniper SRX110H-VA VDSL2 Configuration Step by Step
  • Enable Logrotation for Docker Containers
  • Download specific file extension via wget easily on terminal
  • Find the exact size of certain files in Linux via terminal
  • Disable SELinux on CentOS 7 or CentOS 8
  • Hello Blog!

Tag Cloud

active-active amazon linux 2 amazon web services automation aws basics bucket policy bug centos centos7 cloud cloudfront container container management curl deployment devops docker ec2 ecs fargate file size gcp gitlab google cloud platform internet k8s kubernetes kubernetes architecture kubernetes basics linux macos monitoring node exporter pipeline prometheus reliability router s3 security terraform ubuntu verification method wget yum

Archive

  • August 2022 (1)
  • July 2022 (3)
  • June 2022 (6)
  • March 2022 (1)
  • July 2021 (1)
  • May 2021 (5)
  • April 2021 (5)
  • February 2021 (1)
  • January 2021 (1)
  • September 2020 (2)
  • July 2020 (1)
  • April 2020 (1)
  • March 2020 (1)
  • February 2020 (1)
  • November 2019 (5)
©2022 Ercan Ermis | Built using WordPress and Responsive Blogily theme by Superb