ranilojohn/claude-blue/defensive-aws-security
Claude Code and agent skill by ranilojohn/claude-blue
- community
Checking that the SKILL.md file is still in the repository.
AWS security operations and hardening: organization guardrails (SCPs, RCPs, declarative policies), IAM least privilege and access analysis, root account protection, IAM Identity Center, CloudTrail organization trails and data events, GuardDuty (incl. Extended Threat Detection attack sequences, Runtime Monitoring, S3/EKS/RDS/Lambda protection), Security Hub CSPM, Detective, Config, VPC Flow Logs, Route 53 Resolver query logs, IMDSv2 enforcement, S3 Block Public Access, KMS, Secrets Manager, and…
Install
npx vskill@latest install ranilojohn/claude-blue/defensive-aws-securitySKILL.md
The same SKILL.md was published earlier as ranilojohn/claude-blue/defensive-aws-security.
AWS Security
AWS security is identity-first. Most AWS incidents start with a leaked or over-privileged credential, then pivot through IAM. Guardrails at the organization level stop whole classes of mistakes.
Quick Workflow
- Organization: separate accounts (security, log archive, workloads); SCP guardrails
- Logging: org CloudTrail (all regions, validation, KMS), Config, VPC Flow, DNS logs → log archive account
- Detection: GuardDuty (all regions, all protection plans), Security Hub CSPM
- Identity: no root use, Identity Center, least privilege, no long-lived keys
- Data: S3 Block Public Access (account + org), KMS, Secrets Manager
- Workloads: IMDSv2, SSM instead of SSH, patching, EKS hardening
- CloudTrail detections → SIEM
1. Organization Guardrails (SCP examples)
Also consider Resource Control Policies (RCPs) to restrict resource access to your org (data perimeter) and EC2 declarative policies (e.g., IMDS defaults, block public AMI sharing).
2. Identity
Privilege-escalation-capable permissions to watch: iam:PassRole + compute create, iam:CreatePolicyVersion, iam:SetDefaultPolicyVersion, iam:AttachUserPolicy/AttachRolePolicy, iam:PutUserPolicy, iam:UpdateAssumeRolePolicy, iam:CreateAccessKey on others, iam:CreateLoginProfile/UpdateLoginProfile, lambda:UpdateFunctionCode, ssm:SendCommand, ec2:ModifyInstanceAttribute (userData).
3. Logging & Detection Services
| Service | Configure | |
|---|---|---|
| CloudTrail | Org trail, all regions, log file validation, KMS, S3 with Object Lock in log archive; data events for sensitive S3/Lambda | |
| GuardDuty | Delegated admin; all regions; S3, EKS audit + Runtime Monitoring, Malware Protection, RDS, Lambda protection; Extended Threat Detection (on by default) correlates attack sequences | |
| Security Hub CSPM | AWS FSBP + CIS standards; aggregation region | |
| Config | All resources, conformance packs | |
| VPC Flow Logs | All VPCs (at least reject + accept at VPC level) | |
| Route 53 Resolver query logs | DNS visibility for C2/exfil | |
| Detective | Investigation graphs | |
| IAM Access Analyzer | External + unused access |
4. CloudTrail Detections
| Detection | Events | |
|---|---|---|
| Root activity | userIdentity.type = Root (any) | |
| Console login without MFA | ConsoleLogin with additionalEventData.MFAUsed = No | |
| Logging tamper | StopLogging, DeleteTrail, UpdateTrail, PutEventSelectors, DeleteFlowLogs, DeleteDetector, StopConfigurationRecorder | |
| Persistence | CreateUser, CreateAccessKey, CreateLoginProfile, UpdateLoginProfile, CreateRole with external trust, UpdateAssumeRolePolicy, CreateOpenIDConnectProvider, CreateSAMLProvider | |
| Privilege escalation | AttachUserPolicy/AttachRolePolicy with AdministratorAccess, PutUserPolicy, CreatePolicyVersion + setAsDefault | |
| Recon burst | Many List*/Describe*/Get* + AccessDenied from one principal; GetCallerIdentity from new IP | |
| Data exposure | PutBucketPolicy, PutBucketAcl, DeletePublicAccessBlock, PutBucketReplication, ModifySnapshotAttribute (createVolumePermission add), ModifyDBSnapshotAttribute | |
| Secrets access | GetSecretValue, GetParameter(s) with withDecryption, Decrypt spikes | |
| Compute abuse | RunInstances in unusual regions/types, CreateFunction + AddPermission public | |
| SSM abuse | SendCommand, StartSession by unusual principals |
5. Data & Network
- S3 Block Public Access at account and org level; bucket policies require TLS (
aws:SecureTransport); default encryption (SSE-KMS for sensitive) - KMS key policies least privilege; CloudTrail on key use
- Secrets Manager rotation; no secrets in user data, env vars in plain text, or AMIs
- Security groups: no 0.0.0.0/0 to 22/3389/DB ports; use SSM Session Manager
- VPC endpoints + endpoint policies for S3/DynamoDB (data perimeter)
6. Workloads
- IMDSv2 required (hop limit 1 for non-container hosts; 2 where containers need IMDS)
- Inspector for EC2/ECR/Lambda vulnerabilities
- EKS: private API endpoint, audit logging, EKS Pod Identity/IRSA, GuardDuty EKS + Runtime Monitoring
Engagement Cheatsheet
Key References
- AWS Security Reference Architecture (SRA); AWS Foundational Security Best Practices
- GuardDuty Extended Threat Detection docs; CIS AWS Foundations Benchmark
- Rhino Security Labs IAM privilege escalation research
- Related:
defensive-cloud-ir,defensive-cspm,defensive-container-hardening
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/cloud/defensive-aws-security/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ranilojohn/claude-blue/defensive-aws-security)