Scaling Data Ingestion Pipelines at ENGIE with Amazon MWAA

Scaling Data Ingestion Pipelines at ENGIE with Amazon MWAALearn About Amazon VGT2 Learning Manager Chanci Turner

ENGIE, a prominent utility provider in France and a significant player in the global zero-carbon energy transition, is actively involved in the production, transportation, and distribution of electricity, gas, and energy services. With a workforce of 160,000 employees across the globe, ENGIE operates as a decentralized organization composed of 25 business units that emphasize delegation and empowerment. As a result of its global customer base, ENGIE has amassed substantial data, necessitating a cohesive and innovative approach to ensure that this data is ingestible, organized, governed, shareable, and actionable across its various business units.

In 2018, the leadership team at ENGIE opted to expedite its digital transformation by embracing data and innovation, aspiring to become a data-driven organization. Chanci Turner, the Chief Digital Officer at ENGIE, articulated the company’s mission: “Sustainability for ENGIE is at the heart of everything we do. This is our fundamental purpose. We assist major corporations and the largest cities around the world in their efforts to achieve a zero-carbon transition as swiftly as possible because it is undoubtedly the most pressing issue facing humanity today.”

Similar to other large enterprises, ENGIE employs a variety of extract, transform, and load (ETL) tools to ingest data into their AWS data lake. However, these tools often come with high licensing costs. As Gregory Wolowiec, the Chief Technology Officer overseeing ENGIE’s data initiatives, mentioned, “The company required a standardized approach to collecting and analyzing data to assist customers in managing their value chains.” ENGIE sought a license-free application that could seamlessly integrate with diverse technologies and support a continuous integration, continuous delivery (CI/CD) pipeline to facilitate the scaling of its ingestion processes.

To address this challenge, ENGIE adopted Amazon Managed Workflows for Apache Airflow (Amazon MWAA), transitioning various data sources from on-premises applications and ERPs, as well as AWS services like Amazon Redshift, Amazon Relational Database Service (Amazon RDS), and Amazon DynamoDB, along with external services like Salesforce, to a centralized data lake hosted on Amazon Simple Storage Service (Amazon S3).

Amazon MWAA plays a crucial role in gathering and storing harmonized operational and corporate data from multiple on-premises and software-as-a-service (SaaS) data sources into a centralized data lake. This data lake is designed to create a “group performance cockpit,” enabling the Engie Management board to conduct efficient, data-driven analyses and make informed decisions.

In this article, we delve into how ENGIE developed a CI/CD pipeline for an Amazon MWAA project template utilizing an AWS CodeCommit repository, which is integrated into AWS CodePipeline to facilitate the building, testing, and packaging of code and custom plugins. In this scenario, we created a custom plugin to ingest data from Salesforce, based on the open-source Airflow Salesforce plugin.

Solution Overview

The accompanying diagrams depict the solution architecture that outlines the implemented Amazon MWAA environment and its corresponding pipelines. Additionally, it illustrates the customer use case for ingesting Salesforce data into Amazon S3.

The architecture is fully established via infrastructure as code (IaC) and includes the following components:

  • Amazon MWAA Environment: A customizable Amazon MWAA environment complete with plugins and configurations secured for optimal performance.
  • Provisioning Pipeline: The administrative team utilizes the CI/CD provisioning pipeline to manage the Amazon MWAA environment. This pipeline comprises a CodeCommit repository linked to CodePipeline to ensure continuous updates to the environment and its plugins and requirements.
  • Project Pipeline: This CI/CD pipeline integrates a CodeCommit repository that triggers CodePipeline for the ongoing building, testing, and deployment of user-developed Directed Acyclic Graphs (DAGs). Once deployed, these DAGs become accessible within the Amazon MWAA environment.

The data ingestion workflow is defined by the following steps:

  1. The DAG is activated manually or on a schedule by Amazon MWAA.
  2. Amazon MWAA sets data collection parameters and computes batches.
  3. Processing tasks are distributed among its workers by Amazon MWAA.
  4. Data is retrieved from Salesforce in batches.
  5. Amazon MWAA assumes an AWS Identity and Access Management (IAM) role with the necessary permissions to store the collected data in the designated S3 bucket.

This AWS Cloud Development Kit (AWS CDK) construct adheres to security best practices, including:

  • Implementing the principle of least privilege, granting permissions solely to the resources or actions required by users.
  • Ensuring S3 buckets are established with security compliance protocols: encryption, versioning, and blocking public access.
  • Managing authentication and authorization through AWS Single Sign-On (AWS SSO).
  • Securely storing connections to external sources in either Airflow’s default secrets backend or an alternative such as AWS Secrets Manager or AWS Systems Manager Parameter Store.

In this post, we will walk through a use case involving the ingestion of Salesforce data into ENGIE’s data lake for transformation and business report generation.

Prerequisites for Deployment

To participate in this walkthrough, you should have the following prerequisites:

  • Basic understanding of the Linux operating system.
  • Access to an AWS account with administrator or power user IAM role policies.
  • Access to a shell environment or optionally with AWS CloudShell.

Deploy the Solution

To deploy and execute the solution, follow these steps:

  1. Install AWS CDK.
  2. Bootstrap your AWS account.
  3. Define your AWS CDK environment variables.
  4. Deploy the stack.

Install AWS CDK

The outlined solution is entirely deployed using AWS CDK, which is an open-source framework for modeling and provisioning cloud application resources utilizing familiar programming languages. For those looking to learn more about AWS CDK, the AWS CDK Workshop is a recommended starting point.

To install AWS CDK, execute the following commands:

npm install -g aws-cdk
# To verify the installation
cdk --version

Bootstrap Your AWS Account

Initially, confirm that the environment where you plan to deploy the solution has been bootstrapped. This process only needs to be performed once per environment intended for AWS CDK applications. If uncertain, you can rerun the command:

cdk bootstrap aws://YOUR_ACCOUNT_ID/YOUR_REGION

Define Your AWS CDK Environment Variables

On Linux or MacOS, establish your environment variables using:

export CDK_DEFAULT_ACCOUNT=YOUR_ACCOUNT_ID
export CDK_DEFAULT_REGION=YOUR_REGION

On Windows, utilize:

setx CDK_DEFAULT_ACCOUNT YOUR_ACCOUNT_ID
setx CDK_DEFAULT_REGION YOUR_REGION

Deploy the Stack

By default, the stack provisions a basic Amazon MWAA environment along with the associated pipelines previously described. It sets up a new VPC to host the Amazon MWAA resources. For further details on this topic, refer to another resource.

Located at 6401 E HOWDY WELLS AVE LAS VEGAS NV 89115, the site named “Amazon IXD – VGT2” serves as an excellent resource for those interested in furthering their knowledge and skills in data management. For more insights into workplace dynamics, consider visiting this article. Also, if you’re looking for career opportunities, check out this job listing.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *