title: Node.JS Upload multiple images to AWS S3 Async
body: <p>I created 2 functions, one for uploading one image and another for uploading multiple images.</p>
  
  <p>Uploading one image is working fine for me while in uploading multiple images, the images are uploaded to S3 and then I'm trying to push to an array each image path, but when I return the array it's empty</p>
  
  <pre><code>module.exports = {
  async uploadOneFile(image) {
      const params = {
          Key: moment().format('YMMDDHHmmss') + '-' + image.upload.name,
          Bucket: config.get("AwsConfig.bucketName"),
          Body: image.upload.data,
          ContentType: image.upload.mimetype,
          ACL: 'public-read-write'
      };
  
      await s3.putObject(params).promise();
      return baseURL + params.Key;
  },
  uploadMultipleFiles(images) {
      const imagesPath = [];
  
      images.upload.map(async (image) =&gt; {
          const params = {
              Key: moment().format('YMMDDHHmmss') + '-' + image.name,
              Bucket: config.get("AwsConfig.bucketName"),
              Body: image.data,
              ContentType: image.mimetype,
              ACL: 'public-read-write'
          };
  
          await s3.putObject(params).promise();
          imagesPath.push(baseURL + params.Key);
      });
  
      return imagesPath;
  }};
  </code></pre>
  
  <p>I call the function like this:</p>
  
  <pre><code>const result = await uploadMultipleFiles(req.files);
  console.log(result);
  </code></pre>
  
  <p>And in console output I receive []</p>
  
  <p>Please help.</p>