When S3 connection runs on AWS instance (called EC2), it is best practice to *not* use the credentials but use instance profile instead. Unfortunately, this scenario is not supported in WinSCP – it requires the user to enter Access and Secret Keys. CLI command would look the same:
aws s3 cp example.txt s3://bucket/examples/
without requiring credentials
It would be really nice to not require the user to enter credentials!
UPDATE: Sorry, while I wrote correctly in the subject of the post, I should have said instance role
rather than instance profile. Sorry for the confusion