I´m using the PHP AWS SDK and I was looking for the best way to aviod networking issues. The principal question is:
If a EC2 server makes a REST request via SDK, could be possible that this request were redirected someway outside and then inside the Amazon Cloud?
Does Amazon have any extra fee if the request makes "extra steps" (like DNS resolutions or things like)?
Just as an example, I'm using the S3Client
class:
$oS3 = new \Aws\S3\S3Client(array(
'version' => 'latest',
'region' => S3_REGION,
'credentials' => array(
'key' => S3_KEY,
'secret' => S3_SECRET
)
));
$oS3->putObject(array(
'Bucket' => <Bucket>,
'Body' => <File_content>,
'Key' => <File_path>,
));
I've seen that there is an argument called endpoint
and there you can assign another URL. I found this list of possible endpoints but I don't know it it could really have any improvement to set one or let the SDK to create or assign one by default.
UPDATE
Just to make it simpler I made an image:
My question is:
Are both cases happening or either if I let the default URI or I assign one could happen one case or another?