Upload a generated XML file to S3

Check out this post, it might help.