securing-aws-iam-permissions
하는 일
이 도구는 AWS 클라우드 권한을 더 안전하게 만드는 데 도움을 줍니다. 누가 무엇에 접근할 수 있는지 점검하고 조정해, 각 사람이나 서비스가 업무에 꼭 필요한 권한만 갖도록 합니다.
사용하는 경우
- ✓새 AWS 계정이나 서비스를 설정할 때.
- ✓현재 권한이 너무 넓다고 의심될 때.
- ✓보안 감사 전에 권한이 제한되어 있음을 증명해야 할 때.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-aws-iam-permissions/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“필요한 것만 허용되도록 AWS 권한을 조정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 현재 권한을 분석하고, 불필요하거나 과도한 접근을 찾아낸 뒤, 더 제한적인 정책을 제안하거나 적용합니다. 권한 경계나 다중 인증(MFA) 같은 추가 보안 장치를 설정하는 것도 돕습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Securing AWS IAM Permissions
When to Use
- When onboarding new AWS accounts or workloads that require scoped IAM policies
- When IAM Access Analyzer reports overly permissive policies or unused permissions
- When preparing for a compliance audit requiring least privilege evidence (SOC 2, PCI-DSS)
- When migrating from long-lived access keys to short-lived role-based credentials
- When remediating findings from AWS Security Hub related to IAM misconfigurations
Do not use for Azure AD or Google Cloud IAM configurations, application-level authorization logic, or federated identity provider setup (see managing-cloud-identity-with-okta).
Prerequisites
- AWS account with administrative access or IAM:FullAccess permissions
- AWS CLI v2 installed and configured with named profiles
- AWS CloudTrail enabled for at least 90 days of API activity history
- Familiarity with JSON-based IAM policy syntax and ARN resource notation
Workflow
Step 1: Inventory Existing IAM Entities and Policies
Generate a comprehensive inventory of all IAM users, roles, groups, and attached policies using the AWS CLI and IAM credential reports. Identify accounts with console access, programmatic access keys, and their last-used timestamps.
# Generate IAM credential report
aws iam generate-credential-report
aws iam get-credential-report --query 'Content' --output text | base64 -d > iam-report.csv
# List all IAM roles and their attached policies
aws iam list-roles --query 'Roles[*].[RoleName,Arn,CreateDate]' --output table
# Find users with access keys older than 90 days
aws iam list-users --query 'Users[*].UserName' --output text | while read user; do
aws iam list-access-keys --user-name "$user" \
--query "AccessKeyMetadata[?CreateDate<='$(date -d '-90 days' +%Y-%m-%d)'].[UserName,AccessKeyId,Status,CreateDate]" \
--output table
done
Step 2: Enable and Analyze IAM Access Analyzer Findings
Activate IAM Access Analyzer at the organization or account level to identify resources shared externally and generate least-privilege policy recommendations based on CloudTrail activity.
# Create an Access Analyzer for the account
aws accessanalyzer create-analyzer \
--analyzer-name account-analyzer \
--type ACCOUNT
# List active findings for external access
aws accessanalyzer list-findings \
--analyzer-arn arn:aws:access-analyzer:us-east-1:123456789012:analyzer/account-analyzer \
--filter '{"status": {"eq": ["ACTIVE"]}}'
# Generate a policy based on CloudTrail activity for a specific role
aws accessanalyzer start-policy-generation \
--policy-generation-details '{
"principalArn": "arn:aws:iam::123456789012:role/AppRole",
"cloudTrailDetails": {
"trailArn": "arn:aws:cloudtrail:us-east-1:123456789012:trail/management-trail",
"startTime": "2025-01-01T00:00:00Z",
"endTime": "2025-03-01T00:00:00Z"
}
}'
Step 3: Scope Policies to Specific Resources and Conditions
Replace wildcard resource ARNs with specific resource identifiers. Add IAM policy conditions for MFA enforcement, source IP restrictions, and time-based access windows.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowS3ReadSpecificBucket",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::production-data-bucket",
"arn:aws:s3:::production-data-bucket/*"
],
"Condition": {
"Bool": {"aws:MultiFactorAuthPresent": "true"},
"IpAddress": {"aws:SourceIp": "10.0.0.0/8"},
"DateGreaterThan": {"aws:CurrentTime": "2025-01-01T00:00:00Z"}
}
}
]
}
Step 4: Implement Permission Boundaries
Attach permission boundaries to IAM roles and users to define the maximum scope of permissions an entity can receive, preventing privilege escalation even if an administrator attaches an overly permissive policy.
# Create a permission boundary policy
aws iam create-policy \
--policy-name DeveloperPermissionBoundary \
--policy-document file://developer-boundary.json
# Attach the boundary to an IAM role
aws iam put-role-permissions-boundary \
--role-name DeveloperRole \
--permissions-boundary "arn:aws:iam::123456789012:policy/DeveloperPermissionBoundary"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowCommonServices",
"Effect": "Allow",
"Action": [
"s3:*",
…
자주 묻는 질문
‘최소 권한 원칙’이란 무엇인가요?
사람이나 서비스에게 업무 수행에 꼭 필요한 최소한의 권한만 주고, 그 이상은 주지 않는 원칙입니다. 계정이 탈취되었을 때 위험을 줄여 줍니다.
‘권한 경계(permission boundaries)’란 무엇인가요?
사용자나 서비스가 가질 수 있는 권한의 최대 범위를 정하는 규칙입니다. 다른 정책이 더 많은 권한을 주더라도 이 최대 한도는 지켜집니다.
이것을 쓰려면 코딩을 알아야 하나요?
아니요, 프로그래밍 지식은 필요 없습니다. 깊은 기술 전문성이 없어도 권한을 안전하게 관리하도록 설계되었습니다.
상세 정보
작성자의 원본 설명
Hardens AWS IAM configurations to enforce least-privilege access, covering IAM policy scoping, permission boundaries, IAM Access Analyzer integration, and credential rotation strategies. Use when reducing the blast radius of compromised AWS identities, auditing overly permissive IAM policies, or setting up permission boundaries and Access Analyzer findings review across cloud accounts. '
인기도
- GitHub 스타
- 35k
- 순위
- #8365
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.