How to Set up S3 bucket

2021. 4. 11. 15:59·Computer Science/Terminology and Concepts

The steps to take

1. Create an account on console.aws.amazon.com

2. Create a user and a new bucket. Note the accessKeyId, the secretAccessKey and ARN

3. Add policy to the bucket and the user, add CORS to the bucket.

 

1) policy

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AddCannedAcl",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:my arn"
                ]
            },
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::onclick/*"
            ],
            "Condition": {
                "StringEquals": {
                    "s3:x-amz-acl": [
                        "public-read"
                    ]
                }
            }
        }
    ]
}

2) cors

S3 now expects the rules to be in Array Json format.

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET",
            "HEAD"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [],
        "MaxAgeSeconds": 3000
    }
]

 

 

Source from

  • www.youtube.com/watch?v=cDj4LPTLR3o
  • codeytek.com/how-to-create-a-user-and-bucket-amazon-web-services-aws/
  • Step to upload from code: codeytek.com/course/upload-files-images-on-amazon-web-services-course/upload-files-images-on-amazon-web-services-content/file-uploads-on-amazon-web-services-aws-multer-s3-node-js-react-js-express-aws-sdk/
  • cors: stackoverflow.com/questions/17533888/s3-access-control-allow-origin-header

 

'Computer Science > Terminology and Concepts' 카테고리의 다른 글

How to use Real-time DB of Firebase  (0) 2021.04.20
React Convenient Tools - Prettier, ESLint, Snippet  (0) 2021.04.19
프론트엔드 필수 반응형 CSS 단위 정리  (0) 2021.04.08
Difference between URI and URL  (0) 2021.04.06
Rest API  (0) 2021.04.06
'Computer Science/Terminology and Concepts' 카테고리의 다른 글
  • How to use Real-time DB of Firebase
  • React Convenient Tools - Prettier, ESLint, Snippet
  • 프론트엔드 필수 반응형 CSS 단위 정리
  • Difference between URI and URL
JTB
JTB
웹/앱 개발 정보를 공유하고 있습니다.
  • JTB
    JTechBlog
    JTB
  • 전체
    오늘
    어제
    • All About Programming;) N
      • Computer Science
        • Terminology and Concepts
        • Network
        • Operating System
        • Database
        • Data Structure
      • Frontend
        • Javascript Essentials
        • Perfomance Optimization
        • JS Patterns
        • Next.js
        • Flutter
      • Backend
        • Node.js
      • DevOps
        • Docker & Kubernetes
      • Coding Test N
        • LeetCode N
        • Programmers
      • Tech Books & Lectures
        • Javascript_Modern JS Deep d..
        • Network_IT 엔지니어를 위한 네트워크 입문
      • Projects
        • PolyLingo_2025
        • Build Your Body_2024
        • JStargram_2021
        • Covid19 Tracker_2021
        • JPortfolio_2021
      • BootCamp_Codestates
        • TIL
        • TILookCloser
        • Pre Tech Blog
        • IM Tech Blog
        • Daily Issues and DeBugging
        • First Project
        • Final Project
        • Sprint Review
        • Good to Know
        • Socrative Review
        • HTML & CSS
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
  • 링크

    • 글쓰기
    • 관리
  • 공지사항

  • 인기 글

  • 태그

    mobile app
    이벤트
    database
    need a database
    Shared resources
    자바스크립트
    Threads and Multithreading
    딥다이브
    Network
    모던 자바스크립트 Deep Dive
    structure of os
    indie hacker
    TCP/IP
    Data Structure
    Time complexity and Space complexity
    testing
    CPU scheduling algorithm
    Operating System
    How memory manage data
    커리어
    Binary Tree BFS
    자바스크립트 딥다이브
    polylingo
    js pattern
    VoiceJournal
    JavaScript
    DOM
    프론트엔드 성능 최적화 가이드
    leetcode
    스코프
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
JTB
How to Set up S3 bucket
상단으로

티스토리툴바