cpp/example_code/cross-service/photo_asset_manager/README.md
This example shows you how to use the AWS SDK for C++ to create a photo management application using AWS services and a serverless architecture.
The Photo Asset Management (PAM) example app uses Amazon Rekognition to categorize images, which are stored with Amazon S3 Intelligent-Tiering for cost savings. Users can upload new images that are analyzed with label detection. Those labels are then stored in an Amazon DynamoDB table. Users can later request a bundle of images associated with a list of labels. When images are requested, they are retrieved from Amazon Simple Storage Service (Amazon S3), zipped, and the user is sent a link to download the resulting zip file. For more details on the complete application, see the PAM application directory in this repository.
The frontend is a single React app that uses the Cloudscape Design System. With the React app, users can authenticate with an Amazon Cognito flow. The app is deployed to an Amazon Simple Storage Service (Amazon S3) bucket using the provided AWS Cloud Development Kit (AWS CDK) stacks. It is publicly exposed by using an Amazon CloudFront distribution. The name is dynamically created during the AWS CDK deployment.
The backend of the PAM application is implemented with these AWS Lambda functions:
To run the code in this example, you need the following:
Follow the instructions in the README for the Photo Asset Manager application CDK. to use the AWS Cloud Development Kit (AWS CDK) or AWS Command Line Interface (AWS CLI) to create and manage the resources used in this example. You must be running Docker in order to complete the steps for the AWS CDK.
The code is automatically built and uploaded when the resources are created.
The code is built using Docker and the provided Dockerfile.
The built code is located within the Docker container at /pam_lambda/build/cpp_pam_lambdas.zip.
To build and copy the code to the local file system, use the following commands.
docker build . -f Dockerfile -t cpp_pam_image
docker run --name pam_lambda cpp_pam_image
docker cp pam_lambda:/pam_lambda/build/cpp_pam_lambdas.zip .
To avoid charges, delete all the resources that you created for this tutorial. Follow the instructions in the README for the Photo Asset Manager application CDK to clean up the resources for the CDK stacks.
Congratulations! You have created and deployed a Photo Asset Management application.
For more AWS multiservice examples, see cross-service.