클라우드/AWS
-
[AWS] EFS 와 ALB를 이용하여 공유되는 파일 확인해보기클라우드/AWS 2023. 5. 8. 21:53
linux 인스턴스에 apache 서버를 설치해주고, efs 파일 시스템을 생성한 후에 두개의 인스턴스에 탑재해보자 /var/www/html/efs 경로에 efs 마운트 시키기 /var/www/html/efs/index.html : index.html 파일 없으면 생성해서 추가하자 /etc/httpd/conf/httpd.com 수정 : 기본 index.html파일 경로를 ~/efs로 수정하기 1. EFS 생성 - 보안 그룹 : 탑재할 인스턴스 대상으로만 인바운드를 허용해주자 - EFS 생성 : private subnet 1,2 에 탑재 대상을 설정하고 보안그룹으로 막아주자 2. ec2 인스턴스에 efs 파일 시스템 탑재 - dns 통한 탑재방식을 통해서 각 ec2에 efs를 탑재함 sudo mount -..
-
[AWS] EFS / S3 / EFS클라우드/AWS 2023. 5. 8. 21:22
모두 데이터를 저장하는 파일 저장 공간 서비스이다. EBS - 볼륨 기반 S3 - 객체 기반 EFS - 파일 기반 EFS (Elastic File Storage) - AWS 클라우드 서비스와 온프레미스 리소스에서 사용할 수 있는 간단하고 확장 가능하며 탄력적인 완전 관리형 탄력적 NFS 파일 시스템 - 따로 용량 지정할 필요없이 사용한 만큼 용량 증가, 완전 관리형 - 쓰기 후 읽기 일관성 가짐 - 각 가용영역에 mount target 두고, 해당하는 mount target으로 개별적으로 접근함 - VPC 내 ec2 인스턴스 직접 액세스 가능 - 온프레미스 서버는 Direct connect & VPN 연결을 통해 파일 시스템 탑재 - EFS는 여러 ec2 인스턴스에 대한 공유 파일 스토리지 옵션이 필요할..
-
[AWS] Route53 + Application LoadBalancer를 이용한 트래픽 분산클라우드/AWS 2023. 5. 1. 22:11
구성도는 다음과 같다. 실습을 진행하기 전에 ec2에 아파치 서버를 설치했음 (포트번호 80번) 1. Route53 설정 - 도메인은 route53에서 구매할 수 있고, 나는 실습을 위해서 무료 도메인 사이트에서 등록함 (freedom) - 호스팅 영역 생성 : 할당받은 도메인을 입력하고, 퍼블릭 영역 / 프라이빗 영역중 선택 - 레코드 생성하면 route53에 표시되는 네임서버를 도메인 사이트에 등록을 해야함 - ACM인증서 등록 http -> https로 보호하기 위한 ssl인증서로, 요청하기 버튼을 누르고 route53레코드 추가하면 자동으로 해당 도메인에 대한 인증서가 발급됨 DNS 검증 방식, 이메일 검증 방식중 DNS검증 방식을 사용하여 인증 요청함 * ALB 정리 - Application L..
-
[AWS] bastion host을 통해 private 서버 접근하기 - linux클라우드/AWS 2023. 4. 22. 23:24
ssh (secure shell) - 원격 터미널 접속을 위한 보안 프로토콜 - ssh client(내 서버)가 ssh server(원격 서버)과 데이터 통신을 하기 위해선 암호화된 방식인 ssh 프로토콜을 사용하게 됨! - mac, linux는 ssh client가 기본적으로 설치되어 있지만, window같은 경우는 ssh client가 없기 때문에 직접 설치를 해줘야함 -> 그래서 putty를 설치함 ssh 터널링(port forwarding) - 22번 포트를 이용하여 서버와 클라이언트에 일종의 터널을 만들고 통신을 함 - 22번 포트를 이용하여 임의의 포트번호로 통신이 가능하게 하는 것 이제 bastion host를 통해서 private한 서버에 접근해보자 private server는 linux로..
-
[AWS] VPC 구성의 기본 개념클라우드/AWS 2023. 3. 1. 21:21
네트워크 선수 지식 - ip주소는 네트워크 주소 + 호스트 주소 - 각각을 옥탯이라 하고, 각 옥탯별로 0~255개의 범위이다 - a클래스 : 옥탯 1까지가 네트워크 아이디 + 나머지 옥탯은 호스트 아이디 - b클래스 : 옥탯 2까지 네트워크 아이디 - c클래스 : 옥탯 3까지 네트워크 아이디 -> 하지만 이런 클래스 별로 아이피 할당하는 방식은 사라지고 서브넷 마스크를 사용하기 시작함 -> a클래스는 /8, b클래스는 /16, c클래스는 /24 CIDR - ipv4 주소를 보다 효율적으로 사용함 - xxx.xxx.xxx.xxx/yy - 예를 들어 192.168.0.0/24면,앞에 8 * 3 = 24바이트는 고정이고 나머지 8바이트만 0~255의 범위를 가진다 VPC - vpc는 클라우드의 논리적으로 격..
-
[AWS] Lambda - zip 파일로 코드 올리기클라우드/AWS 2023. 2. 23. 18:47
람다함수에서 코드 조작하는 방법은 총 3가지 방법이 있다. 1. 콘솔창에서 직접 조작 2. zip파일 업로드 3. s3이용 코드를 실행하는데 module import 에러가 나서 zip파일로 node_modules, package.json까지 한꺼번에 묶어서 올렸다. 압축할때는 되도록 명령어를 이용하라고 공식문서에 나와있다. 10MB를 초과하면 s3을 이용해서 업로드 해야한다. 그리고 중요한거 !!!!!!! 핸들러 경로를 수정해줘야함 내가 만든 zip파일명 아래에 저렇게 index.handler를 설정해줘야 경로를 올바르게 잡아준다. + 추가로, 나는 node_modules도 같이 올리려고 zip파일로 올린건데 다른 방법으로 layer를 추가하는 방법도 있다. node_modules자체를 zip으로 묶은..
-
[AWS] ec2에서 S3로 파일 업로드클라우드/AWS 2022. 5. 16. 22:49
1. filezila를 이용해서 ubuntu에 파일 올리기 2. awsConfig.json 파일 생성해서 key 값 넣기 IAM 계정 생성할 때 다운로드 된 credential.csv파일에서 복붙하자 ap-northeast-2 는 지역이 서울을 뜻함 { "accessKeyId": "...", "secretAccessKey": "...", "region": "ap-northeast-2" } 3. s3_test.js 파일 생성하고 다음 코드를 넣자 var file = s3에 넣으려는 파일경로 Key = s3에 저장할 파일 이름 지정 contenttype = png로 이미지 저장 var AWS = require('aws-sdk') var fs = require('fs'); // 접속정보 설정 AWS.confi..
-
[AWS] Rekognition을 이용하여 이미지에서 텍스트 감지하기클라우드/AWS 2022. 5. 16. 22:08
https://docs.aws.amazon.com/ko_kr/rekognition/latest/dg/text-detecting-text-procedure.html 이미지에서 텍스트 감지 - Amazon Rekognition 이 페이지에 작업이 필요하다는 점을 알려 주셔서 감사합니다. 실망시켜 드려 죄송합니다. 잠깐 시간을 내어 설명서를 향상시킬 수 있는 방법에 대해 말씀해 주십시오. docs.aws.amazon.com 이미지 1. IAM 계정 생성 생성 완료하면 new_user_credential.csv 파일 다운로드됨 -> Access key ID , Secret access key , Console login link 2. S3의 버킷을 생성 S3란 ? 인터넷용 스토리지 - REST 인터페이스로 저장..