0

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:

enter image description here

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?

2
  • What endpoint do you have in mind? What's your use case - is this thinking about security or misconfiguration. I think you need to edit your question to give more context if you want useful answers.
    – Tim
    Oct 4, 2016 at 22:59
  • I'm thinking about misconfiguration. I only want to know if I make a REST request via SDK in a EC2 instance this request could go outside the Amazon cloud go outside of the Amazon network or not? I just dont want to suppose that every request is routed only inside the Amazon cloud, I couldn't find any documentation proving that the API calls are routed inside the AWS network only. Oct 5, 2016 at 16:07

1 Answer 1

0

For S3 specifically, the pricing page states that same-region data in/out from S3 to EC2 is free. That strongly suggests it's routing internally (and if it isn't, there's not much reason to care - they're billing it as if it's internal, and it'll be over HTTPS for security).

6
  • How can I ensure only internal routing? Oct 5, 2016 at 17:20
  • Is there any real proof that the URL's used by the SDK are routed internally? Oct 5, 2016 at 17:22
  • @MikeVelazco Why would you care if they're not billing you for it and the calls are over HTTPS?
    – ceejayoz
    Oct 5, 2016 at 17:23
  • I'd like to think that the internal routing is the fastest way to communicate between services. I have worked with soft layer and if your request come from outside of their network the price of the request is higher. Oct 5, 2016 at 18:23
  • Again, AWS promises on their pricing page that an S3<-->EC2 communication within the region is free. I've demonstrated that conclusively. The scenario of higher request pricing can be dismissed here.
    – ceejayoz
    Oct 5, 2016 at 18:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .