So I'm following the instructions on the sitemap_generator Gem for uploading the sitemap to S3 (since it wasn't being read from the "public" folder) and I keep getting the following error:
In '/var/www/mysite/releases/20200902316/public/':
rake aborted!
Aws::S3::Errors::AccessDenied: Access Denied
This is kind of funny given that I'm using the exact same credentials for Active_Storage on S3 and that's working just fine.
Here's my sitemap.rb
require 'aws-sdk-s3'
# Set the host name for URL creation
SitemapGenerator::Sitemap.default_host = "https://mywebsite.com"
SitemapGenerator::Sitemap.adapter = SitemapGenerator::AwsSdkAdapter.new('s3_bucket',
aws_access_key_id: 'my_access_key',
aws_secret_access_key: 'my_secret',
aws_region: 'us-east-1'
)
This is all straight from the ReadMe on the site_generator page... So I can't quite understand why it wouldn't be working if the same credentials work fine for Active Storage...