How to use AWS' S3 on label

source code example


  1. Create a user from AWS Identity and Access Management (IAM) and navigate to the console by logging in to the IWS console.

  2. Give this user access to the S3 bucket

    • , connect the appropriate S3 access policy, such as 'Amazon S3 Full Access', to grant this user permission.

  3. Generate an access key for that user

    • , and give it to the user. This access key is used to access AWS resources over programming code. (e.g. Lambda/S3rd place)..In

  4. AWS S3

    Create a Bucket

    , create a new bucket by navigating to the AWS S3 console (there is no permission setting for the bucket and no upload problem even if it is blocked from public access) Install the

  5. Project SDK from the AWS Compellor.

    composer require league/flysystem-aws-s3-v3 "^3.0"
  6. Laravel 환경 파일 (.Enter AWS information in env)

    • of Laravel project.Enter information in the env file, such as the AWS access key and S3 bucket name.

      AWS_ACCESS_KEY_ID=[액세스키명]
      AWS_SECRET_ACCESS_KEY= [Access Key Password]
      AWS_DEFAULT_REGION= [S3 Bucket Generation Area]
      AWS_BUCKET= [Bucket Name]
      AWS_USE_PATH_STYLE_ENDPOINT=false

    Create a

    Laravel source code

    • Create a source code that implements the functions required by the

      Laravel project. You can use the AWS SDK to store or retrieve data in the S3 bucket.



참조

파일스토리지

참조코드

Sep 17, 2023 Views 254