The modules that need to be installed
Drupal libraries: https://www.drupal.org/project/librariesS3 File System : https://www.drupal.org/project/s3fs
AWS SDK for PHP: https://github.com/aws/aws-sdk-php/releases
Note:
1. AWS SDK for PHP is a dependency, but you need to pay attention to the version, because the current version is 3, while S3 File System needs the version of 2. So remember to download the right version.
2. There is also a drupal module trying to install AWS SDK for PHP by composer and the URL is https://www.drupal.org/project/awssdk2. It's not working for me, cause the composer manager module which the awssdk2 module depends on is not working with my drupal. So try to avoid using awssdk2 module to install AWS SDK.
Enable the modules
Put AWS SDK for PHP into the libraries folder and rename the AWS library folder as awssdk2.Enable S3 File System module.
Check whether it's installed correctly
Go to Admin Pane : admin/config/media/s3fsSwitch to the Actions tab and click the 'Refresh file metadata cache'. If AWS SDK for PHP not found error doesn't show up, it means the installation is successful.