I'm trying to list the files in the bucket named
require require 'aws-sdk'
credentials: Aws::Credentials.new(key, key2)
s3 = Aws::S3::Client.new
/Users/user/.rbenv/versions/2.2.3/lib/ruby/2.2.0/net/http.rb:879:in `initialize': unable to connect to `s3.ireland.amazonaws.com`; SocketError: getaddrinfo: nodename nor servname provided, or not known (Seahorse::Client::NetworkingError)
Your region name is incorrect. While that region is colloquially known as Ireland, the API name is
eu-west-1. There is a full list of regions here