一、在上传之前,需要先获取到AWS的S3服务的Access key ID和Secret access key
1.账号右边选择安全凭证
2.选择访问密钥,创建秘钥,就可以生成Access key ID和Secret access key
https://s3.console.aws.amazon.com/s3/buckets?region=us-east-1
3.创建存储桶名称
4.设置存储桶权限
一。公共访问权限关闭
二。存储桶策略设置
{
"Version": "2012-10-17",
"Id": "S3PolicyId1",
"Statement": [
{
"Sid": "statement1",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject"