Reach your target audience with artificial intelligence (AI)-generated product descriptions
This Guidance demonstrates how generative AI technology can automate your product review and approval process for an e-commerce marketplace or retail website. It uses Amazon Bedrock, a fully managed service that offers a range of high-performing foundation models (FMs) with a broad set of capabilities you need to build generative AI applications. Here, it leverages computer vision and natural language processing to analyze product images, extract relevant attributes, and generate detailed product descriptions. Using the style guidelines of your website or marketplace, this Guidance can also be configured to develop descriptions from supplier-provided specifications and images, driving operational efficiency and improving your shopper's experience.
Please note: [Disclaimer]
Architecture Diagram
[Architecture diagram description]
Step 1
The client sends a request including input data (either a product image or a basic product description to enhance) to the Amazon API Gateway REST API.
Step 2
API Gateway passes the request to AWS Lambda through a proxy integration.
Step 3
When operating on product image inputs, Lambda calls Amazon Rekognition, which uses machine learning to detect objects in the image. Descriptions of the objects detected can then be fed into subsequent steps to create a product description.
Step 4
Lambda calls large language models (LLMs) hosted by Amazon Bedrock, such as the Amazon Titan language models, to produce product descriptions. The LLMs can either enhance existing basic text descriptions or generate new descriptions based on the objects detected by Amazon Rekognition.
Step 5
Lambda passes the response to API Gateway
Step 6
Finally, API Gateway returns the HTTP response to the client.
Well-Architected Pillars
The AWS Well-Architected Framework helps you understand the pros and cons of the decisions you make when building systems in the cloud. The six pillars of the Framework allow you to learn architectural best practices for designing and operating reliable, secure, efficient, cost-effective, and sustainable systems. Using the AWS Well-Architected Tool, available at no charge in the AWS Management Console, you can review your workloads against these best practices by answering a set of questions for each pillar.
The architecture diagram above is an example of a Solution created with Well-Architected best practices in mind. To be fully Well-Architected, you should follow as many Well-Architected best practices as possible.
-
Operational Excellence
Amazon Bedrock, AWS Cloud Development Kit (AWS CDK), Lambda, API Gateway, and Amazon CloudWatch work in conjunction to help you run your workloads efficiently while gaining insights into your operations effectively. Take for instance AWS CDK, which codifies all cloud resources through an infrastructure-as-code (IaC) approach. Using an IaC approach helps ensure that all changes to the environment are controlled and logged, preventing untested changes from making it into production and ensuring that any operator can readily determine the current state of the production system. Moreover, Amazon Bedrock and Lambda both provide serverless compute, without any requirement to upgrade or patch virtual machine images or operating system versions. In addition, the Lambda integration with CloudWatch logs ensures that application logs are stored and searchable without any additional infrastructure required. Metrics from CloudWatch can be used to set appropriate rate limits for clients during normal operation and to prevent abuse and anomalous operations. Finally, API Gateway provides many capabilities to facilitate hosting a production-grade API, such as granular rate-limiting controls to ensure a consistent quality of service for all users.
-
Security
In this Guidance, configuring AWS Identity and Access Management (IAM) and Amazon Cognito can protect your data, systems, and assets in a number of ways that improves your security posture. Specifically, IAM integrates with Lambda, allowing application code running in Lambda to authenticate with other services, like Amazon Rekognition and Amazon Bedrock, without requiring long-lived credentials to be stored anywhere. Furthermore, API Gateway provides a robust outer authentication boundary, without requiring any custom authentication logic. API Gateway also supports multiple authentication mechanisms, including AWS Signature Version 4 or Cognito, allowing you to select the best authentication mechanism for your environment and access patterns.
-
Reliability
Serverless offerings, like Amazon Rekognition, Amazon Bedrock, Lambda, and API Gateway are all deployed across multiple Availability Zones by default. They also do not involve any long-running compute resources that require maintenance, meaning there are fewer failure modes for you to worry about. Using an AWS Region-redundant, fully managed services without any single-points-of-failure provides you with a high degree of redundancy, without requiring any extra work to configure auto-scaling or recovery processes.
-
Performance Efficiency
Amazon Bedrock is a fully managed service that offers your choice of foundation models. Amazon Rekognition is also a fully managed service that helps you add pre-trained computer vision APIs to your applications. These artificial intelligence and machine learning (AI/ML) workloads make it easy to get great performance with AI/ML models without investing heavily in specialized hardware. Especially for AI and ML workloads, using fully managed services provides excellent performance for inference without needing to test many hardware configurations and optimize models to take advantage of certain chip architectures.
-
Cost Optimization
When compared to compute infrastructure that must be provisioned in advance, serverless options like Amazon Bedrock, Amazon Rekognition, and Lambda can be invoked completely on-demand, without any dedicated hosts running when not needed. In addition, when the total cost of ownership is considered, managed services like Amazon Bedrock and Amazon Rekognition allow you to spend less development time on undifferentiated infrastructure work. This drives substantial savings in labor throughout the software development lifecycle. Also, using completely serverless options allows the workload to scale up and down completely dynamically, without any charges accruing during periods of disuse, while also being able to scale to handle spikes in traffic.
-
Sustainability
In the same way that serverless options help reduce cost by eliminating wasteful overprovisioning of compute resources, they reduce the power consumed and environmental impact of the workload as well. In addition, Amazon is committed to renewable energy, and using managed services running on AWS, like Amazon Bedrock, Amazon Rekognition, and Lambda, makes it easier for you to drive down your carbon footprints. Using fully managed, serverless services—particularly managed by a provider like AWS who is deeply invested in renewable energy—helps minimize wasted compute resources and thus unnecessary carbon emissions as well.
Implementation Resources
The sample code is a starting point. It is industry validated, prescriptive but not definitive, and a peek under the hood to help you begin.
Related Content
[Title]
Disclaimer
The sample code; software libraries; command line tools; proofs of concept; templates; or other related technology (including any of the foregoing that are provided by our personnel) is provided to you as AWS Content under the AWS Customer Agreement, or the relevant written agreement between you and AWS (whichever applies). You should not use this AWS Content in your production accounts, or on production or other critical data. You are responsible for testing, securing, and optimizing the AWS Content, such as sample code, as appropriate for production grade use based on your specific quality control practices and standards. Deploying AWS Content may incur AWS charges for creating or using AWS chargeable resources, such as running Amazon EC2 instances or using Amazon S3 storage.
References to third-party services or organizations in this Guidance do not imply an endorsement, sponsorship, or affiliation between Amazon or AWS and the third party. Guidance from AWS is a technical starting point, and you can customize your integration with third-party services when you deploy the architecture.