Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 38 ยท Getting Started

Setting Up a Safe Cloud Learning Lab

Build a safe, cheap, legal cloud security lab: separate accounts, budgets, MFA, tagging, cleanup habits and rules of engagement, with a runnable lab-readiness checker.

You learn cloud security fastest by trying things: creating a policy, turning on logging, breaking a setting on purpose and seeing what the tools say. To do that safely you need a place where mistakes cost little and harm nobody. This lesson shows how to set up such a lab, what the ground rules are, and gives you a checker that models a "lab readiness" review.

Legal and ethical rules. Only test accounts, systems and networks that you own or that give you written permission to test. Cloud providers have published policies on what security testing is allowed; read your provider's current policy first. Never scan or attack other customers, even "just to look". This course teaches defense, and nothing here requires attacking a third party.

What a good lab looks like

  1. A dedicated account or subscription for learning. Never experiment in an account that holds real customer data or your employer's workloads. Most providers have free tiers or credits for new accounts, and some offer training sandboxes.
  2. Strong identity from day one. Turn on multi-factor authentication for the account owner, then stop using that powerful root or owner identity for daily work. Create a normal user or role with limited permissions instead.
  3. A budget and alerts. Set a monthly budget with email alerts at, say, 50, 80 and 100 percent. Crypto-mining abuse and forgotten test clusters are two classic ways to get a surprise bill.
  4. Tags on everything. Label resources with owner, purpose and delete-after so you can find and remove them.
  5. Logging on. Enable the account activity log (often called an audit trail) so you can see your own actions. That is also practice for monitoring and detection.
  6. Cleanup routine. At the end of each session delete what you created. A forgotten virtual machine or database costs money and can be a security hole.
  7. No real secrets, no real data. Use fake sample data. Never put real personal information in a lab.
flowchart TB
    Owner["Account owner<br/>MFA on, rarely used"] --> Admin["Lab admin role<br/>limited, MFA required"]
    Admin --> Res["Lab resources<br/>tagged, budgeted, logged"]
    Res --> Clean["Cleanup at session end"]

Daily work goes through a limited role, not the account owner.

Local-only practice options

You can also learn a lot without any cloud account:

  • Run open-source tools on your own computer: a local object-storage emulator, a local container runtime, or an infrastructure-as-code linter on sample files.
  • Read and write policy documents in a text editor and check them with free policy-analysis tools.
  • Use the Python and Node examples in this course, which model cloud behavior in your browser.

Rules of engagement

Professional security work is always done under agreed rules. Even in a lab, practice writing them down:

  • Scope. Which accounts, regions and resources are in scope?
  • Authorization. Who approved the activity, and where is that recorded?
  • Methods. Which techniques are allowed and which are forbidden (for example denial of service)?
  • Contact and time window. Who is told, and when?
  • Data handling. Where will findings be stored and who may read them?

Runnable example: lab readiness check

The checker below reviews a description of your lab against the checklist and prints what to fix. Real organizations automate this kind of review with tools that read configuration from the provider's API.

Python Lab readiness checklist

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Fix the data (set daily_work_uses_limited_role to True, add alerts, add tags) and run again until it reports that the lab is ready.

Example: what a real command looks like (read-only)

On a real account you would use the provider's command-line tool to inspect your own resources. The text below is a generic, made-up illustration, not real output from any provider.

TEXT
$ cloudcli storage list --tag owner=sam
NAME           REGION     PUBLIC   ENCRYPTED
bucket-notes   eu-west-1  no       yes

$ cloudcli budget show lab-monthly
Limit: 20.00 USD   Spent: 3.41 USD   Alerts: 50% 80% 100%

The commands differ for each provider, but the questions are the same: what exists, who owns it, is it public, is it encrypted, what does it cost?

Good habits to keep

  • Write down what you created as you go, or tag it so tools can list it.
  • Prefer short-lived credentials from your login session over long-lived access keys. If you must create a key for a lab tool, rotate or delete it afterwards.
  • Never commit keys to a repository, even a private one. We return to this in secrets handling.
  • Practice recovery: delete a test resource and restore it from a backup.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which is the best first step when opening a cloud account for learning?

    Protect the most powerful identity with MFA and avoid using it for daily work.
  2. 2. Why set budget alerts in a lab?

    Unexpected usage is a cost problem and often a sign of misuse, so alerts give early warning.
  3. 3. Whose systems may you run security tests against?

    Unauthorized testing can be illegal and harmful, whatever your intentions.
  4. 4. What is the purpose of tagging lab resources with owner and delete-after?

    Tags make resources discoverable and support cleanup and cost tracking.

Summary

  • Use a dedicated learning account with MFA, a limited daily role, a budget with alerts, tags, logging and fake data.
  • Clean up after each session and prefer short-lived credentials.
  • Only test what you own or may test, and write down scope and authorization like professionals do.
  • Local tools and the models in this course let you practice without any cloud account.

Next: The Shared Responsibility Model