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
히어운트예츠트
히어운트예츠트
건축학 -> 경제학 -> 호주 워홀 -> 해외영업 -> 개발자 -> ?
  • 히어운트예츠트
    기술블로그
    히어운트예츠트
  • 전체
    오늘
    어제
    • All About Programming;)
      • Other than Tech
        • 잡생각
      • Computer Science
        • Terminology and Concepts
        • Network
        • Operating System
        • Database
        • Data Structure
        • Web Development
        • Interview Prep
      • Frontend
        • Javascript Essentials
        • Perfomance Optimization
        • JS Patterns
        • React
        • Next.js
        • Flutter
        • Testing
      • Backend
        • Node.js
      • DevOps
        • Docker & Kubernetes
      • Coding Test
        • LeetCode
        • 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
        • Nativ_2026
      • 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
    자바스크립트 딥다이브
    이벤트
    개인의무한한능력이요구되는세상
    js pattern
    Shared resources
    VoiceJournal
    딥다이브
    polylingo
    leetcode
    DOM
    database
    indie hacker
    structure of os
    Time complexity and Space complexity
    모던 자바스크립트 Deep Dive
    Javascript Essentials
    Operating System
    Data Structure
    Threads and Multithreading
    Network
    How memory manage data
    CPU scheduling algorithm
    커리어
    자바스크립트
    프론트엔드 성능 최적화 가이드
    Binary Tree BFS
    testing
    TCP/IP
    스코프
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
히어운트예츠트
How to Set up S3 bucket
상단으로

티스토리툴바