Factored out s3 connection and added method for retrieveing keys