Dvc push to public S3 bucket

I’m having a similar issue with pushing to a private bucket. It might be related to IAM roles.

In my case I also get a 404 when I do dvc push. I get the same error if I just run aws s3 ls s3://bucket-name.

However, if I add my work profile name it works: aws s3 ls s3://bucket-name --profile work-profile

I’ve tried setting the AWS_PROFILE env variable to work-profile, but nothing changes. Any idea how I force it to see the right profile?