7.8 C
Thursday, November 16, 2023

BMW Cloud Effectivity Analytics powered by Amazon QuickSight and Amazon Athena

This submit is written in collaboration with Philipp Karg and Alex Gutfreund  from BMW Group.

Bayerische Motoren Werke AG (BMW) is a motorized vehicle producer headquartered in Germany with 149,475 workers worldwide and the revenue earlier than tax within the monetary yr 2022 was € 23.5 billion on revenues amounting to € 142.6 billion. BMW Group is likely one of the world’s main premium producers of vehicles and bikes, additionally offering premium monetary and mobility companies.

BMW Group makes use of 4,500 AWS Cloud accounts throughout the whole group however is confronted with the problem of decreasing pointless prices, optimizing spend, and having a central place to watch prices. BMW Cloud Effectivity Analytics (CLEA) is a homegrown device developed throughout the BMW FinOps CoE (Middle of Excellence) aiming to optimize and cut back prices throughout all these accounts.

On this submit, we discover how the BMW Group FinOps CoE carried out their Cloud Effectivity Analytics device (CLEA), powered by Amazon QuickSight and Amazon Athena. With this device, they successfully diminished prices and optimized spend throughout all their AWS Cloud accounts, using a centralized price monitoring system and utilizing key AWS companies. The CLEA dashboards have been constructed on the muse of the Properly-Architected Lab. For extra info on this basis, check with A Detailed Overview of the Price Intelligence Dashboard.

CLEA provides full transparency into cloud prices, utilization, and effectivity from a high-level overview to granular service, useful resource, and operational ranges. It seamlessly consolidates information from varied information sources inside AWS, together with AWS Price Explorer (and forecasting with Price Explorer), AWS Trusted Advisor, and AWS Compute Optimizer. Moreover, it incorporates BMW Group’s inner system to combine important metadata, providing a complete view of the info throughout varied dimensions, resembling group, division, product, and purposes.

The final word objective is to lift consciousness of cloud effectivity and optimize cloud utilization in a cheap and sustainable method. The dashboards, which provide a holistic view along with quite a lot of price and BMW Group-related dimensions, have been efficiently launched in Could 2023 and have become accessible to customers throughout the BMW Group.

Overview of the BMW Cloud Information Hub

On the BMW Group, Cloud Information Hub (CDH) is the central platform for managing company-wide information and information options. It really works as a bundle for assets which can be sure to a selected staging setting and Area to retailer information on Amazon Easy Storage Service (Amazon S3), which is famend for its industry-leading scalability, information availability, safety, and efficiency. Moreover, it manages desk definitions within the AWS Glue Information Catalog, containing references to information sources and targets of extract, remodel, and cargo (ETL) jobs in AWS Glue.

Information suppliers and customers are the 2 basic customers of a CDH dataset. Suppliers create datasets inside assigned area and because the proprietor of a dataset, they’re answerable for the precise content material and for offering acceptable metadata. They’ll use their very own toolsets or depend on supplied blueprints to ingest the info from supply methods. As soon as launched, customers use datasets from totally different suppliers for evaluation, machine studying (ML) workloads, and visualization.

Every CDH dataset has three processing layers: supply (uncooked information), ready (reworked information in Parquet), and semantic (mixed datasets). It’s potential to outline phases (DEV, INT, PROD) in every layer to permit structured launch and check with out affecting PROD. Inside every stage, it’s potential to create assets for storing precise information. Two useful resource varieties are related to every database in a layer:

  • File retailer – S3 buckets for information storage
  • Database – AWS Glue databases for metadata sharing

Overview of the CLEA Panorama

The next diagram is a high-level overview of among the applied sciences used for the extract, load, and remodel (ELT) phases, in addition to the ultimate visualization and evaluation layer. You may discover that this differs barely from conventional ETL. The distinction lies in when and the place information transformation takes place. In ETL, information is reworked earlier than it’s loaded into the info warehouse. In ELT, uncooked information is loaded into the info warehouse first, then it’s reworked immediately throughout the warehouse. The ELT course of has gained reputation with the rise of cloud-based, high-performance information warehouses, the place transformation may be carried out extra effectively after loading.

Whatever the methodology used, the objective is to supply high-quality, dependable information that can be utilized to drive enterprise choices.

CLEA Structure

On this part, we take a more in-depth take a look at the three important phases talked about beforehand: extract, load and remodel.


The extract stage performs a pivotal function within the CLEA, serving because the preliminary step the place information associated to price and utilization and optimization is collected from a various vary of sources inside AWS. These sources embody the AWS Price and Utilization Reviews, Price Explorer (and forecasting with Price Explorer), Trusted Advisor, and Compute Optimizer. Moreover, it fetches important metadata from BMW Group’s inner system, providing a complete view of the info throughout varied dimensions, resembling group, division, product, and purposes within the later phases of information transformation.

The next diagram illustrates one of many information assortment architectures that we use to gather Trusted Advisor information from practically 4,500 AWS accounts and subsequently load that into Cloud Information Hub.

Let’s undergo every numbered step as outlined within the structure:

  1. A time-based rule in Amazon EventBridge triggers the CLEA Shared Workflow AWS Step Capabilities state machine.
  2. Primarily based on the inputs, the Shared Workflow state machine invokes the Account Collector AWS Lambda operate to retrieve AWS account particulars from AWS Organizations.
  3. The Account Collector Lambda operate assumes an AWS Id and Entry Administration (IAM) function to entry linked account particulars by way of the Organizations API and writes them to Amazon Easy Queue Service (Amazon SQS) queues.
  4. The SQS queues set off the Information Collector Lambda operate utilizing SQS Lambda triggers.
  5. The Information Collector Lambda operate assumes an IAM function in every linked account to retrieve the related information and cargo it into the CDH supply S3 bucket.
  6. When all linked accounts information is collected, the Shared Workflow state machine triggers an AWS Glue job for additional information transformation.
  7. The AWS Glue job reads uncooked information from the CDH supply bucket and transforms it right into a compact Parquet format.

Load and remodel

For the info transformations, we used an open-source information transformation device referred to as dbt (Information Construct Device), modifying and preprocessing the info by way of plenty of summary information layers:

  • Supply – This layer comprises the uncooked information the info supply offers. The popular information format is Parquet, however JSON, CSV, or plain textual content file are additionally allowed.
  • Ready – The supply layer is reworked and saved because the ready layer in Parquet format for optimized columnar entry. Preliminary cleansing, filtering, and fundamental transformations are carried out on this layer.
  • Semantic – A semantic layer combines a number of ready layer datasets to a single dataset that comprises transformations, calculations, and enterprise logic to ship business-friendly insights.
  • QuickSight – QuickSight is the ultimate presentation layer, which is immediately ingested into QuickSight SPICE from Athena by way of incremental each day ingestion queries. These ingested datasets are used as a supply in CLEA dashboards.

Total, utilizing dbt’s information modeling and the pay-as-you-go pricing of Athena, BMW Group can management prices by working environment friendly queries on demand. Moreover, with the serverless structure of Athena and dbt’s structured transformations, you’ll be able to scale information processing with out worrying about infrastructure administration. In CLEA there are presently greater than 120 dbt fashions carried out with advanced transformations. The semantic layer is incrementally materialized and partially ingested into QuickSight with as much as 4 TB of SPICE capability. For dbt deployment and scheduling, we use GitHub Actions which permits us to introduce new dbt fashions and modifications simply with computerized deployments and checks.

CLEA Entry management

On this part, we clarify how we carried out entry management utilizing row-level safety in QuickSight and QuickSight embedding for authentication and authorization.

RLS for QuickSight

Row-level safety (RLS) is a key function that governs information entry and privateness, which we carried out for CLEA. RLS is a mechanism that permits us to manage the visibility of information on the row degree based mostly on person attributes. In essence, it ensures that customers can solely entry the info that they’re licensed to view, including an extra layer of information safety throughout the QuickSight setting.

Understanding the significance of RLS requires a broader view of the info panorama. In organizations the place a number of customers work together with the identical datasets however require totally different entry ranges because of their roles, RLS turns into a pivotal device. It ensures information safety and compliance with privateness laws, stopping unauthorized entry to delicate information. Moreover, it provides a tailor-made person expertise by displaying solely related information to the person, thereby enhancing the effectiveness of information evaluation.

For CLEA, we collected BMW Group metadata resembling division, software, and group, that are fairly necessary to permit customers to solely see the accounts inside their division, software, group, and so forth. That is achieved utilizing each a person title and group title for entry management. We use the person title for user-specific entry management and the group title for including some customers to a selected group to increase their permissions for various use circumstances.

Lastly, as a result of there are lots of dashboards created by CLEA, we additionally management which customers a novel person can see and in addition the info itself within the dashboard. That is carried out on the group degree. By default, all customers are assigned to CLEA-READER, which is granted entry to core dashboards that we need to share with customers, however there are totally different teams that permit customers to see extra dashboards after they’re assigned to that group.

The RLS dataset is refreshed each day to catch latest modifications concerning new person additions, group modifications, or another person entry modifications. This dataset can also be ingested to SPICE each day, which robotically updates all datasets restricted by way of this RLS dataset.

QuickSight embedding

CLEA is a cross-platform software that gives safe entry to QuickSight embedded content material with custom-built authentication and authorization logic that sits on high of BMW Group id and function administration companies (known as BMW IAM).

CLEA offers entry to delicate information to a number of customers with totally different permissions, which is why it’s designed with fine-grained entry management guidelines. It enforces entry management utilizing role-based entry management (RBAC) and attribute-based entry management (ABAC) fashions at two totally different ranges:

  • On the dashboard degree by way of QuickSight person teams (RBAC)
  • On the dashboard information degree by way of QuickSight RLS (RBAC and ABAC)

Dashboard-level permissions outline the record of dashboards customers are capable of visualize.

Dashboard data-level permissions outline the subsets of dashboard information proven to the person and are utilized utilizing RLS with the person attributes talked about earlier. Though nearly all of roles outlined in CLEA are used for dashboard-level permissions, some particular roles are strategically outlined to grant permissions on the dashboard information degree, taking precedence over the ABAC mannequin.

BMW has an outlined set of pointers suggesting the utilization of their IAM companies as the only supply of reality for id and entry management, which the crew took into cautious consideration when designing the authentication and authorization processes for CLEA.

Upon their first login, customers are robotically registered in CLEA and assigned a base function that grants them entry to a fundamental set of dashboards.

The method of registering customers in CLEA consists of mapping a person’s id as retrieved from BMW’s id supplier (IdP) to a QuickSight person, then assigning the newly created person to the respective QuickSight person group.

For customers that require extra in depth permissions (at one of many ranges talked about earlier than), it’s potential to order extra function assignments by way of BMW’s self-service portal for function administration. Approved reviewers will then overview it and both settle for or reject the function assignments.

Function assignments will take impact the subsequent time the person logs in, at which era the person’s assigned roles in BMW Group IAM are synced to the person’s QuickSight teams—internally known as the id and permissions sync. As proven within the following diagram, the sync teams step calculates which customers’ group memberships ought to be stored, created, and deleted following the logic.

Utilization Insights

Amazon CloudWatch performs an indispensable function in enhancing the effectivity and usefulness of CLEA dashboards. Not solely does CloudWatch provide real-time monitoring of AWS assets, nevertheless it additionally permits to trace person exercise and dashboard utilization. By analyzing utilization metrics and logs, we are able to see who has logged in to the CLEA dashboards, what options are most often accessed, and the way lengthy customers work together with varied parts. These insights are invaluable for making data-driven choices on find out how to enhance the dashboards for a greater person expertise. By means of the intuitive interface of CloudWatch, it’s potential to arrange alarms for alerting about irregular actions or efficiency points. Finally, using CloudWatch for monitoring provides a complete view of each system well being and person engagement, serving to us refine and improve our dashboards frequently.


BMW Group’s CLEA platform provides a complete and efficient resolution to handle and optimize cloud assets. By offering full transparency into cloud prices, utilization, and effectivity, CLEA provides insights from high-level overviews to granular particulars on the service, useful resource, and operational degree.

CLEA aggregates information from varied sources, enabling an in depth roadmap of the cloud operations, monitoring footprints throughout primes, departments, merchandise, purposes, assets, and tags. This dynamic imaginative and prescient helps establish traits, anticipate future wants, and make strategic choices.

Future plans for CLEA embody enhancing capabilities with information consistency and accuracy, integrating extra sources like Amazon S3 Storage Lens for deeper insights, and introducing Amazon QuickSight Q for clever suggestions powered by machine studying, additional streamlining cloud operations.

By following the practices right here, you’ll be able to unlock the potential of environment friendly cloud useful resource administration by implementing Cloud Intelligence Dashboards, offering you with exact insights into prices, financial savings, and operational effectiveness.

In regards to the Authors

Philipp Karg is Lead FinOps Engineer at BMW Group and founding father of the CLEA platform. He deal with boosting cloud effectivity initiatives and establishing a cost-aware tradition throughout the firm to in the end leverage the cloud in a sustainable manner.

Alex Gutfreund is Head of Product and Expertise Integration on the BMW Group. He spearheads the digital transformation with a selected deal with platforms ecosystems and efficiencies. With in depth expertise on the interface of enterprise and IT, he drives change and makes an influence in varied organizations. His {industry} information spans from automotive, semiconductor, public transportation, and renewable energies.

Cizer Pereira is a Senior DevOps Architect at AWS Skilled Companies. He works carefully with AWS clients to speed up their journey to the cloud. He has a deep ardour for Cloud Native and DevOps, and in his free time, he additionally enjoys contributing to open-source initiatives.

Selman Ay is a Information Architect within the AWS Skilled Companies crew. He has labored with clients from varied industries resembling e-commerce, pharma, automotive and finance to construct scalable information architectures and generate insights from the info. Outdoors of labor, he enjoys enjoying tennis and fascinating in out of doors actions.

Nick McCarthy is a Senior Machine Studying Engineer within the AWS Skilled Companies crew. He has labored with AWS purchasers throughout varied industries together with healthcare, finance, sports activities, telecoms and power to speed up their enterprise outcomes by way of the usage of AI/ML. Outdoors of labor Nick likes to journey, exploring new cuisines and cultures within the course of.

Miguel Henriques is a Cloud Software Architect within the AWS Skilled Companies crew with 4 years of expertise within the automotive {industry} delivering cloud native options. In his free time, he’s always searching for developments within the net growth area and looking for the subsequent nice pastel de nata.

Latest news
Related news


Please enter your comment!
Please enter your name here