Create a user from AWS Identity and Access Management (IAM) and navigate to the console by logging in to the IWS console.
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.
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
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
Project SDK from the AWS Compellor.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.
composer require league/flysystem-aws-s3-v3 "^3.0"
참조