Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Production sanity test to verify that S3 buckets remain private over time
def buckets
[
'myapp-production-backups',
'myapp-staging-backups',
'myapp-s3-logs'
]
end
def test_buckets_subdomain_private
buckets.each do |bucket_name|
subdomain_url = "http://#{bucket_name}.s3.amazonaws.com/"
assert_includes(`curl --silent --location #{subdomain_url}`, 'AccessDenied')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.