본문 바로가기

반응형

Ops/AWS

(151)
AWS IAM Policy - user MFA force AWS IAM Policy - user MFA force ■ 설명 첫 로그인 시 mfa를 강제로 적용하도록 설정하는 policy ■ 코드 { "Statement": [ { "Action": [ "iam:ChangePassword" ], "Effect": "Allow", "Resource": [ "arn:aws:iam::*:user/${aws:username}" ], "Sid": "AllowChangePassword" }, { "Action": [ "iam:GetAccountPasswordPolicy" ], "Effect": "Allow", "Resource": "*", "Sid": "AllowGetAccountPasswordPolicy" }, { "Action": [ "iam:GetAccountPassw..
AWS IAM Policy - RDS Snapshot read AWS IAM Policy - RDS Snapshot read ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "rds:DescribeDBSnapshots", "rds:DescribeDBClusterSnapshots", "rds:DescribeDBInstances", "rds:DescribeDBClusters" ], "Resource": "*" } ] } by mkdir-chandler
AWS IAM Policy - RDS Snapshot create AWS IAM Policy - RDS Snapshot create ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "rds:DescribeDBSnapshots", "rds:DescribeDBClusterSnapshots", "rds:DescribeDBInstances", "rds:DescribeDBClusters", "rds:DeleteDBSnapshot", "rds:DeleteDBClusterSnapshot", "rds:CreateDBSnapshot", "rds:CreateDBClusterSnapshot" ], "Resource": "*" } ] } by mkdir-..
AWS IAM Policy - RDS Maintenance AWS IAM Policy - RDS Maintenance ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "rds:DescribePendingMaintenanceActions", "health:Describe*" ], "Resource": "*" } ] } by mkdir-chandler
AWS IAM Policy - RDS CloudWatch log read AWS IAM Policy - RDS CloudWatch log read ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "sns:*", "cloudwatch:*", "logs:*" ], "Resource": "*" } ] } by mkdir-chandler
AWS IAM Policy - DynamoDB createtable AWS IAM Policy - DynamoDB createtable ■ 설명 Kinesis 데이터 분석을 위해 DynamoDB에 Table을 생성하고 조회하기 위한 policy ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "SpecificTable", "Effect": "Allow", "Action": [ "dynamodb:CreateTable", "dynamodb:DescribeTable", "dynamodb:PutItem", "dynamodb:Scan", "dynamodb:UpdateItem", "dynamodb:GetItem", "cloudwatch:PutMetricData" ], "Resource": "arn:aws:dynamodb:ap-no..
AWS IAM Policy - CloudFront invalidation (cdn purge) AWS IAM Policy - CloudFront invalidation (cdn purge) ■ 설명 CloudFront Invalidation을 진행하기 위한 policy ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "cloudfront:CreateInvalidation", "cloudfront:ListInvalidations" ], "Resource": "arn:aws:cloudfront::123456789012:distribution/*" } ] } 11 라인 : Account ID 수정 참고로 해당 정책은 특정 리소스 지정이 불가능합니다. ■ Referen..
AWS IAM Policy - GameGauard invalidation (purge) AWS IAM Policy - GameGauard invalidation (purge) ■ 설명 Game-Guard invalidation policy ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": "cloudfront:CreateInvalidation", "Resource": "arn:aws:cloudfront::123456789012:distribution/ABCDEFGHIJKLMN", "Condition": { "IpAddress": { "aws:SourceIp": "192.168.1.10" } } } ] } 08 라인 :생성된 CF Distribution ID 로..
AWS IAM Policy - GameGuard default AWS IAM Policy - GameGuard default ■ 설명 Game-Guard patch file upload from EC2 to S3 ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "s3:ListBucketVersions", "s3:ListBucket" ], "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET" }, { "Sid": "VisualEditor1", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:PutObjectAcl", "s3:GetOb..
AWS IAM Policy - user MFA AWS IAM Policy - user MFA ■ 설명 user mfa 설정 권한 policy (처음 로그인 시 mfa 인증을 받지 않을 경우 사용) MFA 이름은 본인의 id로 넣어야 함 (본인것만 생성 가능하도록 변수처리 되어 있음) ■ 로직 1. 해당 policy를 추가 2. MFA 인증 진행 3. 해당 policy 삭제 ■ 코드 { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowListActions", "Effect": "Allow", "Action": [ "iam:ListUsers", "iam:ListVirtualMFADevices" ], "Resource": "*" }, { "Sid": "AllowIndividualUserToManageThe..

728x90
반응형