우노
[DocumentDB] EC2 Instance에서 Amazon DocumentDB 접근 본문
1. EC2 Instance 접속
ssh -i "Ec2-for-documentDB-access.pem" ec2-user@ec2-54-89-18-159.compute-1.amazonaws.com
2. MongoDB shell 설치
- sudo vi /etc/yum.repos.d/mongodb-org-3.6.repo
[mongodb-org-3.6]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-3.6.asc
- Mongodb shell, Mongdb Tool ( mongodump, mongorestore ) 설치
sudo yum install -y mongodb-org-shell mongodb-org-tools
3. Amazon DocumentDB TLS 통신을 위한 public key 다운로드
wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem
4. Amazon DocumentDB 접속을 위한 Security Group - Inbound rules 수정
- Type : TCP , Source : Anywhere
5. Amazon DocumentDB 접속
mongo --ssl --host docdb-2020-06-17-04-01-59.cluster-cuwjk5rgtfpv.us-east-1.docdb.amazonaws.com:27017 --sslCAFile rds-combined-ca-bundle.pem --username userDemo --password userDemo
'AWS > DocumentDB' 카테고리의 다른 글
[DocumentDB] MongoDB 데이터 Amazon DocumentDB에 Migration하기 (0) | 2020.07.03 |
---|
Comments