cs.oldnet

All sheets / Cloud & Infra

GCP

GCP services mapped to their AWS equivalents, plus key gcloud commands.

AWS ↔ GCP

AWSGCP
EC2Compute Engine
LambdaCloud Run functions
ECS Fargate / App RunnerCloud Run
EKSGKE (Autopilot)
S3Cloud Storage (GCS)
SQS / SNSPub/Sub
EventBridgeEventarc
DynamoDBFirestore / Bigtable
RDS / AuroraCloud SQL / AlloyDB / Spanner
API GatewayAPI Gateway / Apigee
CloudWatch / X-RayCloud Monitoring, Logging, Trace
IAM rolesIAM + service accounts
CloudFormationDeployment Manager / Terraform
RedshiftBigQuery

Resource hierarchy

Organization → Folders → Projects → resources. IAM policies inherit downward. Billing attaches to projects.

IAM

  • Principals: users, groups, service accounts (workload identity).
  • Roles: basic (Owner/Editor/Viewer, avoid), predefined, custom.
  • Workload Identity Federation: GitHub Actions / AWS → GCP without keys.

Cloud Run

  • Run any container; scales to zero; per-request billing; concurrency up to 1000 per instance.
  • Revisions with traffic splitting (canary): --to-revisions rev-a=90,rev-b=10.
gcloud run deploy api --image us-docker.pkg.dev/proj/repo/api:sha \
  --region us-central1 --allow-unauthenticated --min-instances 1

Pub/Sub

  • Topics + subscriptions (pull or push); at-least-once; ordering keys; DLQ topics.
  • Global service; retention up to 31 days; seek/replay.

gcloud basics

gcloud auth login; gcloud config set project my-proj
gcloud projects list
gcloud compute instances list
gcloud container clusters get-credentials c1 --region us-central1
gsutil cp file gs://bucket/        # or: gcloud storage cp
gcloud logging read 'severity>=ERROR' --limit 20