Guidance for Visual Search on AWS
Elevate your ecommerce experience with reverse image lookup
Overview
How it works
This architecture diagram helps build a simple visual search capability, allowing your users to upload a product image and discover similar looking products from the ecommerce website.
Deploy with confidence
Ready to deploy? Review the sample code on GitHub for detailed deployment instructions to deploy as-is or customize to fit your needs.
Well-Architected Pillars
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
AWS X-Ray traces requests as they flow through API Gateway to underlying services such as Lambda and Amazon S3, providing valuable insights into the application's behavior. Simultaneously, Amazon CloudWatch captures metrics and logs from all services involved in the architecture. By visualizing and analyzing these components using X-Ray, along with the metrics and logs collected by CloudWatch, you can efficiently identify performance bottlenecks and troubleshoot requests.
Security
This Guidance is configured with a multi-layered approach, combining tightly scoped AWS Identity and Access Management (IAM) policies with the access control of API Gateway and the threat mitigation of AWS WAF. This creates a robust security framework that safeguards the application and its underlying resources from potential security threats. Specifically, IAM policies are scoped down to the minimum permissions necessary for each service to function properly, effectively limiting unauthorized access to resources. Furthermore, API Gateway implements API key-based authorization to control API access and is integrated with AWS WAF for protection against web exploits.
Reliability
The fully managed, serverless services offer high availability and automatic scaling to meet fluctuating traffic demands. For example, Lambda, Amazon OpenSearch Serverless, API Gateway, and Amazon S3 adjust their capacity dynamically, while Amazon Bedrock supports provisioned throughput, allowing you to select the appropriate model capacity units for your specific traffic volumes. This combination ensures that the application can handle varying loads without failure, minimizing downtime. The high availability and scalability of these services, coupled with the ability to fine-tune the capacity of Amazon Bedrock, create a robust, reliable architecture capable of consistently serving requests even under demanding conditions.
Performance Efficiency
Amazon Bedrock and Lambda offer several features to optimize your workloads and enhance performance efficiency. With Amazon Bedrock, you can use provisioned throughput mode to meet high request volumes for real-time inference when on-demand capacity isn't sufficient. Additionally, Amazon Bedrock offers a batch inference capability that is ideal for initial and scheduled bulk embedding creation. Lambda provides provisioned concurrency, which pre-provisions Lambda execution environments for a configured number of instances. This can potentially reduce cold-start occurrences and improve Lambda execution timing, further boosting your application's performance.
Cost Optimization
Amazon Bedrock, Amazon S3, and Lambda offer various features to optimize your costs. Amazon Bedrock, as a fully managed service, eliminates operational and management costs associated with deploying, scaling, and managing foundation models. It provides flexible pricing options with on-demand and provisioned throughput modes, allowing you to choose the most cost-effective plan. Amazon S3 offers different storage tiers and lifecycle policies, so you can automate data movement between tiers and optimize storage costs. For compute resources, Lambda is covered by Compute Savings Plans, offering discounted pricing for Lambda executions. You can further optimize Lambda costs by selecting suitable memory and processor configurations.
Sustainability
Lambda, API Gateway, and Amazon S3 scale dynamically with your application's incoming traffic, maximizing resource utilization and limiting the environmental impact. These services are not pre-provisioned, allowing for efficient resource allocation. Lambda allows you to choose optimal memory, storage, and processor configurations, further maximizing resource efficiency. With Amazon S3, you can set lifecycle policies to automatically delete stale objects, reducing unnecessary data storage. The scalability and flexibility of these services help you minimize wasted resources and reduce your overall environmental footprint.
Disclaimer
Did you find what you were looking for today?
Let us know so we can improve the quality of the content on our pages