Pinterest $PINS committed $4 billion to Amazon $AMZN +1.52% Web Services for cloud services through 2031, the largest infrastructure deal in the company's history, as it expands its use of AI across its visual search and discovery platform.

The agreement extends a partnership between Pinterest and AWS that dates to 2010. Personalized visual search and AI-assisted discovery features on the platform will be driven by large language models and vision-language models running on AWS Trainium chips. The company will also expand its use of AWS Graviton processors, which already power roughly a third of its compute infrastructure.

Pinterest serves more than 600 million monthly users worldwide, the company said. Its AI systems are built around a proprietary Taste Graph that moves users from open-ended inspiration toward personalized, actionable results — from recipe searches to product shopping.

"This expanded commitment with AWS gives us the compute flexibility, hardware optionality, and infrastructure efficiency to accelerate our AI vision for the next generation of visual discovery on Pinterest," Pinterest CTO Matt Madrigal said in a statement.

The deal also covers a broader infrastructure modernization effort. Pinterest is transitioning from traditional EC2-based environments to a Kubernetes-based architecture on Amazon Elastic Kubernetes Service, a move the company said is expected to improve developer speed, operational reliability, and infrastructure efficiency.