How to clear S3 endpoint when moving from GCP bucket to AWS s3?

A bit unrelated but when I have had issues with ENV variables being taken up (with CORS settings for example) I have had to do several rounds of different combinations to get the variables in.

Hopefully you get it sorted soon!