{
"version": "2012-10-17",
"Statement": [
{
"Effect": "Allow", // 사람들에게
"Action": "ec2:Describe*", // ec2사용권한
"Resource": "*"
},
{
"Effect": "Allow",
"Action": "elasticloadbalancing:Describe*",
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"cloudwatch:ListMetrics",
"cloudwatch:GetMetricsStatistics",
"cloudwatch:Describe*"
],
"Resource": "*"
}
]
}
{
"Version": "2012-10-17",
"Id": "S3-Account-Permissions",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Principal": {
"AWS": ["arn:aws:iam::123456789012:root"]
},
"Action": [
"s3:GetObject",
"s3:SetObject"
],
"Resource": ["arn:aws:s3::mybucket/*"]
}
]
}
{{Consist of}}
“Version” - policy language version
“Id” - an identifier for the policy (optional)
“Statement” - one or more individual statements (required)
{{Statements consist of}}
“Sid” - an identifier for the statement (optional)
“Effect” - 특정 API에 접근하는 것을 허용할지 거부할지에 대한 내용 (Allow, Deny)
“Principal” - 특정 정책이 적용될 사용자, 계정, 역할
“Action” - Effect에 기반해 허용, 거부되는 API 호출의 목록
“Resource” - 적용될 action의 리소스 목록
“Condition” - Statement가 언제 적용될지를 결정 (optional)
**## aws configure 명령을 통해 Access**
aws configure
AWS Access Key ID [****************4QC7]: AKIA5QZOV3LPARQQM5U4
AWS Secret Access Key [****************S37Z]: {{.csv파일에서 확인}}
Default region name [ap-northeast-2]: ap-northeast-2 # 가장 가까운 지역
Default output format [json]: # 지금은 그냥 enter
**## aws iam list-users 명령을 통해 user list를 조회**
{
"Users": [
{
"Path": "/",
"UserName": "admin",
"UserId": "AIDA5QZOV3LPA3NKSVJIK",
"Arn": "arn:aws:iam::929421449950:user/admin",
"CreateDate": "2023-01-02T06:23:12+00:00"
},
{
"Path": "/",
"UserName": "sakin",
"UserId": "AIDA5QZOV3LPDGRVXIAHQ",
"Arn": "arn:aws:iam::929421449950:user/sakin",
"CreateDate": "2023-05-27T00:37:57+00:00",
"PasswordLastUsed": "2023-05-27T00:49:06+00:00"
}
]
}