Embracing AWS Lambda and serverless architecture

Capital One's Serverless Center of Excellence helps our engineers stay current on Lambda best practices and lessons.

Capital One has been on a powerful tech transformation journey for many years.  In 2020, we closed our last data center and moved all-in to the Cloud, with AWS as our primary cloud provider. The Cloud has allowed us to move faster and focus on building the applications that provide value to our customers. Today, we are focused on modernizing our tech stack by adopting serverless-first architectures. 

Capital One uses serverless at scale

See how we’re building and running serverless applications at a massive scale.

Why Capital One embraced AWS Lambda serverless architecture

We no longer need to manage physical data centers and infrastructure, but our scale requires us to manage AWS accounts and resources in those accounts. At the beginning of our cloud journey, we deployed our applications to Amazon EC2. This means our developers were responsible for managing the entire tech stack. Developers had to deploy EC2 instances, manage the scaling, configure the autoscaling policies and manage the Operating Systems and Containers deployed to these EC2 instances. We had to deal with patches, vulnerabilities and other tasks we call “Run the Engine” (RTE). We quickly realized RTE costs are significant for all teams.

Run the Engine (RTE)

Arbitrary uniqueness undifferentiated heavy lifting

This is one of our driving factors in why we decided to adopt serverless approaches. Today, our preferred choice of computing is functions via AWS Lambda or Containers with ECS Fargate. Lambda allows our developers to focus on building the application logic that delivers value to our customers. We let AWS handle all of the other tasks that cost us time but do not add value.

serverless

AWS managed no more burden on developers

Unveiling our Serverless Center of Excellence: Lambda best practices & lessons

We operate within AWS at a massive scale – we have 1000s of accounts and 10s of 1000s of Lambda functions. We learned it’s really important to set both development standards and account management standards. However, Capital One is a large enterprise made of multiple Lines of Businesses (LOBs) and decisions that affect the entire enterprise should not be made in a silo. This led to the launch of our Serverless Center of Excellence (CoE). Our COE is made up of representatives from each LOB – we meet on a regular basis to talk about best practices and set standards that work for the entire enterprise. 

Center of Excellence

Center of excellence diagram

Some things we learned from our journey include:

  • You probably need new tools. AWS SAM is an excellent developer tool that allows you to build and iterate locally.

  • Lambda shifts the unit of scale from Requests/Second to Concurrency and this will be a new concept to all. Make sure your developers understand how to calculate concurrency.

  • Multi Account/Small Accounts are better than a few large accounts. This strategy allows you to limit blast radius and provide each team with their own accounts.

multi account

Use a multi-account strategy and set org level SCP’s for safety

  • Make sure you set development standards.  For example, we require a LIVE_TRAFFIC alias to be the entry point for all Lambda functions. This ensures that we understand how all Lambda functions are executed. We also require all functions deploy using versions – this ensures consistency and prevents accidental changes.

Key takeaways from our AWS serverless development experience

Finally, here are the top best practices that have helped us build better serverless applications in the cloud:

top best practices

Using Lamba Power Tuner Checklist

Our AWS Lambda journey: A blueprint for innovation and collaboration

Capital One's journey to AWS Lambda serverless architecture marks a significant step in our continuous pursuit of innovation and efficiency in the tech landscape. The transition from data centers to the AWS Cloud and adoption of a serverless-first approach exemplify the power of embracing cutting-edge technologies. 

The establishment of the Serverless Center of Excellence and adherence to best practices further demonstrate our commitment to excellence and collaboration within a massive-scale environment. These shared experiences serve as an insightful guide for those looking to leverage the potential of serverless computing and enhance their cloud-based operations.


George Mao, Sr. Distinguished Engineer, Bank Architecture

George is a Senior Distinguished Engineer at Capital One. He is the Lead DE for Capital One's serverless strategy and leads the effort to transform the company into a serverless-first organization. He leads the Serverless Center of Excellence and is responsible for setting enterprise patterns, best practices, and the developer experience.