DevOps & Cloud Engineering(234)
-
Avoiding unexpected charges
- 개요 AWS에서 가이드하는 예기치 않은 비용 발생 방지 및 대책 방안 - 참고 https://docs.aws.amazon.com/ko_kr/awsaccountbilling/latest/aboutv2/checklistforunwantedcharges.html
2022.08.03 -
CORS error (Route53 + Cloudfront CNAME + S3)
- 개요 CORS error는 사소하면서도 해결이 깔끔하게 안되는 문제중 하나이다. - S3 Cors 설정 >> Permission 최하단 >> CORS >> AllowedOrigins - 예제 "AllowedOrigins": [ "*" ], - Cloudfront Cors 설정 Distributions >> Behavior >> Response headers policy >> CORS-With-Preflight Cloudfront Invalidations - 비고 수 분 기다리면 완료. - 참고 https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManageCorsUsing.html https://docs.aws.amazon.com/ko_kr/AmazonCl..
2022.07.29 -
Cloudfront Origin Shield
- 개요 CloudFront 캐싱 인프라의 추가 계층으로 오리진의 부하를 최소화하고 가용성을 높이며 운영 비용을 절감 효과 - 설정 방법 Distributions >> Origin / Edit >> Enable Origin Shield / Yes >> Origin Shield Region / choose region - 효과 추가 layer를 통해 Better cache hit ratio // Reduced origin load // Better network performance - 비고 특정 region에서 접근이 많은 경우 제대로 된 효과가 없고, non-cacheable requests 까지 과금 될수 있음 - 분석 Reports & analytics >> Viewers >> Locations /..
2022.07.29 -
SPA - Cloudfront + S3 403/404 이슈
- 개요 React 등으로 SPA를 서빙하기 위해 Route53 -> CF - CNAME + S3 를 사용하는 경우 sub-path를 직접 호출 시 403 에러가 난다. Root Routing 이 정상적으로 되기 위해서는 403, 404를 200 index.html로 보내야 한다. - 설정 방법 CloudFront >> Distributions >> Error Pages >> Create custom error reponse >> HTTP error code 403 // HTTP error code 404 >> Customize error reponse >> Yes >> Response page path : /index.html >> HTTP Reponse code : 200 >> Invalidation..
2022.07.28 -
AWS Lambda functions description
- 개요 AWS Lambda functions에서 Description을 해놓지 않으면 관리가 힘드므로 작성을 습관화하기를 추천한다. - 작성 방법 functions >> configuration >> genaral configuration >> edit >> description ex) slack noti by john.doe
2022.07.26 -
AWS Cost Optimization Guide Pages
- 개요 아래 페이지들은 AWS에서 제공하는 Cost Optimization 방안이다. - Cost Optimization Best Practices https://aws.amazon.com/ko/aws-cost-management/aws-cost-optimization/ AWS Cloud Financial Management | Optimize and save your IT costs AWS enables you to take control of cost and continuously optimize your spend, while building modern, scalable applications to meet your needs. AWS's breadth of services and pricing..
2022.07.25 -
EBS volume GP2에서 GP3로 변경
- 개요 EBS volume은 default로 GP2가 선택이 된다 >> 현재 GP3로 변경되었다.(2023.10.05) - 작업 무중단 변경이 되므로 모든 EBS volume은 GP2 -> GP3 로 변경해야 한다.비용측면이나 성능 측면에서 무조건 바꿔야 한다. 비용은 20% 저렴하며 최대 성능은 4배까지 빨라진다. 다만, type 변경 후 EBS 관련 작업이 수 시간 동안 불가하므로 염두하고 작업해야 한다. - 작업 방법 ec2 >> volume >> Actions >> Modify volume >> Volume type >> General Purpose SSD (gp3) >> Modify - 참고 https://aws.amazon.com/ko/blogs/korea/migrate-your-amazon..
2022.07.22 -
IAM policy for cloudfront invalidation
- 개요 CloudFront에서 S3 object에 대한 cache를 invalidation 하는 IAM policy 예제 이다. - IAM Policy { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket" ], "Resource": "arn:aws:s3:::test" }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject" ], "Resource": "arn:aws:s3:::test/*" }, { "Effect": "Allow", "Action": [ "cloudfront:CreateInvalidat..
2022.07.22 -
AWS 에서 권장하는 보안 관련 링크
- 개요 실제 보안 사고를 경험 후 그걸 해결하는 과정에서 AWS support를 통해 공유 받은 보안 권장 링크 - IAM MFA https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_enable.html - Trusted Advisor https://docs.aws.amazon.com/awssupport/latest/user/get-started-with-aws-trusted-advisor.html - Billing Alert https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/gs_monitor_estimated_charges_with_cloudwatch.html#gs_c..
2022.07.22 -
AWS Security Basic Principle
- 개요 AWS를 운영하면서 기본적으로 지켜야할 보안 그라운드 룰에 대해서 간단히 정리 했다. - 그라운드 룰 Root 계정 사용 금지 및 모든 작업은 IAM 계정을 사용하여 처리 Root 계정 패스워드 최소 50자 이상 + MFA 적용(임원이 관리) + U2F Device 권장 IAM 계정은 회사 이메일 주소와 동일하게 생성 IAM 계정 비밀번호 최소 15자 IAM 계정 비밀번호 만료 180일 IAM 계정 이전 비밀번호 사용 금지 IAM 계정 MFA 적용 IAM 계정의 Console Login과 Accesskey 방식을 동시에 사용 금지 IAM 계정이나 AccessKey를 여러 사람이 공용으로 사용 금지 사용하지 않는 IAM 계정이나 AccessKey는 즉시 정지 후 삭제 - 비고 180일, 15자, ..
2022.07.21