Secret versus configuration
APP_LOG_LEVEL=info # ordinary configuration
DB_PASSWORD=<secret store> # secret
API_TOKEN=<temporary/runtime> # secret- Classification determines handling.
- Do not log secret values while troubleshooting.
Apply layered network, identity, encryption, key, secret and audit controls with explicit security boundaries.
IAM restricts API actions, network controls limit paths, encryption protects data, and logging creates evidence. One layer should not be expected to compensate for all others.
In AWS terms, security groups are stateful controls associated with network interfaces/resources, while network ACLs are stateless subnet-level filters. They are not interchangeable.
Use the provider-neutral principle of layered network controls while understanding the concrete semantics of the provider implementation.
TLS protects traffic over networks. At-rest encryption protects stored media/snapshots according to service design. Key management controls who or what can use encryption keys.
Passwords, tokens and private keys should not be baked into images, Git repositories or public user data. Secret services combine access policy, encryption and auditability.
Separate human administration, application workload identity and deployment automation. Use narrowly scoped roles/policies and record security-relevant API activity so changes can be investigated.
Enterprise cloud environments commonly organize resources into tenants/organizations, accounts/subscriptions/projects, folders or resource groups, then individual resources. The names differ by provider, but the goal is delegated ownership with inherited policy boundaries.
Policies, quotas, approved regions, tagging standards, resource locks and separation of duties reduce accidental or unauthorized change. Governance should constrain risky actions without replacing workload-level IAM, network and encryption controls.
APP_LOG_LEVEL=info # ordinary configuration
DB_PASSWORD=<secret store> # secret
API_TOKEN=<temporary/runtime> # secretGoal: Scan a local configuration tree for unsafe credential patterns.
mkdir -p /tmp/cloud-secret-lab && printf 'LOG_LEVEL=info
' >/tmp/cloud-secret-lab/app.env && printf 'AWS_SECRET_ACCESS_KEY=example-not-real
' >/tmp/cloud-secret-lab/bad.envpython3 - <<'PY'
from pathlib import Path
patterns=('SECRET_ACCESS_KEY','PASSWORD=','TOKEN=','PRIVATE KEY')
hits=[]
for p in Path('/tmp/cloud-secret-lab').rglob('*'):
if p.is_file():
text=p.read_text(errors='ignore')
if any(x in text.upper() for x in patterns): hits.append(str(p))
print('hits',hits)
assert any(x.endswith('bad.env') for x in hits)
PYDelete the sample secret file and describe how a workload role plus secret store would deliver the value at runtime.Production secret management adds rotation, audit logs, scoped retrieval permissions and incident response for exposed credentials.
Inspect existing security groups, network ACLs and KMS key metadata without changing controls.
aws ec2 describe-security-groups --query 'SecurityGroups[].{Name:GroupName,Id:GroupId,Vpc:VpcId}' --output tableaws ec2 describe-network-acls --query 'NetworkAcls[].{Id:NetworkAclId,Vpc:VpcId,Default:IsDefault}' --output tableaws kms list-keys --query 'Keys[].KeyId' --output tableOpen each answer only after you have tried to answer the question yourself.
Data in transit between communicating endpoints.
To store, control, audit and often rotate sensitive values separately from code/configuration.
Using multiple independent security controls so failure of one does not expose the whole system.
An organization/account-level governance guardrail or policy restricting allowed regions, in addition to workload IAM.
Progress is saved in this browser immediately. When you sign in to My Learning, it can also sync across devices.
Attempt the core lab and knowledge checks before marking the module complete.