2021-04-12-TIL

AWS 요금설정

  • 1센트 이상이 나오면 이메일이나 문자로 오도록 설정하면 요금 청구 여부를 바로 알 수 있다.
  • 슬랙이나 카톡으로 알림 설정을 연동하여 보다 편리하게 받아볼 수 있다.

카카오 커머스 2단계 후기 by 아이작

VScode로 진행해야해서 환경설정에 어려움이 많았지만, 결국 인텔리제이에서 설정하고 git으로 push하면 된다는 것을 뒤늦게 깨달았다.


IAM

IAM은 일반적인 단어이다. AWS에서는 리소스의 접근에 대한 제어를 안전하게 하도록 여러가지 기능을 제공해준다. 하지만 실제 관리는 사용자가 직접 해야한다.

권한설정은 실제로 매우 어렵다. 왜냐하면 리소스 간에 계층구조가 생기고 리소스 마다 동작하는 API가 다르기 떄문이다. graninuty가 달라서 CRUD도 기능별로 가능여부가 다르다. 따라서 이를 쉽게 하기위해서 오픈소스 IAM을 사용한다.

IAM 계정

처음에 이메일과 신용카드로 가입할 수 있다. 이렇게 가입한 계정을 root 계정이라고 한다. 이 계정은 대부분 직접 사용하지 않는다. 왜냐하면 아마존 계정과 공유가 되고, 본계정의 노출 위험성이 있기 때문이다. admin이 노출되면 root로 삭제가 가능하지만, root가 노출되면 달리 방법이 없다.

따라서 IAM으로 계정을 생성하고 MFA를 생성하도록 한다. 핸드폰을 바꿀때는 반드시 이것을 해지하고 기기변경을 해야한다. 그중에 admin 사용자를 가장 먼저 생성한다. admin 계정을 생성할 때는 admin 정책을 생성하여 붙이고 시작한다.

AWS는 일종의 웹 서비스이다. 따라서 모든 통신을 웹 API를 통해서 한다.


상세보기 기능 필요x

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-validation'
    //spring-boot-starter-web 은 logpack-core 와 logpack-classic 을 포함하고 있습니다.
    implementation 'org.springframework.boot:spring-boot-starter-web'
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc:2.2.5.RELEASE'
    //spring-boot-start-test 는 아래 dependency 를 포함합니다.
    //JUnit 5 (including the vintage engine for backward compatibility with JUnit 4)
    //Spring Test & Spring Boot Test - This is the spring-boot-test dependency)
    //AssertJ, Hamcrest, Mockito, JSONassert, and JsonPath.
    runtimeOnly 'mysql:mysql-connector-java'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

Spring Boot application run in background

  • https://www.journaldev.com/27875/nohup-command-in-linux

Git checkout -> switch/restore

  • https://blog.outsider.ne.kr/1505

Returning custon status codes from spring controllers

  • https://www.baeldung.com/spring-mvc-controller-custom-http-status-code

.gitignore in subdirectory

  • https://stackoverflow.com/questions/3719574/is-it-possible-to-ignore-gitignore-rules-in-subdirectory

GitHub + Slack 연동

  • https://uang.tistory.com/13