웹서버 인스턴스 생성 및 연결
aws configure
− aws s3 ls
− aws s3 ls s3://bunketname
− aws s3 cp s3://bunketname/PriKeyFileName .
− ls
− ssh -i sshPriKeyFileName ec2-user@PriNodeIP
1. 이전 실습에서 생성했던 MyVPC 이용
2. 퍼블릭노드와 프라이빗 노드 생성
3. S3 생성 및 키 페어 파일 업로드
4. Bastion 서버에서 인스턴스 연결 진행
[ec2-user@ip-10-0-1-186 ~]$ aws configure
AWS Access Key ID []: AKIAVVQJT76HENIIN5PY
AWS Secret Access Key []: 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
Default region name []: us-east-2
Default output format []: json
[ec2-user@ip-10-0-1-186 ~]$ aws s3 ls
2024-01-09 14:13:10 mybucket0815
[ec2-user@ip-10-0-1-186 ~]$ aws s3 ls s3://mybucket0815
2024-01-09 14:15:28 1674 MyKP002.pem
[ec2-user@ip-10-0-1-186 ~]$ pwd
/home/ec2-user
[ec2-user@ip-10-0-1-186 ~]$ aws s3 cp s3://mybucket0815/MyKP002.pem .
download: s3://mybucket0815/MyKP002.pem to ./MyKP002.pem
[ec2-user@ip-10-0-1-186 ~]$ ls -l
total 4
-rw-r--r--. 1 ec2-user ec2-user 1674 Jan 9 14:15 MyKP002.pem
5. 퍼블릭 노드(Bastion)로 ssh 연결 퍼블릭 노드에서 프라이빗 노드로 ssh 연결
[ec2-user@ip-10-0-1-186 ~]$ ls -l
total 4
-rw-r--r--. 1 ec2-user ec2-user 1674 Jan 9 14:15 MyKP002.pem
[ec2-user@ip-10-0-1-186 ~]$ chmod 400 *
[ec2-user@ip-10-0-1-186 ~]$ ls -l
total 4
-r--------. 1 ec2-user ec2-user 1674 Jan 9 14:15 MyKP002.pem
[ec2-user@ip-10-0-1-186 ~]$ ssh -i ./MyKP002.pem ec2-user@10.0.3.117
The authenticity of host '10.0.3.117 (10.0.3.117)' can't be established.
ED25519 key fingerprint is SHA256:fSRtYste0TRwj81i8ibxwdoZEVAKCHSDNBz65wFi7Zo.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '10.0.3.117' (ED25519) to the list of known hosts.
, #_
~\_ ####_ Amazon Linux 2023
~~ \_#####\
~~ \###|
~~ \#/ ___ https://aws.amazon.com/linux/amazon-linux-2023
~~ V~' '->
~~~ /
~~._. _/
_/ _/
_/m/'
[ec2-user@ip-10-0-3-117 ~]$
[ec2-user@ip-10-0-3-117 ~]$ aws configure
AWS Access Key ID [None]: AKIAVVQJT76HENIIN5PY
AWS Secret Access Key [None]: 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
Default region name [None]: us-east-2
Default output format [None]: json
[ec2-user@ip-10-0-3-117 ~]$ aws s3 ls
6. VPC 엔드포인트 생성
7. VPC 엔드포인트를 이용한 프라이빗 접근
[ec2-user@ip-10-0-3-117 ~]$ aws s3 ls
2024-01-09 14:13:10 mybucket0815
8. MyPriRT 라우팅 테이블 살펴보기
AWS RDS 생성 연결 (0) | 2024.01.10 |
---|---|
AWS EBS 생성 및 연결(EC2에 디스크 추가) (1) | 2024.01.09 |
AWS 정적 웹사이트 호스팅 & 버전관리 (0) | 2024.01.09 |