AWS EC2 볼륨 저장 용량 동적으로 늘리기

AWS Console에서 Volume 크기 조정 AWS Console에 접속해서 EC2에 연결된 volume 크기를 수정합니다. EC2에서 변경된 용량 적용하기 터미널로 접속해서 아래 명령들을 수행합니다. 디바이스명은 EC2마다 차이가 있을 수 있으므로 본인 환경에…

0 Comments

AWS CodeCommit The requsted URL returned error 403

https://docs.aws.amazon.com/codecommit/latest/userguide/troubleshooting-ch.html [credential] helper = helper = !aws --profile CodeCommitProfile codecommit credential-helper $@ UseHttpPath = true 이렇게 비어있는 Helper 설정을 넣어서 해결 했는데 이게 해결이 정확히 된 건지 모르겠다.

0 Comments

Ubuntu에 AWS Cloudwatch log agent 설치 및 실행 방법

아래 내용을 진행하기 전에 log agent를 실행할 EC2 인스턴스에 cloudwatchAgentServerPolicy Role을 먼저 설정해주어야 합니다. Agent 설치 wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb sudo dpkg -i -E ./amazon-cloudwatch-agent.deb Wizard를 이용한 설정 sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard 위 명령을 사용하면…

0 Comments

aws instance에서 shell script로 codecommit에 push 하기

AWS Intance에서 shell script를 cron에 등록하여 자동으로 code push를 하도록 만들고 싶었다. 대략 아래와 같은 간단한 script를 만들어봤다. #!/bin/sh BUCKET_PATH="s" AWS="/usr/local/bin/aws" rm -rf /tmp/project_code ${AWS} s3 cp ${BUCKET_PATH}/project.tar.gz /tmp/project.tar.gz cd…

0 Comments

python으로 aws s3 bucket 다루기

s3 bucket에 있는 파일 목록 보기 import boto3 s3 = boto3.resource('s3') my_bucket = s3.Bucket('some/path/') for my_bucket_object in my_bucket.objects.all(): print(my_bucket_object) 참고 python - Listing contents of a bucket with boto3 -…

0 Comments

aws lambda layer 사용하기

AWS Lambda에서는 몇몇 기본 패키지 외에는 사용할 수 없다. 따라서 lambda로 복잡한 기능을 수행하기 위해서는 layer 기능을 사용한다. layer는 lambda에서 추가적인 패키지를 사용 가능하도록 하는 것이다. 설명이 복잡하지만 단순히 내가…

0 Comments

Visual Studio Code와 AWS 인스턴스 연동

VS Code를 이용해서 AWS 인스턴스에 있는 소스코드 수정 VS Code에서 원격으로 AWS 인스턴스에 있는 소스코드를 수정하기 위해 Remote - SSH라는 플러그인을 설치한다. 플러그인을 검색하면 위와 같은 플러그인을 설치 할 수…

0 Comments

AWS EC2 인바운드 규칙 설정 방법

EC2 인스턴스를 아무 IP 대역이나 열어두는 경우 지속적인 트래픽 공격을 받을 수 있다. 때문에 개발용으로 사용중이라면 인바운드 규칙을 설정함으로써 보안을 유지할 수 있다. EC2 메뉴에 '보안그룹' 메뉴가 있다. EC2 인스턴스를…

0 Comments