permanentredirect s3 for unspecified endpoint

后端 未结 3 753
北恋
北恋 2021-01-14 12:42

I\'m experimenting with s3 but im running into a permission problem (i think).

Output:

 AWS::S3::PermanentRedirect in CkeditorController#create

The          


        
相关标签:
3条回答
  • 2021-01-14 13:33

    With paperclip version 3.1.4, simply adding a s3_host_name key to my s3.yml file worked:

    development:
      bucket: 'bucket.name'
      access_key_id: 'xxx'
      secret_access_key: 'xxx'
      s3_host_name: 's3-eu-west-1.amazonaws.com'
    
    0 讨论(0)
  • 2021-01-14 13:33

    We can use default endpoint like following code.

    s3_credentials: {
         access_key_id: AWS_CONFIG['access_key_id'],
         secret_access_key: AWS_CONFIG['secret_access_key'],
         bucket: AWS_CONFIG['bucket'],
    },
    s3_host_name: 's3.amazonaws.com',
    s3_endpoint: 's3.amazonaws.com',
    storage: :s3,
    s3_headers:     { "Cache-Control" => "max-age=31557600" },
    s3_protocol:    "https",
    bucket:         AWS_CONFIG['bucket'],
    :url =>':s3_domain_url',
    :path => '/:class/:attachment/:id_partition/:style/:filename',
    default_url:   "/:class/:attachment/:id/:style/:basename.:extension",
    default_style: "medium"
    
    0 讨论(0)
  • 2021-01-14 13:35

    I suppose your bucket is not in US Standard zone. Have you tried to add "AWS_CALLING_FORMAT: SUBDOMAIN" to your .yml file? The request should be pointed then to the endpoint corresponding with the region of your bucket.

    0 讨论(0)
提交回复
热议问题