본문 바로가기

728x90

퍼블릭 클라우드

[aws] codedeploy 에이전트 설치(codedeploy-agent install) codedeploy 에이전트 설치(codedeploy-agent install) 테스트 환경 $ cat /etc/os-release NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" ruby 패키지 설치 yum install -y ruby cd /home/ec2-user codedeploy 에이전트 설치 wget https://aws-codedeploy-ap-northeast-2... 더보기
[aws] Amazon ECR(프라이빗 레지스트리) Amazon ECR(Amazon Elastic Container Registry) : Amazon Elastic Container Registry(ECR)는 완전관리형 컨테이너 레지스트리로, 이미지와 아티팩트를 어디서나 쉽게 보관, 관리, 공유 및 배포하도록 지원합니다. 요금(프라이빗 리포지토리) inbound - 무료 outbound - 목적지에 따라 비용이 결정 동일 리전(region) 동일 AZ(EC2 등) - 무료 다른 AZ - GB당 0.01 USD 지역 서비스(regional)의 Endpoint(SNS, S3, ECR 등)으로 직접 전송 - 무료 다른 리전(region) - GB당 0.08 USD 인터넷(아래 표 참고-프라이빗 리포지토리에서 전송된 데이터) ECR 리포지토리 Amazon ECR.. 더보기
[aws] packer 이미지 빌드 자격 증명 packer 이미지 빌드 자격 증명 자격 증명 - Static Credentials vim aws.pkr.hcl packer { required_plugins { amazon = { version = ">= 1.1.1" source = "github.com/hashicorp/amazon" } } } locals { timestamp = regex_replace(timestamp(), "[- TZ:]", "") } variable "aws_access_key" { type = string default = "aws_access_key" } variable "aws_secret_key" { type = string default = "aws_secret_key" } ... source "amazon-ebs".. 더보기
[aws] aws cli : ami 등록 취소 및 ebs 스냅샷 삭제 ami 등록 취소 및 ebs 스냅샷 삭제 AMI 목록 조회 aws ec2 describe-images --owners self --query 'Images[*].ImageId' AMI ID만 출력 aws --profile scbyun ec2 describe-images --owners self --query 'Images[*].ImageId' --output text $ aws --profile scbyun ec2 describe-images --owners self --query 'Images[*].ImageId' --output text ami-095c4bc4c6c1c5653 AMI 등록 취소(AMI ID : ami-095c4bc4c6c1c5653) aws --profile scbyun ec2 der.. 더보기
[aws] ec2 인스턴스에 java 설치하기 ec2 인스턴스에 java 설치하기 sdk 설치 curl -s "https://get.sdkman.io" | bash Looking for a previous installation of SDKMAN... Looking for unzip... Looking for zip... Looking for curl... Looking for sed... Installing SDKMAN scripts... Create distribution directories... Getting available candidates... Prime the config file... Installing script cli archive... * Downloading... #################################.. 더보기
[aws] codedeploy user data(사용자 데이터) codedeploy user data #!/bin/bash yum install -y ruby jq REGION=$(curl -s 169.254.169.254/latest/dynamic/instance-identity/document | jq -r ".region") cd /home/ec2-user/ curl -SsL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip ./aws/install wget -q https://aws-codedeploy-${REGION}.s3.amazonaws.com/latest/install chmod +x ./install ./install auto sy.. 더보기
[aws] site-to-site vpn 연결 aws site-to-site vpn 연결 VPC 대시보드 > 가상 사설 네트워크(VPN) 가상 사설 네트워크(VPN) > 고객 게이트웨이 고객 게이트웨이 생성 - 이름 태그 : - BGP ANS : 65000 - IP 주소 : (고객 게이트웨이 IP 주소) - 인증서 ARN 가상 사설 네트워크(VPN) > 가상 프라이빗 게이트웨이 가상 프라이빗 게이트웨이 생성 - 이름 태그 : - 자율 시스템 번호(ASN) : Amazon 기본 ASN 가상 사설 네트워크(VPN) > Site-to-Site VPN 연결 VPN 연결 생성 - 이름 태그 : - 대상 게이트웨이 : 가상 프라이빗 게이트웨이 - 가상 프라이빗 게이트웨이 : - 고객 게이트웨이 : 기존 - 고객 게이트웨이 ID : - 라우팅 옵션 : 정적 - .. 더보기
[aws] 웹 애플리케이션 방화벽(WAF-CloudFront) 구성 웹 애플리케이션 방화벽(WAF-CloudFront) 구현 WAF 구성 구성도 AWS WAF 구성 절차 1. web ACL 생성 2. Rule 추가 3. CloudFront 연계 WAF(web ACL) 생성 CloudFront 설정 CloudFront에 waf 적용 WAF 설정 IP 룰 생성(IP sets) waf에 IP 룰 적용(IP sets) 웹 페이지 확인 ip deny 정책으로 발생하는 웹 에러 메세지 더보기

728x90