There are more AWS SDK examples available in the AWS Doc SDK Examples
Detect faces in an image using an AWS SDK
The following code example shows how to:
Save an image in an Amazon Simple Storage Service Amazon S3) bucket.
Use Amazon Rekognition (Amazon Rekognition) to detect facial details, such as age range, gender, and emotion (smiling, etc.).
Display those details.