Cloud Services
AWS
EC2 (Elastic Compute Cloud)
S3 (Simple Storage Service)
IAM (Identity and Access Management)
Create a role
aws iam create-role --role-name <name> --assume-role-policy-document file://policy.json
VPC (Virtual Private Cloud)
Lambda (Serverless Computing)
Create a function
aws lambda create-function --function-name <name> --runtime <runtime> --role <role> --handler <handler>
Update function code
aws lambda update-function-code --function-name <name> --zip-file fileb://<file>.zip
Amazon EKS (Elastic Kubernetes Service)
Create an EKS cluster
aws eks create-cluster --name my-cluster --role-arn arn:aws:iam::account-id:role/EKSRole --resources-vpc-config subnetIds=subnet-xxxxxxx,securityGroupIds=sg-xxxxxxx
Amazon ECS (Elastic Container Service)
AWS CloudFormation
Create a stack
aws cloudformation create-stack --stack-name my-stack --template-body file://template.yml
CI/CD (CodePipeline, CodeBuild, CodeDeploy)
AWS CodePipeline
AWS CodeBuild
AWS CodeDeploy
Deploy an application
aws deploy create-deployment --application-name MyApp --deployment-group-name MyDeploymentGroup --s3-location bucket=my-bucket,key=app.zip,bundleType=zip
Security & Compliance
Monitoring & Logging (CloudWatch)
Create a CloudWatch alarm
aws cloudwatch put-metric-alarm --alarm-name cpu-high --metric-name CPUUtilization --namespace AWS/EC2 --statistic Average --period 300 --threshold 80 --comparison-operator GreaterThanThreshold --dimensions Name=InstanceId,Value=i-xxxxxxxxxx --evaluation-periods 2 --alarm-actions arn:aws:sns:region:account-id:my-topic
Retrieve log events
aws logs get-log-events --log-group-name my-log-group --log-stream-name my-log-stream
Networking (VPC, ELB, Route 53)
Amazon VPC
Elastic Load Balancer (ELB)
Amazon Route 53
Amazon ECR (Elastic Container Registry)
Authenticate Docker with ECR
aws ecr get-login-password | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
AWS Systems Manager (SSM)
Run a command on an EC2 instance
aws ssm send-command --document-name "AWS-RunShellScript" --targets "Key=instanceIds,Values=i-xxxxxxxxxx" --parameters commands="sudo apt update"
AWS Auto Scaling
Update the desired capacity
aws autoscaling update-auto-scaling-group --auto-scaling-group-name my-asg --desired-capacity 3
Manually scale an Auto Scaling group
aws autoscaling set-desired-capacity --auto-scaling-group-name my-asg --desired-capacity 2
AWS Elastic Beanstalk
Deploy a new version
aws elasticbeanstalk update-environment --environment-name my-env --version-label new-version
AWS Step Functions
Start a state machine execution
aws stepfunctions start-execution --state-machine-arn arn:aws:states:region:account-id:stateMachine:MyStateMachine
Get execution details
aws stepfunctions describe-execution --execution-arn arn:aws:states:region:account-id:execution:MyStateMachine:MyExecution
AWS Glue (ETL Service)
AWS SNS (Simple Notification Service)
Publish a message to an SNS topic
aws sns publish --topic-arn arn:aws:sns:region:account-id:MyTopic --message "Test Message"
AWS SQS (Simple Queue Service)
Send a message
aws sqs send-message --queue-url https://sqs.region.amazonaws.com/account-id/my-queue --message-body "Hello World"
AWS Outposts(Managed on-prem cloud/On-premises AWS)
List and Describe Outposts
Manage Outpost Resources
Deploy and Configure Outposts
Order an Outpost
aws outposts create-order --line-items "[{\"catalogItemId\": \"item-id\", \"quantity\": 1}]" --outpost-id <outpost-id>
Networking and Storage on Outposts
List network devices in an Outpost
aws outposts list-outpost-network-devices --outpost-id <outpost-id>
Deploy EC2 Instances in Outposts
Launch an EC2 instance in Outpost
aws ec2 run-instances --image-id <ami-id> --instance-type <type> --subnet-id <outpost-subnet-id>
Automate Outpost Deployments with CloudFormation
Deploy Outpost resources using CloudFormation
aws cloudformation deploy --template-file outpost-config.yml --stack-name my-outpost-stack
Monitor Outposts with CloudWatch
Monitor CPU usage of Outpost instances
aws cloudwatch get-metric-data --metric-name CPUUtilization --namespace AWS/Outposts
Integrate Outposts with CI/CD
Start a deployment pipeline for Outposts
aws codepipeline start-pipeline-execution --name <pipeline-name>
Start a build process for Outposts workloads
aws codebuild start-build --project-name <build-project>
Deploy an application to an Outpost
aws deploy create-deployment --application-name <app-name> --deployment-group-name <group-name> --s3-location bucket=<bucket-name>,key=<app.zip>,bundleType=zip
Security and Compliance for Outposts
Create an IAM role for Outpost management
aws iam create-role --role-name <role-name> --assume-role-policy-document file://policy.json
Delete or Deactivate an Outpost
Azure
Azure Virtual Machines (VMs)
Azure Storage
Create a storage account
az storage account create --name <storage-name> --resource-group <rg> --location <region>
Create a blob container
az storage container create --name <container-name> --account-name <storage-name>
Upload a file to Blob Storage
az storage blob upload --file <file-path> --container-name <container-name> --account-name <storage-name>
List blobs in a container
az storage blob list --container-name <container-name> --account-name <storage-name>
Azure Kubernetes Service (AKS)
Create an AKS cluster
az aks create --resource-group <rg> --name <aks-name> --node-count <num> --generate-ssh-keys
Azure Functions
Create an Azure Function App
az functionapp create --resource-group <rg> --name <app-name> --consumption-plan-location <region> --runtime <runtime>
Azure Networking
Virtual Network (VNet)
Create a VNet
az network vnet create --name myVNet --resource-group myResourceGroup --subnet-name mySubnet
Network Security Group (NSG)
Load Balancer
Create a Load Balancer
az network lb create --resource-group myResourceGroup --name myLB --sku Standard --frontend-ip-name myFrontend --backend-pool-name myBackendPool
Azure DevOps(CI/CD)
Azure DevOps Projects
Azure Repos (Git)
Azure Pipelines
Create a pipeline
az pipelines create --name myPipeline --repository myRepo --branch main --repository-type gitHub
Azure Monitor & Logging
Azure Monitor
Azure Log Analytics
Create a Log Analytics workspace
az monitor log-analytics workspace create --resource-group myResourceGroup --workspace-name myWorkspace
Security & Compliance
Azure Security Center
Enable auto-provisioning for Security Center
az security setting update --name AutoProvisioning --value On
Azure Key Vault
Create a Key Vault
az keyvault create --name myKeyVault --resource-group myResourceGroup --location eastus
Store a secret in Key Vault
az keyvault secret set --vault-name myKeyVault --name mySecret --value "MySecretValue"
Azure Policies & Governance
Azure Active Directory (AAD)
Azure Backup & Recovery
List backup items
az backup item list --resource-group myResourceGroup --vault-name myBackupVault --output table
GCP
Compute Engine (VMs)
Create a VM instance
gcloud compute instances create <vm-name> --zone=<zone> --machine-type=<type> --image=<image>
Google Kubernetes Engine (GKE)
Get credentials for the GKE cluster
gcloud container clusters get-credentials <cluster-name> --zone=<zone>
Cloud Run (Serverless Containers)
Deploy an application to Cloud Run
gcloud run deploy <service-name> --image=<gcr.io/project/image> --platform=managed --region=<region> --allow-unauthenticated
Update Cloud Run service to the latest image
gcloud run services update-traffic <service-name> --to-latest
Set environment variables in a Cloud Run service
gcloud run services update <service-name> --set-env-vars VAR_NAME=value
Google Cloud Storage (GCS)
Google Cloud IAM (Identity & Access Management)
Assign a role to a user
gcloud projects add-iam-policy-binding PROJECT_ID --member=user:EMAIL --role=roles/editor
Remove a role from a user
gcloud projects remove-iam-policy-binding PROJECT_ID --member=user:EMAIL --role=roles/editor
Google Cloud SQL (Managed Database Service)
Create a Cloud SQL instance
gcloud sql instances create my-db --tier=db-f1-micro --region=us-central1
Google Cloud Build (CI/CD)
Google Cloud Deploy (CI/CD)
Google Cloud Logging & Monitoring
Cloud Logging
Cloud Monitoring
Google Cloud Networking
VPC (Virtual Private Cloud)
Firewall Rules
Load Balancers
Google Cloud Security
Cloud Identity-Aware Proxy (IAP)
Cloud Key Management Service (KMS)
Google Artifact Registry
Create a Docker registry
gcloud artifacts repositories create my-repo --repository-format=docker --location=us-central1