AWS Infra
-
[ AWS CLI ] S3 명령어AWS Infra 2021. 11. 4. 21:20
목록보기 $ aws s3 ls $ aws s3 ls s3://'BucketName' # 버킷내 목록 조회 버킷 생성하기 $ aws s3 mb s3://bucket-name 파일 업로드 $ aws s3 cp 'Filename' s3://'Bucketname' # 파일 업로드 $ aws s3 cp 'Filename' s3://'Bucketname' --acl public-read # public 읽기권한. (버킷ACLs 허용상태) 파일 다운로드 $ aws s3 cp s3://'Bucketname'/'FileName' 'LocalPath' # 애스터리스트 ( * ) # accesss- 로 시작하는 파일 모두 다운로드 # 매개변수 적용순서는 include 부분부터 적용 $ aws s3 cp s3://['버킷명'..
-
[ AWS ] IAM Policy 특정 S3만 읽기 / 쓰기 권한 부여AWS Infra 2021. 11. 4. 19:26
IAM에서 특정 S3만 접근 위한 Policy (json) { "Version": "2012-10-17", "Statement": [ { "Sid": "ListObjectsInBucket", "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::S3BucketName1", "arn:aws:s3:::S3BucketName2" ] }, { "Sid": "AllObjectActions", "Effect": "Allow", "Action": "s3:*Object", "Resource": [ "arn:aws:s3:::S3BucketName1/*", "arn:aws:s3:::S3BucketName2/*" ] } ] } * S3Bu..
-
[ AWS ] Linux AWS S3 설치AWS Infra 2021. 11. 1. 23:13
1. AWS Cli 설치방법 https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html Installing, updating, and uninstalling the AWS CLI version 2 on Linux - AWS Command Line Interface AWS CLI versions 1 and 2 use the same aws command name. If you have both versions installed, your computer uses the first one found in your search path. If you previously installed AWS CLI version 1, we recomm..
-
[ AWS ] Lambda와 CloudWatch를 이용한 EC2 Start, StopAWS Infra 2021. 10. 31. 09:49
1. IAM 정책생성을 생성 (Sample : EC2_Control) { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents" ], "Resource": "arn:aws:logs:*:*:*" }, { "Effect": "Allow", "Action": [ "ec2:Start*", "ec2:Stop*" ], "Resource": "*" } ] } 2. IAM 역할생성 (Sample : EC2_Start_Lambda) 1. Lambda 함수생성 2. 소스코드 생성 * region : 현재 사용하는 리전명 * ins..