dotnetv3/cross-service/PhotoAssetManager/README.md
This example shows you how to use the AWS SDK for .NET (v3) 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 Visual Studio solution PhotoAssetManager.sln includes several projects with different purposes for this example. The Lambda functions included in the solution also use Powertools for AWS Lambda (.NET) for enhanced logging.
dotnet language option when setting up the CDK stack.dotnetla language option when setting up the CDK stack.The PamApi project includes a Swagger integration and setup, with additional test endpoints that can be used for investigating the various application functionality.
You can access this UI by running the PamApi project from Visual Studio in debug mode.
For local development, you will also need to set the following environment variables that are automatically set for you during the AWS CDK deployment.
For local debugging of the PamApiAnnotations project and the Download and
DetectLabels functions, you can use the Mock Lambda Test Tool.
To run the tool for debugging, select the tool from the Debug menu in Visual Studio.
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.