title: AWS S3 get object using URL
body: <p>I have a collection of URLs that may or may not belong to a particular bucket. These are not public.</p>
  
  <p>I'm using the nodejs <code>aws-sdk</code> to get them.</p>
  
  <p>However, the <code>getObject</code> function needs params <code>Bucket</code> and <code>Key</code> separately, which are already in my URL.</p>
  
  <p>Is there any way I can use the URL?</p>
  
  <p>I tried extracting the key by splitting URL with <code>/</code> and getting bucket by splitting with <code>.</code>. But the problem is the bucket name can also have <code>.</code> and I'm not sure if key name can have <code>/</code> as well.</p>