Course overview
Lesson 5 of 8 · 3 promptsAI for Backend Developers
LESSON 05 OF 8

Cloud Deployment Config

3 prompts for Backend Developers

Prompts for Backend Developers: copy one, fill it in, paste it into your AI.

Track progress as a member

In this lesson

  1. 01Draft Production Dockerfile For ServiceUse this when you need a production-ready container for a backend service.
  2. 02Generate a Terraform Resource BlockUse this when you need cloud infrastructure defined as code for a service.
  3. 03Explain Cloud Error From ScreenshotUse this when you have a screenshot of a cloud console error and need likely causes.
1Copy the promptClick Copy on the prompt you need.
2Paste it into your AIChatGPT, Claude, Gemini or Copilot.
3Fill in the {{brackets}}Your own details, or let the AI ask you.
4Follow up and checkUse the follow-ups, then check the facts.
01

Draft Production Dockerfile For Service

Use this when you need a production-ready container for a backend service.

Prompt

Role: You are a backend platform engineer who writes minimal, secure, reproducible Dockerfiles for production services. Optimise for small image size, fast rebuilds and a container that behaves the same in staging and production.

Context you provide:

  • {{service_language_and_version}} - e.g. Node 20, Python 3.12, Go 1.22
  • {{dependency_manifest}} - package.json, requirements.txt, go.mod
  • {{build_command}} - install and compile steps
  • {{start_command}} - how the service boots in production
  • {{runtime_port}} - port the service listens on
  • {{health_check_path}} - endpoint for liveness checks
  • {{base_image_preference}} - distro, slim, alpine, or no preference
  • {{target_platform}} - linux/amd64, linux/arm64 or both
  • {{known_constraints}} - native libraries, private registries, size limits

Instructions:

  1. Ask for any missing inputs, then draft the Dockerfile.
  2. Use a multi-stage build with separate build and runtime stages.
  3. Pin the base image to a specific version tag, never latest.
  4. Create a non-root user and switch to it before the start command.
  5. Copy the dependency manifest first, install, then copy source, so installs cache.
  6. Add a HEALTHCHECK calling the given path on the runtime port.
  7. List the .dockerignore entries that keep the build context small.
  8. Add a one-line note for each choice that is not obvious.

Output format: One fenced Dockerfile block, then a short bullet list of build and run commands, then a .dockerignore block. One-line notes only. No essays or alternative designs unless asked.

Guardrails: Do not invent package names, versions, registry URLs or image tags; ask instead. State every assumption about the base image, platform or build tooling. Tell the user to check the base image's official documentation and their organisation's image and security policy before deploying.

Example: Node 20 with Express, npm ci then npm run build, port 8080, health at /healthz, linux/amd64, no native dependencies.

Open as its own page

02

Generate a Terraform Resource Block

Use this when you need cloud infrastructure defined as code for a service.

Prompt

Role You are a cloud infrastructure engineer who writes Terraform other engineers can review and apply safely. Optimise for a resource block that matches the team's conventions and needs no manual fixes.

Context you provide

  • {{cloud_provider}} - deploy target
  • {{service_name}} - service it supports
  • {{resource_type}} - resource to define
  • {{environment}} - dev, staging or production
  • {{region_or_zone}} - where it runs
  • {{size_or_tier}} - capacity or storage class
  • {{required_settings}} - settings the service needs
  • {{naming_convention}} - team standard
  • {{existing_config}} - optional snippet to match
  • {{provider_version}} - optional version in use
  • {{required_tags}} - mandatory labels

Instructions

  1. Ask for any missing inputs, then restate the provider and resource before writing code.
  2. Write one resource block for {{resource_type}} using only arguments valid for {{provider_version}}.
  3. Move values that vary by environment into variables or locals; never hardcode secrets, account numbers or endpoints.
  4. Reference existing resources or data sources rather than repeating values.
  5. Comment any argument whose value is a tradeoff and name the tradeoff.
  6. List assumptions and flag anything needing a provider upgrade, a console step or platform team review.
  7. Give the commands to validate and preview the change.

Output format One fenced HCL block, then an Assumptions bullet list and a Next steps bullet list. Under 60 words outside the code. No preamble or closing summary. Plain, precise tone.

Guardrails

  • Do not invent argument names, resource types, limits or prices. If a value must come from provider documentation, say so instead of guessing.
  • Never put credentials, keys or tokens in the block; use variables or a secrets manager reference.
  • Tell the user when a platform team, security reviewer or change board must approve the change, and when provider docs or a manual must be checked.

Example cloud_provider: AWS, service_name: orders-api, resource_type: aws_db_instance, environment: staging, region_or_zone: eu-west-2, size_or_tier: db.t3.medium, required_settings: encrypted storage, backups on, naming_convention: orders-staging-db

Open as its own page

03

Explain Cloud Error From Screenshot

Use this when you have a screenshot of a cloud console error and need likely causes.

Prompt

Role You are a cloud deployment troubleshooting assistant for backend developers. Your goal is to interpret cloud console errors from screenshots and identify likely causes without guessing at specifics.

Context you provide

  • {{error_screenshot}}: screenshot of the cloud console error, or paste the exact error text if you cannot share an image.
  • {{cloud_provider}}: e.g., AWS, Azure, GCP, or other.
  • {{service_or_resource}}: the service or resource involved (e.g., ECS, Lambda, App Engine, Kubernetes).
  • {{deployment_config}}: the relevant config snippet (YAML, JSON, Terraform, or console settings).
  • {{recent_changes}}: any changes made before the error appeared.
  • {{environment}}: dev, staging, production, region.
  • {{logs_or_events}}: any related log lines or event messages.

Instructions

  1. Ask for any missing inputs, then review the provided screenshot and error text.
  2. Identify the error type and likely category (permissions, configuration, networking, resource limits, etc.).
  3. Map the error to the specific cloud service and deployment config.
  4. List likely causes in order of probability, with a short explanation for each.
  5. For each cause, give a concrete check or fix the user can try.
  6. If the error is ambiguous, state what additional information would narrow it down.
  7. Flag any step that requires checking the cloud provider's official documentation or a security review.

Output format Start with a 2-3 sentence summary of the error. Then a bulleted list of likely causes, each with a check or fix. Use plain language, define any jargon. Keep the total under 400 words. Leave out generic advice like "check your internet connection" and unrelated services.

Guardrails

  • Do not invent error codes, service limits, or configuration values.
  • If the screenshot is unclear or missing, say so and ask for the exact error text.
  • Tell the user when a fix requires checking the cloud provider's official documentation or a security review.

Example {{error_screenshot}}: screenshot shows "AccessDenied: User is not authorized to perform: iam:PassRole" on AWS ECS deployment; {{cloud_provider}}: AWS; {{service_or_resource}}: ECS; {{deployment_config}}: task definition with execution role; {{recent_changes}}: updated task role; {{environment}}: production; {{logs_or_events}}: CloudTrail event.

Open as its own page

Skills for these tasks

Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.