亚马逊s3几小时后停止工作(Rails app)

时间:2016-09-07 09:45:32

标签: ruby-on-rails amazon-s3 fog

我有rails app。我正在使用gems carrierwave / minimagick / fog管理我的图像并将其上传到Amazon S3。有时候一切都运转良好。但几个小时后,我有了这个:

Excon::Error::Forbidden in Admin::ArticlesController#create



   Expected(200) <=> Actual(403 Forbidden) excon.error.response :body => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidAccessKeyId</Code><Message>The AWS Access Key Id you provided does not exist in our records.</Message><AWSAccessKeyId>AKIAJ3GP4YRT36WGG6HQ</AWSAccessKeyId><RequestId>A53700AC2E670A28</RequestId><HostId>ha46+HNLMC47MirxR0sx3AoDbtvH/qdz5r7PgCDzagCGssuDA/D8+JhES3NRF1+greBf7Y1RpXo=</HostId></Error>" :cookies => [ ] :headers => { "Connection" => "close" "Content-Type" => "application/xml" "Date" => "Wed, 07 Sep 2016 08:22:08 GMT" "Server" => "AmazonS3" "x-amz-id-2" => "ha46+HNLMC47MirxR0sx3AoDbtvH/qdz5r7PgCDzagCGssuDA/D8+JhES3NRF1+greBf7Y1RpXo=" "x-amz-request-id" => "A53700AC2E670A28" } :host => "premierleag.s3.amazonaws.com" :local_address => "172.17.8.156" :local_port => 36578 :path => "/uploads/article/picture/44/DSC07321.JPG" :port => 443 :reason_phrase => "Forbidden" :remote_ip => "54.231.114.11" :status => 403 :status_line => "HTTP/1.1 403 Forbidden\r\n"

发生此错误后,我创建了新的访问密钥,一切正常,但几个小时后,我再次出现此错误。怎么了。此外,我将策略附加到用户,授予管理员访问权限。有什么想法吗?如果我没有提供足够的信息,请告诉我我会添加。

0 个答案:

没有答案