Когда я пытаюсь асинхронизировать ресурсы с s3, используя команду AssetSync.sync
или rake assets:precompile
Это выдает ошибку
Excon::Error::Forbidden: Expected(200) <=> Actual(403 Forbidden)
excon.error.response
:body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>SignatureDoesNotMatch</Code><Message>The request signature we calculated does not match the signature you provided. Check your key and signing method.</Message>`
S3 bucketПолитика:
{
"Id": "xxx",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "xxx",
"Action": [
"s3:ListBucket"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::static-assets",
"Principal": "*"
},
{
"Sid": "xxx",
"Action": [
"s3:GetObject",
"s3:GetObjectAcl",
"s3:PutObject",
"s3:PutObjectAcl"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::static-assets/*",
"Principal": "*"
}
]
}
Как решить эту проблему?