Images didn't load after configuring S3 uploads

Hi Jay. Tried executing the command in ECS but encountered an error:

Just to ask, should this be ran in EC2 only? Is there another way to migrate uploads or update image URLs? Currently, the EC2 instance is stopped and the current ECS setup uses the domain and database/cache already so I’m not sure if we can point the domain and database/cache back to the old EC2 (then rebuild) without downtime. Thank you.