If you request content from S3 or SFTP storage and receive an error in return, check if there are open incidents or maintenance connected with Storage on Status Page.
- Make sure that a file was uploaded to storage. You may use any applications that support S3 or SFTP for that purpose.
- Make sure you use the correct URL form for the request. The scheme for direct storage requests is described in the article. Notice that the Global 2 location includes three regions: use the host of the region, where the file was uploaded. The region’s URL is described in the article.
By default, buckets and files in S3 storage are private and respond with 403 code on external requests. You can set up ACL rules for bucket or file with your S3-application documentation.
- To add a rule for public reading via AWS CLI:
aws s3api put-object-acl --bucket my_bucket --key file.jpg --acl public-read --endpoint-url=https://s3.us-east.gcore.com
My_bucket – the name of the bucket.
File.jpg - the name of the file.
s3.us-east.gcore.com - the region URL.
- To add a rule for public reading via s3cmd:
s3cmd setacl --acl-public s3://my_bucket/file.jpg
my_bucket – the name of the bucket.
file.jpg - the name of the file.