Build safe cloud habits from the beginning
Security is not a separate task at the end. The way you sign in, configure permissions, and expose files matters from the first command.
Six essential security habits
CORE PRINCIPLESBuild these foundational operational disciplines into your workflow from your very first cloud deployment.
Use authorised accounts
Use the learner role or sandbox assigned by the organiser. Do not use or share an AWS account without permission.
Working strictly within approved workshop boundaries prevents accidental billing surprises or unauthorized administrative changes.
Least privilege
Grant only the permissions required for the exercise. Avoid using the AWS account root user for routine tasks, and do not request broad administrator access just to bypass a permissions error.
Note: The AWS account root user controls cloud billing and account lifecycles; it is completely separate from the Linux root/sudo user on an EC2 instance.
Protect credentials
Never share the .pem private key, passwords, access keys, or session credentials. Never commit them to GitHub or place them in public website files.
Private SSH keys must stay secure on your local computer (e.g. chmod 400). Never paste keys into public repos, code comments, or screenshots.
Use MFA
Enable multi-factor authentication wherever available, especially for privileged accounts. Follow the authentication requirements of the approved workshop environment.
MFA provides a second layer of defense, ensuring compromised passwords alone cannot be used to compromise your cloud environment.
Limit network exposure
Restrict SSH on port 22 to My IP or the approved administration network. Open only the application ports needed for the exercise.
For this static website exercise, public HTTP traffic uses TCP port 80. Do not expose SSH to everyone (0.0.0.0/0) merely to make connection problems easier to bypass.
Protect project data
Only public website assets belong under /usr/share/nginx/html/. Keep secrets, private configuration, credentials, and unrelated files outside the public document root.
Files placed in Nginx document root can be fetched directly by anyone on the internet. Obscure filenames do not provide security.
Permissions are not the same as network rules
Beginners often confuse who can modify cloud infrastructure with what packets can reach an instance and which local accounts can read files on disk. These three distinct security boundaries protect different layers:
| CONTROL | QUESTION IT ANSWERS | EXAMPLE |
|---|---|---|
IAM identity/policy Evaluates AWS API requests at the management plane. Controls access to cloud services, not incoming network packets. | "Who can create, modify, or inspect AWS resources?" | Can this role launch or terminate EC2 instances? |
Security group Acts as a stateful virtual firewall at the virtual network interface level. Does not determine whether an identity can modify AWS resources. | "Which network traffic can reach the instance?" | Allow HTTP port 80 publicly; restrict SSH port 22 to the approved administration network. |
Linux file permissions Local operating system user, group, and other permissions (chmod/chown) controlling which local processes can access disk files. | "Who can read or change files on the server?" | Website assets must be readable by Nginx. Private files must not become publicly downloadable. |
AWS Security Guidance
Consult these authoritative AWS guides to deepen your understanding of cloud security architectures:
MFA, temporary credentials, protection of privileged accounts, and least-privilege access.
Official rule specifications for Web servers, SSH, CIDR blocks, and stateful tracking.
Before you finish the lab
Verify these safety checks to confirm that your workshop session follows security best practices and leaves no exposed credentials.
