Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- typescript #constructor #class #public #private
- react#로스트아크#mbti#테스트
- Promise #async #await #try #catch
- TypeScript #문법
- deserializeUser
- Passport
- sendFile
- e.target
- git vscode
- github#githubpages#gh-pages#deploy
- connect-mongo
- typescript #react #jsx #component #usestate
- git#github#init#add#commit#restore#log#staging area#repository#git사용법
- ejs 문법
- mongodb 입출력
- GitHub Actions
- insertone
- typescript #class #extends #public #private #protected #static
- typescript #unknown
- 정적 페이지
- updateone
- updatemany
- __dirname
- github#로컬저장소#원격저장소
- github#githubpages#빈화면#basename
- CSS
- typescript #import #export #*
- typescript #class #constructor #public #private #static #extends #protected #typeof #in #instanceof #never
- expess
- serializeUser
Archives
- Today
- Total
VaIice의 이야기
[Node.js] 이미지 보관 - AWS S3 (1) 본문
액세스 관리 - 사용자
한 AWS 계정에 많은 사람들이 접속해서 사용 가능
새로운 사용자 계정(하위계정)을 만드는 것
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "1",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::자신의 버킷명/*"
},
{
"Sid": "2",
"Effect": "Allow",
"Principal": {
"AWS": "자신의 ARN명"
},
"Action": [
"s3:PutObject",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::자신의 버킷명/*"
}
]
}
Version: AWS에서 현재 사용되고 있는 정책 언어의 버전 날짜 (최신 버전)
Statement: 정책 생성 (위 코드는 2개 생성)
Sid: 1 정책: *(모두)가 S3를 Get할 수 있다.
Sid: 2 정책: ARN를 가진 유저만 S3를 Put, Delete할 수 있다.
[
{
"AllowedHeaders": [
"*"
],
"AllowedMethods": [
"PUT",
"POST"
],
"AllowedOrigins": [
"*"
],
"ExposeHeaders": [
"ETag"
]
}
]
AllowedOrigins: 실제 서비스면 서비스 도메인.com
작년의 나는 왜 기록을 안 해놨을까
'[Node.js]' 카테고리의 다른 글
[Node.js] API별 파일 분리 (0) | 2024.07.20 |
---|---|
[Node.js] 이미지 보관 - AWS S3 (2) (2) | 2024.07.19 |
[Node.js] 환경변수 관리 (3) | 2024.07.19 |
[Node.js] 비밀번호 암호화 (hashing) 및 회원가입 예제 (2) | 2024.07.18 |
[Node.js] Session, Token, OAuth, passport (2) | 2024.07.16 |