I needed to add CORS headers so that client-side JavaScript could upload images directly to an S3 bucket.
I used the Amazon S3 console tool https://console.aws.amazon.com/s3/home?region=us-east-1#&bucket=name-of-bucket&prefix=
Permissions -> Add CORS Configuration
And added the following:
<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>PUT</AllowedMethod>
<AllowedMethod>POST</AllowedMethod>
<AllowedMethod>GET</AllowedMethod>
<AllowedMethod>DELETE</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>