Fix: endpoint usage.
use same code for initialization and configuration of S3 instance