Skip to main content

Guidance for Deploying a Prebid Server on AWS

Overview

This Guidance helps publishers deploy a prebid server using a highly-available, multi-Region approach. Publishers with ad units on their webpage or mobile app can capture bids from multiple demand sources using a prebid server deployment on AWS. The architecture follows a microservices approach that supports scalability to meet changing demand, security mechanisms to protect data, and a deployment pipeline to implement changes in minutes.

How it works

This architecture diagram uses a prebid server on AWS that allows demand partners to bid on ad inventory.

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.

This Guidance uses CloudWatch to collect and analyze logs from ELB, Amazon EKS, Kinesis, ElastiCache for Redis, DynamoDB, and Amazon RDS which will help with resource utilization. You can set thresholds on different metrics and configure automatic actions or alerts based on the events.  

Read the Operational Excellence whitepaper 

All IAM policies have been scoped down to the minimum permissions required for the service to function properly. IAM supports role-based access management to provide the right access to resources for authenticating and authorizing requests. AWS KMS helps with storing encryption keys to encrypt the data both in motion and at rest along with encrypting the prebid container image in Amazon ECR. VPC endpoints allow private connectivity to AWS services, which will help in keeping customer traffic on the AWS network.

Read the Security whitepaper 

ELB acts as ingress controller which routes traffic requests from the website with prebid.js file to a healthy Amazon EKS pod. ELB allows for synchronous loose coupling so that traffic won’t be directed to an Amazon EKS pod or node that may be overloaded.  

Read the Reliability whitepaper 

Data streaming service such as Kinesis unblock the application from allocating resources to write log data to disks. This improves overall performance of the application.

Read the Performance Efficiency whitepaper 

Amazon Elastic Compute Cloud (Amazon EC2) Spot instances and AWS Graviton Processors are built for cost-performance optimization. ElastiCache for Redis supports Graviton instances, and data tiering provides an option for lower-cost Non-Volatile Memory Express (NVMe) solid state drives (SSDs) in each cluster node in addition to storing data in memory. You can reduce Amazon EKS costs by using node pools with Graviton and Amazon EC2 Spot instances.

Read the Cost Optimization whitepaper

This Guidance uses managed services, which can be configured with auto scaling so only you only use required capacity. Additionally, Graviton instances use 60% less energy when compared to x86 instances.  

Read the Sustainability whitepaper 

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.