Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Cloud Deploy Gcp Aws

ASecurity

Use when a backend or worker service needs a cloud deploy - container-first GitHub Actions deploys to Google Cloud Run (WIF) or AWS ECS/App Runner (OIDC), with migrate-before-deploy and a health-check gate

109 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsrustgoexpressawsgcpgitdatabasebackend

Security Analysis

A100/100

Scanned 10/2/2026

$npx -y skills add makifbaysal/tasktrooper --skill cloud-deploy-gcp-aws --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloud Deploy Gcp Aws?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Cloud Deploy Gcp Aws
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/makifbaysal-cloud-deploy-gcp-aws/badge)](https://www.skillsdirectory.com/skills/makifbaysal-cloud-deploy-gcp-aws)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: cloud-deploy-gcp-aws
category: deployment
description: Use when a backend or worker service needs a cloud deploy - container-first GitHub Actions deploys to Google Cloud Run (WIF) or AWS ECS/App Runner (OIDC), with migrate-before-deploy and a health-check gate
---
# Cloud Deploy — GCP & AWS (backend/worker)

## Overview

A backend deploy ships the **container the repo already builds**, not a re-implementation. The same image runs on Google Cloud Run and on AWS ECS — the deploy workflow only differs in the auth handshake and the deploy command. Read [[ci-cd-pipeline-authoring]] first: it defines the workflow naming/dispatch contract this skill fills in with real cloud steps.

**Core principle:** One image, one health-checked deploy per environment, authenticated by OIDC — never a hand-rolled server or a committed key.

## Pick the target, then copy the boilerplate

1. Decide the cloud (project's existing infra wins) and app type (`backend` or `worker`).
2. `search_boilerplate_catalog` → `deploy gcp backend`, `deploy aws worker`, etc. Copy that folder's `deploy-stage/preprod/prod.yml` into the project's `.github/workflows/` as `<id>-deploy-<env>.yml`.
3. Fill in the repo/environment **vars** its README lists (project id, region, service name, image repo). Set up the OIDC trust once (WIF pool / IAM role) — the README has the exact steps.

## GCP — Cloud Run

- Auth: `google-github-actions/auth` with `workload_identity_provider` + `service_account` (no key JSON).
- Deploy: `gcloud run deploy $SERVICE --image $IMAGE --region $REGION` (or `--source .` to build on deploy). Cloud Run gives you the revision URL to smoke-test.
- Worker (no HTTP ingress): deploy as a Cloud Run **job** (`gcloud run jobs deploy ... && gcloud run jobs execute`) or a GKE workload — not a public service.

## AWS — ECS Express Mode / Fargate

- Auth: `aws-actions/configure-aws-credentials` with `role-to-assume` (OIDC), no access keys.
- **ECS Express Mode** is AWS's recommended default (App Runner stopped accepting new customers on 2026-04-30; existing App Runner services keep working, but don't build new ones there): push the image to ECR, then let Express Mode provision and run the service from it — the simplest path for a single service today.
- **ECS Fargate** (more control over task definitions, scaling, networking): push to ECR, render the task definition, `aws-actions/amazon-ecs-deploy-task-definition` with `wait-for-service-stability: true`.
- Worker: an ECS service with no load balancer / no public subnet.

## Migrate before deploy

- Schema migrations run as a **pre-deploy step against the target environment's database**, gated per environment, before the new image is switched in. A failed migration must fail the workflow before any traffic shift.
- Migrations are forward-only and backward-compatible with the currently-running image (expand/contract) so a rollback of the image doesn't break on the new schema. See [[postgres-migrations]].
- Never point a stage/preprod deploy at the production database. One database per environment; the DB URL comes from that environment's vars/secrets.

## Health-check gate & rollback

- End every deploy job with a smoke step: curl the health endpoint (Cloud Run revision URL / ECS service URL / ALB DNS) and **fail the job on non-200**. A failing smoke step fails the deploy — the release goes `failed` and the release engineer rolls it back; only `finish_release` moves a task to `released`. This workflow's smoke step is a build-time gate, not the release verdict itself.
- Rollback is redeploying the previous image tag/revision — keep deploys immutable-tagged (git SHA), never `:latest`. Put the rollback command in the task's `rollback_plan` field (`update_board_task`) so the release engineer reads it on rollback — that field is posted on the card automatically at deploy time, which a comment is not.

## Common Mistakes

- Deploying `:latest` → no deterministic rollback target. Tag with the commit SHA.
- Running migrations from inside app startup instead of a gated pre-deploy step → half-migrated env on crash-loop.
- Stage deploy sharing the prod database.
- A deploy job that reports success without ever hitting the health endpoint.
- Storing a GCP service-account JSON or AWS access key in `secrets` instead of using OIDC/WIF.
- Standing up a new App Runner service instead of ECS Express Mode — it still works for existing services, but it is closed to new customers.

## Red Flags

- The workflow has no `id-token: write` permission (OIDC can't work).
- No smoke step, or a smoke step whose failure doesn't fail the job.
- Preprod/prod deploy triggers on `push` instead of `workflow_dispatch` (unless the component's delivery profile is genuinely `on_merge`).

Attribution

makifbaysalmakifbaysal
View sourceSee grades on GitHubMore from makifbaysal →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →