Amazon Web Services and Microsoft Azure have a CLI tool that developers can use to access as well as manage their various cloud services and solutions. Download AWS CLI: https://awscli.amazonaws.com/AWSCLIV2.msiDownload AZURE CLI: https://learn.microsoft.com/en-us/cli/azure/install-azure-cliFor Complete Walkthrough: https://devopsden.io/article/how-to-install-aws-cliPrerequisites for AWS and Azure CLIPrerequisiteAWS CLIAzure CLIAccountAWS accountAzure accountAccess Keys/SubscriptionAWS Access KeysAzure subscriptionOperating SystemWindows, macOS, LinuxWindows, macOS, LinuxPythonRequired for AWS CLI v1 (Python 2.6.5+ or 3.3+)Optional (bundled Python version available)InstallationPackage managers (pip, Homebrew), direct downloadPackage managers (pip, Homebrew), installation scriptsPermissionsNecessary IAM permissionsNecessary account permissionsUseful Azure CLI CommandsManage Resource Groups and Template DeploymentsCommandDescriptionaz group createCreate a new resource group.az group deleteDelete a resource group.az group deploymentManage Azure Resource Manager deployments.az group deployment cancelCancel a currently running template deployment.az group deployment createStart a deployment.az group deployment deleteDelete a deployment.AuthenticationCommandDescriptionaz loginLog in to Azure.az logoutLog out of Azure.Account ManagementCommandDescriptionaz account showDisplay the details of the current subscription.Virtual MachinesCommandDescriptionaz vm createCreate a new virtual machine.az vm deleteDelete a virtual machine.az vm startStart a stopped virtual machine.az vm stopStop a running virtual machine.az vm listList all virtual machines in a subscription.az vm showShow details of a specific virtual machine.Storage AccountsCommandDescriptionaz storage account createCreate a new storage account.az storage account deleteDelete a storage account.az storage account listList all storage accounts in a subscription.NetworkingCommandDescriptionaz network vnet createCreate a virtual network.az network vnet deleteDelete a virtual network.az network vnet listList virtual networks.az network nsg createCreate a network security group.az network nsg deleteDelete a network security group.az network nsg listList network security groups.Azure Kubernetes Service (AKS)CommandDescriptionaz aks createCreate a new Azure Kubernetes Service (AKS) cluster.az aks deleteDelete an Azure Kubernetes Service (AKS) cluster.az aks listList Azure Kubernetes Service (AKS) clusters.az aks get-credentialsGet access credentials for an AKS cluster.Azure SQL DatabaseCommandDescriptionaz sql server createCreate a new SQL server.az sql server deleteDelete a SQL server.az sql server listList SQL servers.az sql db createCreate a new SQL database.az sql db deleteDelete a SQL database.az sql db listList SQL databases.Azure App ServicesCommandDescriptionaz webapp createCreate a new web app.az webapp deleteDelete a web app.az webapp listList web apps.az webapp startStart a web app.az webapp stopStop a web app.Monitoring and ManagementCommandDescriptionaz monitor metrics listList the metric values for a resource.az monitor alert createCreate a new alert rule.az monitor alert deleteDelete an alert rule.Useful AWS CLI CommandsAuthenticationCommandDescriptionaws configureConfigure AWS CLI with your credentials and settings.aws sts get-caller-identityGet details about the IAM user or role whose credentials are used to call the API.Account ManagementCommandDescriptionaws iam list-usersList all IAM users in the account.aws iam create-userCreate a new IAM user.aws iam delete-userDelete an IAM user.S3 (Simple Storage Service)CommandDescriptionaws s3 lsList all S3 buckets.aws s3 mb s3://<bucket-name>Create a new S3 bucket.aws s3 rb s3://<bucket-name>Delete an S3 bucket.aws s3 cp <source> <destination>Copy files to and from S3 buckets.aws s3 sync <source> <destination>Sync files and directories to and from S3 buckets.EC2 (Elastic Compute Cloud)CommandDescriptionaws ec2 describe-instancesList all EC2 instances.aws ec2 start-instances --instance-ids <instance-id>Start an EC2 instance.aws ec2 stop-instances --instance-ids <instance-id>Stop an EC2 instance.aws ec2 terminate-instances --instance-ids <instance-id>Terminate an EC2 instance.aws ec2 create-key-pair --key-name <key-name>Create a new key pair.RDS (Relational Database Service)CommandDescriptionaws rds describe-db-instancesList all RDS instances.aws rds create-db-instanceCreate a new RDS instance.aws rds delete-db-instance --db-instance-identifier <db-instance-id>Delete an RDS instance.aws rds start-db-instance --db-instance-identifier <db-instance-id>Start an RDS instance.aws rds stop-db-instance --db-instance-identifier <db-instance-id>Stop an RDS instance.IAM (Identity and Access Management)CommandDescriptionaws iam list-usersList all IAM users.aws iam create-user --user-name <user-name>Create a new IAM user.aws iam delete-user --user-name <user-name>Delete an IAM user.aws iam list-rolesList all IAM roles.aws iam create-roleCreate a new IAM role.aws iam delete-role --role-name <role-name>Delete an IAM role.LambdaCommandDescriptionaws lambda list-functionsList all Lambda functions.aws lambda create-functionCreate a new Lambda function.aws lambda delete-function --function-name <function-name>Delete a Lambda function.CloudFormationCommandDescriptionaws cloudformation create-stack --stack-name <stack-name> --template-body <template-body>Create a new stack.aws cloudformation delete-stack --stack-name <stack-name>Delete a stack.aws cloudformation describe-stacksList all stacks.SQS (Simple Queue Service)CommandDescriptionaws sqs create-queue --queue-name <queue-name>Create a new SQS queue.aws sqs delete-queue --queue-url <queue-url>Delete an SQS queue.aws sqs list-queuesList all SQS queues.SNS (Simple Notification Service)CommandDescriptionaws sns create-topic --name <topic-name>Create a new SNS topic.aws sns delete-topic --topic-arn <topic-arn>Delete an SNS topic.aws sns list-topicsList all SNS topics.CloudWatchCommandDescriptionaws cloudwatch list-metricsList CloudWatch metrics.aws cloudwatch put-metric-alarmCreate or update an alarm and associate it with the specified metric.aws cloudwatch delete-alarms --alarm-names <alarm-names>Delete specified alarms.Automate common tasks using Azure and AWS CLI commandsTaskAzure CLIAWS CLICreate VMazure vm create --resource-group myResourceGroup --name myVM --image UbuntuLTS --admin-username azureuseraws ec2 run-instances --image-id ami-0abcdef1234567890 --count 1 --instance-type t2.micro --key-name MyKeyPairList Resourcesazure resource list --resource-group myResourceGroupaws resourcegroupstaggingapi get-resourcesUpload to Storageazure storage blob upload --container-name mycontainer --file myfile.txt --name myfile.txtaws s3 cp myfile.txt s3://mybucket/myfile.txtMonitor Logsazure monitor activity-log list --resource-group myResourceGroupaws logs filter-log-events --log-group-name my-log-groupDelete Resourceazure resource delete --resource-group myResourceGroup --name myResourceaws ec2 terminate-instances --instance-ids i-1234567890abcdef0Sample ScriptsAzure Script to Create and List VMs:#!/bin/bash # Create a VM az vm create \ --resource-group myResourceGroup \ --name myVM \ --image UbuntuLTS \ --admin-username azureuser # List all VMs az vm list --output tableAWS Script to Create and List EC2 Instances:#!/bin/bash # Create an EC2 instance aws ec2 run-instances \ --image-id ami-0abcdef1234567890 \ --count 1 \ --instance-type t2.micro \ --key-name MyKeyPair # List all EC2 instances aws ec2 describe-instances --output tableCommon Issues with Microsoft Azure and AWS CLI CommandsIssueAzure CLI ResolutionAWS CLI ResolutionAuthentication ErrorsEnsure az login is successful and check az account showVerify aws configure settings and IAM permissionsCommand Not FoundEnsure Azure CLI is installed and the path is set correctlyConfirm AWS CLI installation and check the PATH environment variableInsufficient PermissionsCheck role assignments and access policies with az role assignment listReview IAM policies and roles using aws iam list-rolesNetwork IssuesVerify network connectivity and configure proxies if neededCheck VPC, security groups, and internet connectivityRate LimitsImplement retry logic in scripts and check Azure subscription limitsUse exponential backoff in scripts and monitor AWS service limitsResource Not FoundDouble-check resource names and IDs; use az resource listVerify resource IDs and names; use aws resourcegroupstaggingapi get-resourcesInvalid ParametersRefer to Azure CLI documentation for correct parametersUse AWS CLI help (aws <command> help) for correct syntaxTimeoutsIncrease timeout settings with --timeout option in commandsAdjust timeout settings in AWS CLI configurationThank YouRead Morehttps://devopsden.io/article/what-is-microsoft-azureFollow us onhttps://www.linkedin.com/company/devopsden/