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;)
      • Computer Science
        • Terminology and Concepts
        • Network
        • Operating System
        • Database
        • Data Structure
        • Web Development
      • 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
      • 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
  • 블로그 메뉴

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

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

  • 인기 글

  • 태그

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

  • 최근 글

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

티스토리툴바