본문 바로가기

전체 글

(26)

| 글쓰기
aws codecommit 자격증명 프로젝트명은 동일한데 계정이 바뀐경우 기존 자격증명으로 연결되는경우 아래와같이 계정/패스워드 붙여서 연결 https://계정:패스워드@git-codecommit.ap-northeast-2.amazonaws.com/v1/repos/test-project
AWS EC2 tomcat 80 포트 사용하기 tomcat 서버를 80 포트로 설정하더라도 외부에서는 80 포트로 접속할 수 없다. AWS EC2의 경우 유저 권한의 프로세스가 80 포트를 사용하는 것을 제한하기 때문이다. 80 포트로 들어오는 패킷을 tomcat 서버의 8080 포트로 리다이렉션 시켜주면 된다. # iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080 # service iptables save https://behonestar.tistory.com/50
AWS Lambda RDS(Instance/cluster) Start/Stop index.js var stopInstance = require('stop-instance'); var stopCluster = require('stop-cluster'); exports.handler = (event, context, callback) => { event.instances.forEach((instances) => { switch (event.action) { case 'stop-instance': console.log(`Stopping Instance '${instances}'...`); stopInstance(instances); break; case 'stop-cluster': console.log(`Stopping Cluster '${instances}'...`); stopClus..
AWS Lambda EC2 Start/Stop Lambda - 함수 - 함수생성 권한 - ec2권한 Node - Start const AWS = require('aws-sdk'); exports.handler = (event, context, callback) => { const ec2 = new AWS.EC2({ region: event.instanceRegion}); ec2.startInstances({ InstanceIds: event.instanceId}).promise() .then(() => callback(null, `Successfully started ${event.instanceId}`)) .catch(err => callback(err)); }; - Stop const AWS = require('aws-sdk'); exports...