All sheets / Cloud & Infra
GCP
GCP services mapped to their AWS equivalents, plus key gcloud commands.
AWS ↔ GCP
| AWS | GCP |
|---|---|
| EC2 | Compute Engine |
| Lambda | Cloud Run functions |
| ECS Fargate / App Runner | Cloud Run |
| EKS | GKE (Autopilot) |
| S3 | Cloud Storage (GCS) |
| SQS / SNS | Pub/Sub |
| EventBridge | Eventarc |
| DynamoDB | Firestore / Bigtable |
| RDS / Aurora | Cloud SQL / AlloyDB / Spanner |
| API Gateway | API Gateway / Apigee |
| CloudWatch / X-Ray | Cloud Monitoring, Logging, Trace |
| IAM roles | IAM + service accounts |
| CloudFormation | Deployment Manager / Terraform |
| Redshift | BigQuery |
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 1Pub/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