This Guidance demonstrates how to implement a contextual advertising approach with enhanced machine learning capabilities, designed to reach target audiences without using third-party cookies. Contextual advertising allows advertisers to reach an audience based on the content consumed by users. The approach here utilizes an event-driven, serverless architecture that is highly scalable and cost-optimized. It enables demand-side platforms (DSPs), advertisement publishers, and supply-side platforms (SSPs) to use AWS artificial intelligence and machine learning (AI/ML) services. These services extract relevant metadata from content and map it to their own or industry-standard taxonomy. This metadata informs programmatic bids for publishers, brand safety for advertisers, and advertisement creative classification for supply-side platforms.