我正在使用以下代码将文件上传到s3:
s3.meta.client.upload_file(file_location, bucket_name, key,ExtraArgs={'ACL': 'public-read'})
当我使用ACL: Public read时,我的代码返回以下错误,表明我没有这样做的权限。
"errorMessage": "Failed to upload test.xlsx: An error occurred (AccessDenied) when calling the PutObject operation
我试着打包,但我得到:
$ sam package --s3-bucket sam-project-deployment--29 --output-template-file output.yaml --region us-east-2
Error: Unable to upload artifact HelloWorldFunction
referenced by CodeUri parameter of HelloWorldFunction resource.
An error occurred (AccessDenied) when calling the PutObject ope
我只是想用我的安卓应用程序把一个文件上传到一个S3桶里。我尝试了他们所说的一切,做了所有的例子,并使用了第三方库。毫无办法。在运行以下代码时,我一直收到一个拒绝访问的错误:
AmazonS3Client s3Client = new AmazonS3Client( new BasicAWSCredentials("MY KEY", "MY SECRET" ) );
s3Client.createBucket("evenatir");
PutObjectRequest por = new PutObje