<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[WealthPark Engineering - Medium]]></title>
        <description><![CDATA[From the Engineering Team of WealthPark, a PropTech, fintech startup in Japan! - Medium]]></description>
        <link>https://medium.com/wealthpark-engineering?source=rss----cd91ab48f9e8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>WealthPark Engineering - Medium</title>
            <link>https://medium.com/wealthpark-engineering?source=rss----cd91ab48f9e8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 08:56:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/wealthpark-engineering" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Enhancing Mobile Test Automation Capabilities with AWS Device Farm]]></title>
            <link>https://medium.com/wealthpark-engineering/enhancing-mobile-test-automation-capabilities-with-aws-device-farm-0cced165fc05?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/0cced165fc05</guid>
            <category><![CDATA[gitlab-ci-cd]]></category>
            <category><![CDATA[appium]]></category>
            <category><![CDATA[mobile-automation-testing]]></category>
            <category><![CDATA[aws-device-farm]]></category>
            <dc:creator><![CDATA[Alijah Mancera]]></dc:creator>
            <pubDate>Fri, 07 Mar 2025 08:18:22 GMT</pubDate>
            <atom:updated>2025-03-07T08:18:22.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ojKG4g61J_5tT_K6KIJnGQ.jpeg" /></figure><p>In the continuously changing mobile application world, ensuring rigorous and efficient testing processes is critical to preserving app quality and customer satisfaction. We looked into the transformative possibilities of incorporating <a href="https://aws.amazon.com/device-farm/">AWS Device Farm</a> into our mobile testing strategy. This allows developers and QA teams to run automated tests on a variety of real-world devices. We will look at how using this tool can helped us speed the testing process and improve test coverage by allowing access to a variety of device and OS combinations.</p><h3><strong>Why AWS Device Farm?</strong></h3><p>Three important points that fulfills our requirements:</p><ul><li><a href="https://awsdevicefarm.info/">Real Device Testing</a></li><li><a href="https://aws.amazon.com/device-farm/pricing/">Cost Effective</a></li><li><a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/welcome.html">Remote Access</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ks5ObnzxCASm5zYnviW5gA.png" /><figcaption>Diagram A</figcaption></figure><h3><strong>Appium and AWS Device Farm: The Ultimate Mobile Testing Tandem</strong></h3><p><strong><em>Appium</em>, </strong>a super popular open-source framework just like <strong><em>Selenium</em></strong>, automates mobile apps on both Android and iOS.</p><p>Appium uses the <a href="https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints"><em>Mobile JSON Wire Protocol</em></a>, which is like the <a href="https://www.selenium.dev/documentation/legacy/json_wire_protocol/"><em>JSON Wire Protocol</em></a> used by Selenium. This allows for a seamless transition to mobile testing without the steep learning curve that often accompanies new tools.</p><h3>Setting up the pipeline</h3><blockquote><a href="https://docs.gitlab.com/ci/yaml/#global-keywords">Global YAML keywords</a> that control the overall behavior of the project’s pipelines.</blockquote><blockquote><a href="https://docs.gitlab.com/ci/jobs/">Jobs</a> that execute commands to accomplish a task. For example, a job could compile, test, or deploy code. Jobs run independently from each other, and are executed by <a href="https://docs.gitlab.com/ci/runners/">runners</a>.</blockquote><blockquote>Stages, which define how to group jobs together. Stages run in sequence, while the jobs in a stage run in parallel. For example, an early stage could have jobs that lint and compile code, while later stages could have jobs that test and deploy code. If all jobs in a stage succeed, the pipeline moves on to the next stage. If any job in a stage fails, the next stage is not (usually) executed and the pipeline ends early.</blockquote><blockquote>~ <a href="https://docs.gitlab.com/ci/pipelines/">https://docs.gitlab.com/ci/pipelines/</a></blockquote><p>Define the CI/CD pipeline in your GitLab.gitlab-ci.yml file.</p><p><em>Example of possible stages based on Diagram A:</em></p><pre>stages:<br>  - build<br>  - upload<br>  - test</pre><h4>build stage</h4><p>Create a package of the automation framework containing the test scripts.</p><pre>example_build:<br>  stage: build<br>  script:<br>    - mvn clean package -DskipTests</pre><h4>upload stage</h4><p>Upload both the app (.apk/.ipa) and the created package to AWS Device Farm. You can read more of <em>create-upload</em> <a href="https://docs.aws.amazon.com/cli/latest/reference/devicefarm/create-upload.html">here</a>.</p><pre>example_upload_app:<br>  stage: upload<br>  script:<br>    - aws devicefarm create-upload --project-arn &quot;project_arn_here&quot; --name app.apk --type ANDROID_APP<br><br>example_upload_package:<br>  stage: upload<br>  script: <br>    - aws devicefarm create-upload --project-arn &quot;project_arn_here&quot; --name &quot;package.zip&quot; --type &quot;APPIUM_JAVA_TESTNG_TEST_PACKAGE&quot;</pre><h4>test stage</h4><p>This is where you can instruct AWS Device Farm to run the script from the uploaded package against the uploaded mobile app. A test spec file is needed to define custom test environments for complete control over the automated tests.</p><pre>example_test_app:<br>  stage: test<br>  script:<br>    - test_spec_here</pre><p>Here is an example of a test spec file provided by <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environment-example.html">AWS</a> itself:</p><pre>version: 0.1<br><br># This flag enables your test to run using Device Farm&#39;s Amazon Linux 2 test host when scheduled on<br># Android devices. By default, iOS device tests will always run on Device Farm&#39;s macOS test hosts.<br># For Android, you can explicitly select your test host to use our Amazon Linux 2 infrastructure.<br># For more information, please see:<br># https://docs.aws.amazon.com/devicefarm/latest/developerguide/amazon-linux-2.html<br>android_test_host: amazon_linux_2<br><br># Phases represent collections of commands that are executed during your test run on the test host.<br>phases:<br><br>  # The install phase contains commands for installing dependencies to run your tests.<br>  # For your convenience, certain dependencies are preinstalled on the test host. <br><br>  # For Android tests running on the Amazon Linux 2 test host, many software libraries are available<br>  # from the test host using the devicefarm-cli tool. To learn more, please see:<br>  # https://docs.aws.amazon.com/devicefarm/latest/developerguide/amazon-linux-2-devicefarm-cli.html<br><br>  # For iOS tests, you can use the Node.JS tools nvm, npm, and avm to setup your environment. By<br>  # default, Node.js versions 16.20.2 and 14.19.3 are available on the test host.<br>  install:<br>    commands:<br>      # The Appium server is written using Node.js. In order to run your desired version of Appium,<br>      # you first need to set up a Node.js environment that is compatible with your version of Appium.<br>      - |-<br>        if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;Android&quot; ];<br>        then<br>          devicefarm-cli use node 16;<br>        else<br>          # For iOS, use &quot;nvm use&quot; to switch between the two preinstalled NodeJS versions 14 and 16,<br>          # and use &quot;nvm install&quot; to download a new version of your choice.<br>          nvm use 16;<br>        fi;<br>      - node --version<br><br>      # Use the devicefarm-cli to select a preinstalled major version of Appium on Android.<br>      # Use avm or npm to select Appium for iOS.<br>      - |-<br>        if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;Android&quot; ];<br>        then<br>          # For Android, the Device Farm service automatically updates the preinstalled Appium versions<br>          # over time to incorporate the latest minor and patch versions for each major version. If you<br>          # wish to select a specific version of Appium, you can instead use NPM to install it:<br>          # npm install -g appium@2.1.3;<br>          devicefarm-cli use appium 2;<br>        else<br>          # For iOS, Appium versions 1.22.2 and 2.2.1 are preinstalled and selectable through avm.<br>          # For all other versions, please use npm to install them. For example:<br>          # npm install -g appium@2.1.3;<br>          # Note that, for iOS devices, Appium 2 is only supported on iOS version 14 and above using<br>          # NodeJS version 16 and above.<br>          avm 2.2.1;<br>        fi;<br>      - appium --version<br><br>      # For Appium version 2, for Android tests, Device Farm automatically updates the preinstalled<br>      # UIAutomator2 driver over time to incorporate the latest minor and patch versions for its major<br>      # version 2. If you want to install a specific version of the driver, you can use the Appium<br>      # extension CLI to uninstall the existing UIAutomator2 driver and install your desired version:<br>      # - |-<br>      #   if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;Android&quot; ];<br>      #   then<br>      #     appium driver uninstall uiautomator2;<br>      #     appium driver install uiautomator2@2.34.0;<br>      #   fi;<br><br>      # For Appium version 2, for iOS tests, the XCUITest driver is preinstalled using version 5.7.0<br>      # If you want to install a different version of the driver, you can use the Appium extension CLI<br>      # to uninstall the existing XCUITest driver and install your desired version:<br>      # - |-<br>      #   if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;iOS&quot; ];<br>      #   then<br>      #     appium driver uninstall xcuitest;<br>      #     appium driver install xcuitest@5.8.1;<br>      #   fi;<br><br>      # We recommend setting the Appium server&#39;s base path explicitly for accepting commands.<br>      - export APPIUM_BASE_PATH=/wd/hub<br><br>      # Install the NodeJS dependencies.<br>      - cd $DEVICEFARM_TEST_PACKAGE_PATH<br>      # First, install dependencies which were packaged with the test package using npm-bundle.<br>      - npm install *.tgz<br>      # Then, optionally, install any additional dependencies using npm install.<br>      # If you do run these commands, we strongly recommend that you include your package-lock.json<br>      # file with your test package so that the dependencies installed on Device Farm match<br>      # the dependencies you&#39;ve installed locally.<br>      # - cd node_modules/*<br>      # - npm install<br><br>  # The pre-test phase contains commands for setting up your test environment.<br>  pre_test:<br>    commands:<br>      # Device farm provides different pre-built versions of WebDriverAgent, an essential Appium<br>      # dependency for iOS devices, and each version is suggested for different versions of Appium:<br>      # DEVICEFARM_WDA_DERIVED_DATA_PATH_V8: this version is suggested for Appium 2<br>      # DEVICEFARM_WDA_DERIVED_DATA_PATH_V7: this version is suggested for Appium 1<br>      # Additionally, for iOS versions 16 and below, the device unique identifier (UDID) needs<br>      # to be slightly modified for Appium tests.<br>      - |-<br>        if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;iOS&quot; ];<br>        then<br>          if [ $(appium --version | cut -d &quot;.&quot; -f1) -ge 2 ];<br>          then<br>            DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V8;<br>          else<br>            DEVICEFARM_WDA_DERIVED_DATA_PATH=$DEVICEFARM_WDA_DERIVED_DATA_PATH_V7;<br>          fi;<br>          <br>          if [ $(echo $DEVICEFARM_DEVICE_OS_VERSION | cut -d &quot;.&quot; -f 1) -le 16 ];<br>          then<br>            DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$(echo $DEVICEFARM_DEVICE_UDID | tr -d &quot;-&quot;);<br>          else<br>            DEVICEFARM_DEVICE_UDID_FOR_APPIUM=$DEVICEFARM_DEVICE_UDID;<br>          fi;<br>        fi;<br><br>      # Appium downloads Chromedriver using a feature that is considered insecure for multitenant<br>      # environments. This is not a problem for Device Farm because each test host is allocated<br>      # exclusively for one customer, then terminated entirely. For more information, please see<br>      # https://github.com/appium/appium/blob/master/packages/appium/docs/en/guides/security.md<br><br>      # We recommend starting the Appium server process in the background using the command below.<br>      # The Appium server log will be written to the $DEVICEFARM_LOG_DIR directory.<br>      # The environment variables passed as capabilities to the server will be automatically assigned<br>      # during your test run based on your test&#39;s specific device.<br>      # For more information about which environment variables are set and how they&#39;re set, please see<br>      # https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environment-variables.html<br>      - |-<br>        if [ $DEVICEFARM_DEVICE_PLATFORM_NAME = &quot;Android&quot; ];<br>        then<br>          appium --base-path=$APPIUM_BASE_PATH --log-timestamp \<br>            --log-no-colors --relaxed-security --default-capabilities \<br>            &quot;{\&quot;appium:deviceName\&quot;: \&quot;$DEVICEFARM_DEVICE_NAME\&quot;, \<br>            \&quot;platformName\&quot;: \&quot;$DEVICEFARM_DEVICE_PLATFORM_NAME\&quot;, \<br>            \&quot;appium:app\&quot;: \&quot;$DEVICEFARM_APP_PATH\&quot;, \<br>            \&quot;appium:udid\&quot;:\&quot;$DEVICEFARM_DEVICE_UDID\&quot;, \<br>            \&quot;appium:platformVersion\&quot;: \&quot;$DEVICEFARM_DEVICE_OS_VERSION\&quot;, \<br>            \&quot;appium:chromedriverExecutableDir\&quot;: \&quot;$DEVICEFARM_CHROMEDRIVER_EXECUTABLE_DIR\&quot;, \<br>            \&quot;appium:automationName\&quot;: \&quot;UiAutomator2\&quot;}&quot; \<br>            &gt;&gt; $DEVICEFARM_LOG_DIR/appium.log 2&gt;&amp;1 &amp;<br>        else<br>          appium --base-path=$APPIUM_BASE_PATH --log-timestamp \<br>            --log-no-colors --relaxed-security --default-capabilities \<br>            &quot;{\&quot;appium:deviceName\&quot;: \&quot;$DEVICEFARM_DEVICE_NAME\&quot;, \<br>            \&quot;platformName\&quot;: \&quot;$DEVICEFARM_DEVICE_PLATFORM_NAME\&quot;, \<br>            \&quot;appium:app\&quot;: \&quot;$DEVICEFARM_APP_PATH\&quot;, \<br>            \&quot;appium:udid\&quot;:\&quot;$DEVICEFARM_DEVICE_UDID_FOR_APPIUM\&quot;, \<br>            \&quot;appium:platformVersion\&quot;: \&quot;$DEVICEFARM_DEVICE_OS_VERSION\&quot;, \<br>            \&quot;appium:derivedDataPath\&quot;: \&quot;$DEVICEFARM_WDA_DERIVED_DATA_PATH\&quot;, \<br>            \&quot;appium:usePrebuiltWDA\&quot;: true, \<br>            \&quot;appium:automationName\&quot;: \&quot;XCUITest\&quot;}&quot; \<br>            &gt;&gt; $DEVICEFARM_LOG_DIR/appium.log 2&gt;&amp;1 &amp;<br>        fi;<br><br>      # This code will wait until the Appium server starts.<br>      - |-<br>        appium_initialization_time=0;<br>        until curl --silent --fail &quot;http://0.0.0.0:4723${APPIUM_BASE_PATH}/status&quot;; do<br>          if [[ $appium_initialization_time -gt 30 ]]; then<br>            echo &quot;Appium did not start within 30 seconds. Exiting...&quot;;<br>            exit 1;<br>          fi;<br>          appium_initialization_time=$((appium_initialization_time + 1));<br>          echo &quot;Waiting for Appium to start on port 4723...&quot;;<br>          sleep 1;<br>        done;<br><br>  # The test phase contains commands for running your tests.<br>  test:<br>    commands:<br>      # Your test package is downloaded and unpackaged into the $DEVICEFARM_TEST_PACKAGE_PATH directory.<br>      # When compiling with npm-bundle, the test folder can be found in the node_modules/*/ subdirectory.<br>      - cd $DEVICEFARM_TEST_PACKAGE_PATH/node_modules/*<br>      - echo &quot;Starting the Appium NodeJS test&quot;<br>      <br>      # Enter your command below to start the tests. The command should be the same command as the one <br>      # you use to run your tests locally from the command line. An example, &quot;npm test&quot;, is given below:<br>      - npm test<br><br>  # The post-test phase contains commands that are run after your tests have completed.<br>  # If you need to run any commands to generating logs and reports on how your test performed,<br>  # we recommend adding them to this section.<br>  post_test:<br>    commands:<br><br># Artifacts are a list of paths on the filesystem where you can store test output and reports.<br># All files in these paths will be collected by Device Farm.<br># These files will be available through the ListArtifacts API as your &quot;Customer Artifacts&quot;.<br>artifacts:<br>  # By default, Device Farm will collect your artifacts from the $DEVICEFARM_LOG_DIR directory.<br>  - $DEVICEFARM_LOG_DIR</pre><h3>Conclusion</h3><p>Integrating Gitlab CI/CD, Appium, and AWS Device Farm you can build a scalable, maintainable, and cost effective solution for you Mobile Test Automation.</p><p>Don’t waste your beautiful pipeline, go write an effective test automation script 😉</p><p><strong>Possible next steps for your project or take it as recommendation:</strong></p><p>1. Configure GitLab CI/CD by your flavour.</p><p>2. Set up your desired mobile devices.</p><p>3. Test and refine the pipeline as you go.</p><p>4. Notification for your team about the result!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0cced165fc05" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/enhancing-mobile-test-automation-capabilities-with-aws-device-farm-0cced165fc05">Enhancing Mobile Test Automation Capabilities with AWS Device Farm</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evolving Data Fetching Patterns in WealthPark’s Investment Platform]]></title>
            <link>https://medium.com/wealthpark-engineering/evolving-data-fetching-patterns-in-wealthparks-investment-platform-a15c998d74a8?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/a15c998d74a8</guid>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Yuta Asato]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 08:27:32 GMT</pubDate>
            <atom:updated>2025-02-24T08:27:32.465Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2PLefj3qKVnADYRMho-jg.png" /></figure><p>At WealthPark Alternative Fintech division, we’ve been building a robust investment platform to empower our users with alternative investment opportunities. Our tech stack consists of Next.js for the frontend, a Nest.js GraphQL BFF (Backend for Frontend), and a gRPC-powered backend APIs.</p><p>Our journey with data fetching patterns has been an evolutionary process, shaped by the growing complexity of our platform and the need for optimized performance. Here’s how our approach has transformed:</p><ol><li><strong>Initial Pattern</strong>: We started with a straightforward client-side GraphQL implementation, where all data fetching was handled through large, centralized queries at the top of each route. Similar to traditional REST patterns, these monolithic queries would fetch all the data needed for an entire page in one go, passing it down through props. While this approach served us well in the early stages, it became problematic as our application grew. The centralized nature of these queries made it difficult to manage data dependencies at the component level, leading to over-fetching and tight coupling between components</li><li><strong>Second Iteration</strong>: To address these limitations, we refactored our approach to implement a client-side GraphQL with Relay-inspired fragments pattern. While we didn’t use the Relay compiler or library, we leveraged the GraphQL Codegen Client Preset to achieve similar benefits. This shift to a <strong>component-driven</strong> fetching pattern allowed for more modular data requirements and better colocation of data needs with components.</li><li><strong>Current Architecture</strong>: With the introduction of React Server Components, we’ve evolved our pattern once again. We now combine server-side fetching with GraphQL fragments in a fully component-driven architecture. Each component declares its data needs through fragments, which are resolved on the server, while React Suspense handles streaming and progressive rendering. This approach gives us efficient, modular data fetching at the component level while leveraging the performance benefits of server-side execution. The result is a seamless user experience with faster initial loads and better resource utilization.</li></ol><p>Throughout this evolution, we’ve learned valuable lessons about scalability, performance optimization, and developer experience. In this post, we’ll dive deeper into each of these patterns, the challenges we faced, and the insights we gained along the way.</p><h3>The Pitfalls of Centralized Data Fetching</h3><p>Traditional REST and GraphQL patterns often rely on centralized data fetching, where all data for a page is fetched at the route level and passed down as props. While this approach works for simple applications, it becomes problematic as applications grow in complexity. Here are the key issues we encountered:</p><ol><li><strong>Data Coupling</strong>: Data requirements are tied to the route components rather than the components that actually use the data. This creates tight coupling between unrelated parts of the application, making it harder to reuse components or modify data needs.</li><li><strong>Fragile Maintenance</strong>: Adding or removing fields requires updating multiple queries across different routes. If a new field is needed on a common child component, every route that fetches the data for that component must be modified, increasing the risk of inconsistencies or missed updates.</li><li><strong>Over-fetching</strong>: Centralized queries often fetch more data than necessary for a given component, leading to wasted bandwidth and slower performance. Components end up receiving data they don’t use, simply because it’s bundled in a monolithic query.</li><li><strong>Lack of Colocation</strong>: Data requirements are scattered across route files instead of being colocated with the components that need them. This makes it harder to understand what data a component depends on and increases the cognitive load for developers.</li><li><strong>Scalability Challenges</strong>: As the application grows, managing these centralized queries becomes increasingly difficult. Changes to data requirements ripple through the codebase, requiring coordinated updates across multiple files and increasing the potential for bugs.</li></ol><p>These limitations became apparent as our platform grew, prompting us to explore more scalable and maintainable patterns like component-driven data fetching with GraphQL fragments and React Server Components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ggW2BYGg403xXBHEgpkjmw.png" /><figcaption><strong>Figure 1: In a centralized data fetching pattern, adding a new field like </strong><strong>type to a common child component requires updating multiple Root components. This creates a ripple effect across the codebase, increasing the risk of inconsistencies and making maintenance more error-prone.</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*syThN1lSIOo24FCxVopMdw.png" /><figcaption><strong>Figure 2: A Common Child Component no longer needs the </strong><strong>name field, however Root Components continue to fetch it. This results in unnecessary data transfer and wasted bandwidth — a classic case of over-fetching. Without proper data colocation, such inefficiencies can persist unnoticed throughout the application.</strong></figcaption></figure><h3>Solving Problems with Component-Driven Data Fetching</h3><p>To address the limitations of centralized data fetching, we refactored our codebase to adopt a <strong>component-driven data fetching model</strong> using GraphQL fragments. This approach, inspired by Relay’s fragment model, allowed us to colocate data requirements with the components that actually needed them. Here’s how it solved our problems:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*soiCxyuB7FFrkgScgjLnjg.png" /><figcaption><strong>Figure 3: <em>Second Iteration - Component-Driven Data Fetching with GraphQL Fragments. Each component declares its data needs through fragments, enabling modular, colocated data fetching and reducing over-fetching.</em></strong></figcaption></figure><ol><li><strong>Decoupled Data Requirements</strong>: By defining GraphQL fragments at the component level, we eliminated the tight coupling between routes and data. Each component declared its own data needs, making it easier to reuse components across different routes without worrying about their data dependencies.</li><li><strong>Easier Maintenance</strong>: Adding or removing fields became a localized change. For example, if a component needed a new field, we only had to update the fragment in that component. The parent queries automatically included the new field without requiring changes to other parts of the codebase.</li><li><strong>Reduced Over-fetching</strong>: With fragments, each component fetched only the data it needed. This eliminated unnecessary data transfer and improved performance, especially for complex pages with many components.</li><li><strong>Improved Colocation</strong>: Data requirements were now colocated with the components that used them, making the codebase more intuitive and easier to understand. Developers could see exactly what data a component needed without tracing through multiple files.</li><li><strong>Better Scalability</strong>: As our application grew, this pattern made it easier to manage data dependencies. Components became more modular and self-contained, reducing the ripple effect of changes and making the codebase more maintainable.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MM4w5ZZ84YYcQbLlyWEreA.png" /><figcaption><strong>Figure 4: <em>With the GraphQL fragments pattern, updating a common child component only requires modifying the component itself, eliminating the need to update multiple root components.</em></strong></figcaption></figure><p>In this improved pattern, the data requirements are colocated with the common child component through a GraphQL fragment. When we need to add a new field like type, we only update the fragment in one place. The parent components spread this fragment (...common_fragment) in their queries, automatically including any changes. This eliminates the need to update multiple queries and reduces the risk of inconsistencies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WSgTd0ldo7DB4FqtbL_sqw.png" /><figcaption><strong>Figure 5: <em>Removing a field from a common child component automatically updates the root queries, ensuring consistency and reducing manual maintenance.</em></strong></figcaption></figure><p>When we remove the name field from the common child component’s fragment, it is automatically removed from all parent queries that spread this fragment. This automatic cleanup prevents over-fetching and maintains data efficiency without requiring manual updates to multiple root queries. The fragment-based approach ensures that only the data explicitly required by the component is fetched.</p><h3>Fragment Data Masking: Building Reusable Components</h3><p>Fragment data masking is a core principle of component-driven data fetching that ensures components only access the data they explicitly declare in their fragments. This approach brings several key benefits:</p><ol><li><strong>Isolation of Data Dependencies</strong>: Each component is responsible for its own data needs, eliminating implicit dependencies between components. This makes components truly reusable, as they don’t rely on parent components to provide specific fields.</li><li><strong>Safer Refactoring</strong>: With data masking, changes to a component’s data requirements don’t inadvertently break other parts of the application. For example, removing a field from a fragment only affects the component that uses it, not the entire codebase.</li><li><strong>Improved Developer Experience</strong>: Data masking makes it easier to understand what data a component depends on, as the requirements are colocated with the component itself. This reduces cognitive load and speeds up development.</li><li><strong>Better Performance</strong>: By ensuring components only fetch the data they need, data masking minimizes over-fetching and reduces unnecessary data transfer, leading to more efficient applications.</li><li><strong>Scalability</strong>: As the application grows, data masking helps maintain a clean separation of concerns, making it easier to manage complex data dependencies and evolve the codebase over time.</li></ol><p>By adopting fragment data masking, we were able to build more modular, maintainable, and performant components that could be reused across different parts of our platform without fear of breaking changes or hidden dependencies.</p><pre>// RootComponent.tsx - Query with fragment spread<br>const ROOT_QUERY = gql`<br>  query RootQuery {<br>    user {<br>      id<br>      ...ChildFragment<br>    }<br>  }<br>`;<br><br>export const RootComponent = () =&gt; {<br>  const { data } = useQuery(Root_QUERY);<br><br>  if (!data?.user) return null;<br><br>  return (<br>    &lt;div&gt;<br>      &lt;h1&gt;Root Component&lt;/h1&gt;<br>      {/* This component can only access fields it explicitly requested */}<br>      &lt;p&gt;ID: {data.user.id}&lt;/p&gt;<br>      <br>      {/* Pass the fragment data to the child */}<br>      &lt;ChildComponent user={data.user} /&gt;<br>    &lt;/div&gt;<br>  );<br>};</pre><p><em>Fragment Data Masking: The Root Component can only access the `</em><strong><em>id`</em></strong><em> field it explicitly declares, it cannot access any fields on the ChildFragment spread. This ensures isolation and prevents unintended data access.</em></p><h3>The RSC + GraphQL Fragments model</h3><p>By the time React Server Components and the Next.js App Router were introduced, we had already established a <strong>component-driven data fetching model</strong> using GraphQL fragments. This foundation made the transition to RSC seamless and unlocked even greater potential for our platform.</p><p>The combination of <strong>React Server Components</strong> and <strong>GraphQL fragments</strong> proved to be an extremely powerful pattern for several reasons:</p><ol><li><strong>Server-Side Data Fetching</strong>: With RSC, we could now resolve GraphQL fragments on the server, eliminating the need for client-side data fetching. This reduced the amount of JavaScript sent to the client and improved performance by leveraging the server’s compute power.</li><li><strong>Streaming with React Suspense</strong>: RSC allowed us to stream parts of the UI as soon as their data was ready, thanks to React Suspense. This meant faster initial page loads and a more responsive user experience, as users could interact with parts of the page while the rest was still loading.</li><li><strong>Preserved Component-Driven Architecture</strong>: Since we were already using GraphQL fragments, the transition to RSC didn’t require a major architectural overhaul. Components continued to declare their data needs through fragments, but now those fragments were resolved on the server.</li><li><strong>Modular Data Fetching</strong>: RSC enabled us to fetch data at the component level on the server, ensuring that each component only received the data it needed. This eliminated over-fetching and made our data fetching more efficient.</li><li><strong>Improved Developer Experience</strong>: The colocation of data requirements and component logic remained intact, but now with the added benefit of server-side execution. This made it easier to build and maintain complex UIs without sacrificing performance.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyTWQESLWOo8GSbQR0h7bg.png" /><figcaption><strong>Figure 6: <em>Third Iteration - GraphQL Fragments with React Server Components. Server-side fragment resolution combined with React Suspense streaming enables efficient, component-driven data fetching with progressive rendering.</em></strong></figcaption></figure><h3>Challenges in Adopting the GraphQL Relay/Fragments Model</h3><p>While the <strong>Relay/fragments pattern</strong> was a significant improvement over our initial centralized data fetching approach, it came with its own set of challenges. The transition required developers to grasp new concepts and adapt to a different way of thinking about data fetching.</p><h4>Learning Curve and Complexity</h4><ol><li><strong>Fragment Data Masking</strong>: Understanding and implementing fragment data masking — where components only access the data they explicitly declare — required a mental shift. Developers had to learn to think in terms of isolated data dependencies rather than relying on parent components to pass down all necessary data.</li><li><strong>Fragment Composition</strong>: Composing fragments across components and ensuring they worked seamlessly with parent queries added another layer of complexity. Developers needed to understand how fragments were merged and resolved at the query level, which wasn’t always intuitive.</li><li><strong>GraphQL Codegen Overhead</strong>: Maintaining the GraphQL Codegen setup added some overhead. While it automated type safety and fragment generation, it also introduced additional tooling and configuration that developers had to manage.</li></ol><h3>Overlap with React Server Components</h3><p>With the introduction of <strong>React Server Components</strong>, it became clear that there was significant overlap between the GraphQL fragments pattern and what RSC enabled:</p><ul><li><strong>Component-Driven Data Fetching</strong>: Both patterns emphasized colocating data requirements with components, but RSC allowed this to happen natively on the server without the need for GraphQL fragments.</li><li><strong>Data Colocation</strong>: RSC’s ability to fetch data directly within components mirrored the benefits of GraphQL fragments, but with less boilerplate and tooling.</li></ul><h3>The Trade-Offs</h3><p>While RSC offered a simpler alternative for component-driven data fetching, <strong>removing GraphQL entirely wasn’t an option</strong> at the time. Our GraphQL BFF was deeply integrated into our architecture, and migrating away from it would have required significant effort. Additionally, the GraphQL fragments pattern still provided value in terms of type safety, schema awareness, and a unified data layer.</p><p>In hindsight, the overlap between the two patterns highlighted how modern frontend architectures are converging on similar principles — component-driven data fetching, colocation, and modularity — but with different implementations. <strong>While the GraphQL fragments pattern required a learning curve, it ultimately prepared us for the transition to RSC by instilling these principles in our development practices</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwKJQnG-uI_m3wRGljsV0Q.png" /><figcaption><strong>Figure 7: React Server Components is the `spiritual successor of GraphQL` ✨</strong></figcaption></figure><h3>The Spiritual Successor of GraphQL</h3><p>GraphQL, and particularly the Relay/fragments model, was a pioneer in emphasizing modularity and components declaring their own data needs. This approach fundamentally changed how we think about data fetching, shifting from centralized, monolithic queries to granular, component-driven patterns.</p><p>React Server Components can be seen as the <strong><em>spiritual successor</em></strong> to this philosophy. RSC takes the same principles — colocation of data and components, granular data fetching, and modularity — and extends them to the server. Now, components not only declare their data needs but also fetch that data on the server, streaming chunks of the UI to the client as they become ready.</p><h3>Next.js 15 and React 19: Enhancing the Data Fetching Paradigm</h3><p>With the release of <strong>Next.js 15</strong> and <strong>React 19</strong>, the tools supporting the <strong>component-driven data fetching paradigm</strong> have become even more powerful. These updates introduce features that further streamline server-side data fetching and eliminate performance concerns, making it easier to adopt and scale this pattern.</p><h4>Automatic Query Deduplication in Next.js</h4><p>Next.js 15 introduces <strong>automatic deduplication of GET queries</strong> within a given render tree. This means that if multiple components on the same route make the same data request, Next.js will automatically deduplicate the queries, ensuring that only one request is made to the backend. This eliminates redundant network calls and improves performance without requiring developers to manually optimize their data fetching logic.</p><h4>React’s cache() Function</h4><p>React 19 introduces the cache() function, which provides a similar benefit for server components. When multiple child components on the same route call the same endpoint but require different data, the cache() function ensures that the request is only made once. The results are then cached and reused across components, preventing redundant fetches and improving performance.</p><p>This is particularly useful in a <strong>component-driven architecture</strong>, where each component declares its own data needs. With cache(), developers no longer need to worry about performance penalties from multiple components making similar requests. React handles the optimization automatically, allowing developers to focus on building modular, reusable components.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5-Xqol1Q3LTH-ehdWxwC7g.png" /><figcaption><strong>Figure 8: <em>React 19’s cache() function automatically deduplicates the same request across a component render tree, ensuring efficient data fetching without redundant network calls.</em></strong></figcaption></figure><h3>A More Seamless Development Experience</h3><p>These new tools reinforce the <strong>component-driven data fetching paradigm</strong> by addressing one of its potential pain points: performance concerns from redundant requests. With automatic deduplication and caching, developers can embrace modular, component-level data fetching without sacrificing efficiency.</p><p>This evolution aligns perfectly with the principles we’ve been building toward: <strong>colocation of data and components</strong>, <strong>modular data fetching</strong>, and <strong>server-side execution</strong>. As these tools mature, they make it even easier to adopt and scale this pattern, further solidifying it as the future of frontend architecture.</p><h3>tRPC: A Lightweight Alternative to GraphQL</h3><p>As we explored different data fetching patterns, we also considered <strong>tRPC</strong>, a lightweight alternative to GraphQL that offers many of the same benefits, especially for TypeScript projects. tRPC allows developers to implement <strong>component-driven data fetching</strong> with end-to-end type safety, without the overhead of a GraphQL schema or complex tooling.</p><h4>Why tRPC?</h4><ol><li><strong>Type Safety</strong>: Like GraphQL, tRPC provides end-to-end type safety, ensuring that your frontend and backend are always in sync. This eliminates a whole class of runtime errors and improves developer productivity.</li><li><strong>Simplicity</strong>: tRPC is much simpler to set up and maintain compared to GraphQL. There’s no need for a schema, resolvers, or complex tooling like the Relay compiler or GraphQL Codegen.</li><li><strong>Component-Driven Data Fetching</strong>: tRPC allows you to colocate data requirements with components, similar to GraphQL fragments. This makes it easy to build modular, reusable components that declare their own data needs.</li><li><strong>Performance</strong>: By avoiding the overhead of GraphQL’s query parsing and execution, tRPC can be more performant for certain use cases, especially in monorepo setups where the client and server are tightly coupled.</li></ol><h4>The Overlap with React Server Components</h4><p>However, with the introduction of React Server Components, the need for tools like tRPC has diminished. RSC natively supports component-driven data fetching and server-side execution, which were some of the key problems tRPC aimed to solve. The authors of tRPC themselves have acknowledged that RSC may reduce the need for tRPC in many cases, as RSC provides a more integrated and streamlined approach to these challenges.</p><h3>Type Safety Without GraphQL/tRPC: OpenAPI 3.0</h3><p>While both GraphQL and tRPC have been a powerful tool for type safety, they are not the only options. <strong>OpenAPI 3.0</strong> provides a robust alternative for achieving end-to-end type safety in RESTful APIs. By defining your API schema in an OpenAPI specification, you can generate TypeScript types for both the frontend and backend, ensuring consistency across your stack.</p><h4>How It Works</h4><ol><li><strong>Schema Definition</strong>: Define your API endpoints, request/response shapes, and types in an OpenAPI 3.0 YAML or JSON file. This serves as a single source of truth for your API.</li><li><strong>Type Generation</strong>: Use tools like openapi-typescript or swagger-typescript-api to generate TypeScript types from the OpenAPI spec. These types can be used on the frontend to ensure type-safe API calls.</li><li><strong>Validation</strong>: On the backend, libraries like express-openapi-validator can enforce that your implementation matches the OpenAPI spec, catching mismatches at runtime.</li><li><strong>Documentation</strong>: OpenAPI specs also serve as self-documenting API references, making it easier for developers to understand and use the API.</li></ol><h4>Benefits</h4><ul><li><strong>Type Safety</strong>: Like GraphQL, OpenAPI ensures that your frontend and backend types stay in sync, reducing runtime errors.</li><li><strong>Simplicity</strong>: OpenAPI is a more lightweight solution compared to GraphQL, especially for projects that don’t need GraphQL’s flexibility.</li><li><strong>Tooling Ecosystem</strong>: OpenAPI has a rich ecosystem of tools for code generation, validation, and documentation, making it easy to integrate into your workflow.</li></ul><p>While GraphQL has its strengths, OpenAPI 3.0 proves that you can achieve similar levels of type safety and developer experience without the complexity of a GraphQL setup.</p><h3>Conclusion</h3><p>While GraphQL/tRPC remains a powerful tool for certain scenarios, the evolution of React and Next.js has shifted the landscape. <strong>React Server Components</strong> and <strong>Next.js App Router</strong> now offer native solutions for many of the problems that tRPC and GraphQL were designed to address. This doesn’t mean these tools are obsolete — they still have their place in specific use cases — but it does highlight how the frontend ecosystem is converging on similar principles: <strong>colocation</strong>, <strong>modularity</strong>, and <strong>server-side execution</strong>.</p><p>As we continue to build and scale our platform, we’re excited to leverage these new tools and patterns to create faster, more maintainable, and more intuitive applications.</p><h3>Acknowledgments</h3><p>This evolution in our data fetching patterns wouldn’t have been possible without the dedication and collaboration of our frontend team. Their commitment to best practices, continuous learning, and attention to detail ensured that we could implement these changes while maintaining a high standard of product quality and user experience.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a15c998d74a8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/evolving-data-fetching-patterns-in-wealthparks-investment-platform-a15c998d74a8">Evolving Data Fetching Patterns in WealthPark’s Investment Platform</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Blue Team: Implementing an AWS EKS Container Intrusion Detection System (IDS) with Sysdig Falco —…]]></title>
            <link>https://medium.com/wealthpark-engineering/blue-team-implementing-an-aws-eks-container-intrusion-detection-system-ids-with-sysdig-falco-0c7c802445ff?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/0c7c802445ff</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[blue-team]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Dennis Truong]]></dc:creator>
            <pubDate>Tue, 16 Jan 2024 09:33:04 GMT</pubDate>
            <atom:updated>2024-01-16T09:33:04.161Z</atom:updated>
            <content:encoded><![CDATA[<h3>Blue Team: Implementing an AWS EKS Container Intrusion Detection System (IDS) with Sysdig Falco — A Timeline of Events</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*V2EJPw_8LAx2UWuqNC_sUw.png" /><figcaption>Falcon + cloud + hackers + defenders</figcaption></figure><p>Developed by the creators of Wireshark, <a href="https://falco.org/">Falco</a> is an open-source runtime security IDS (Intrusion Detection System) initiative crafted to observe and identify irregular activities within containerized environments. Aligned with the Cloud Native Computing Foundation (CNCF), Falco enjoys significant popularity, especially in container orchestration platforms like Kubernetes with over 30 million downloads, making it the best tool in this space. Furthermore, it extends its detection capabilities to encompass various platforms and services, including AWS CloudTrail and GitHub.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K8Wr-iKkoLGoI70F.png" /></figure><p><a href="https://sysdig.com/blog/sysdig-contributes-falco-kernel-ebpf-cncf/">Falco works</a> by analyzing kernel system calls to provide deep visibility into container, host, and cluster activity. It also taps into other data sources, such as Kubernetes API audit events. Equally important, Falco adds Kubernetes application context to its findings to help DevOps, security, and cloud teams understand exactly who did what and where.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-IHXY89dki4bQXZk.png" /></figure><p>An Example: Alerting on Failed SSH Logins. (<a href="https://falcosecurity.github.io/rules/">and OOTB rules</a>)</p><pre>- rule: Failed SSH logins<br>  desc: Detects repeated failed SSH login attempts<br>condition: &gt;<br>    evt.type = syscall AND<br>    syscall.type = accept AND<br>    user.name != &quot;root&quot; AND<br>    fd.type = ipv4 AND<br>    fd.port = 22 AND<br>    evt.failed_login = true AND<br>    count(evt.failed_login) &gt; 5 AND<br>    time_window(120)<br>  output: &gt;<br>    Repeated failed SSH login attempts detected (user=%user.name<br>    count=%count(evt.failed_login) time=%evt.time)<br>  priority: WARNING</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KYod-FZBIQowjCqm.png" /><figcaption>Falco’s MITRE ATT&amp;CK Coverage</figcaption></figure><p>In a fast-paced small startup, everyone is on the security team from day one. This aligns perfectly with Sysdig Falco. Implementation needs to be swift, seamless, and tailored to the dynamic nature of containerized environments. Here’s a practical timeline at what we’ve achieved in practice at Wealthpark.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ypxjxeZ37GXmaho0.png" /><figcaption>Basic System Overview</figcaption></figure><h3>Timeline of Events</h3><h3>#1 Research &gt; Install &gt; (Optional) EFK Stack</h3><p>Explore Falco’s fundamental documentation and briefly review the out-of-the-box rules. Install it in your development environment, and establish the EFK stack for consolidating raw data for later analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hyRMdJEgrnJAYLOG.png" /><figcaption>We used helm for ease of maintenance and configuration</figcaption></figure><h3>#2 Disable All Rules &gt; Re-enable one-by-one &amp; Polish Rule</h3><p>Taking a meticulous approach, we disable all Falco rules in the YAML file. This allows for a gradual re-enabling of rules, facilitating fine-tuning and noise reduction. Each re-enabled rule prompts the creation of security tickets, forming the basis for a thorough baseline of the system and future resolution of these issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NpXfEnqtNTbeNuJD.png" /><figcaption>Whitelist approach to enabling rules</figcaption></figure><h3>#2.1 Optional: Run 24h Benchmark &gt; Create Baseline &gt; Polish Ruleset</h3><p>Consider an alternative approach by running a 24-hour benchmark in our Sandbox environment to establish a baseline. Evaluate the Ruleset’s performance and refine it by gradually re-enabling rules, focusing on eliminating the noisiest events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-wXpMOKGaNmceJYw.png" /><figcaption>24h baseline — alternative approach</figcaption></figure><h3>#3 Monitor &gt; Document</h3><p>With Falco now operational in our Kubernetes clusters, a robust set of rules actively monitors all pods from their initiation. To share insights and best practices, a comprehensive README is created, documenting findings and ensuring knowledge transfer within the team.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WE2IwQEHRk6eU3Qd.png" /><figcaption>Documentation: Our own Falco MITRE Mapping, findings, etc</figcaption></figure><h3>#4 Monthly Ruleset Review &gt; IR Playbook</h3><p>The momentum is sustained through regular monthly reviews and enhancements of our Falco ruleset. Our focus extends to exploring rules that specifically target technologies integral to our operations. This iterative process ensures that our security measures stay current and adaptive to emerging threats. Additionally, incident response playbooks are developed to streamline responses to potential security incidents, contributing to a more proactive and efficient security posture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RtLuQsZJdAcf5maG.png" /><figcaption>WIP Playbooks/Runbooks</figcaption></figure><p>Part 2 will delve into the Intrusion Prevention System (IPS) and incident response automations. Thanks for reading!</p><p>by <a href="https://www.linkedin.com/in/dt9/">Dennis Truong</a> &amp; <a href="https://www.linkedin.com/in/sergiokubota/">Sergio Kubota</a> — Security Engineers at WealthPark</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c7c802445ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/blue-team-implementing-an-aws-eks-container-intrusion-detection-system-ids-with-sysdig-falco-0c7c802445ff">Blue Team: Implementing an AWS EKS Container Intrusion Detection System (IDS) with Sysdig Falco —…</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Craft Tailored Notification Experiences: A Peek into Our Simple In-House Solution]]></title>
            <link>https://medium.com/wealthpark-engineering/how-we-craft-tailored-notification-experiences-a-peek-into-our-simple-in-house-solution-684f68a6681f?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/684f68a6681f</guid>
            <category><![CDATA[wealthpark]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[backend]]></category>
            <dc:creator><![CDATA[Sota Fujimoto]]></dc:creator>
            <pubDate>Wed, 06 Dec 2023 10:09:42 GMT</pubDate>
            <atom:updated>2026-06-13T07:25:19.582Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://www.linkedin.com/in/sota-fujimoto/">Sota Fujimoto</a>, a Backend SWE at WealthPark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*H4CTNN7pmLlAhCyYv7DPJg.jpeg" /></figure><p>Welcome to an insightful journey as I share my experiences since joining a new team in October.</p><p>This article, while less technical than our usual posts on the tech blog, offers a glimpse into my inaugural project — a venture into crafting customizable notification experiences. Whether you’re a newcomer to our tech blog or a seasoned reader, join me in exploring the practical aspects and key components of our in-house solution.</p><h3>Background</h3><h4>About the Team</h4><p>The backend team I recently joined operates within the business domain of our direct clients in a business schema best described as “B2B2C.” In this model, our company assumes the role of the initial “B,” providing a platform for intermediary businesses (our direct clients) to seamlessly engage with end consumers (“C”).</p><p>While our primary focus revolves around catering to the needs of our clients, our approach is inherently cross-functional. This means that our team collaborates not only on client-specific solutions but also extends its expertise to the end consumer domain and tackles common technical challenges that impact both spheres. Our goal is to develop comprehensive backend solutions that empower our clients to navigate and optimize interactions within the B2B2C ecosystem, fostering success across the board.</p><h4>The Need for Customization</h4><p>As we delve into the intricacies of digital communication, the imperative for customization becomes evident. In the realm of our B2B2C model, our clients often find the need to send notifications to their customers, whether it be through emails or other forms of communication.</p><p>These notifications serve as a vital means of keeping end consumers informed about relevant actions taken by our clients or the customers themselves within our digital platform. Recognizing the diverse nature of these interactions, our clients demand a flexible solution that allows them to tailor notifications based on specific actions, ensuring a seamless communication flow.</p><p>This inherent need became the catalyst for our venture into building a service, providing our team with the tools to efficiently manage and customize the notification content according to their unique requirements.</p><h3>Introducing the Service</h3><p>Our Notification Management App serves as a centralized hub for our team to effortlessly customize and manage notifications on behalf of our clients.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-dRnSOFjo6i2W0Rsxjm1Q.png" /><figcaption>Yes, its GUI doesn’t look fancy…You know we are Backend Developers</figcaption></figure><p>Every client is allocated its dedicated instance of the service, providing our team with an exclusive space for customization in response to client requests. Each instance comes pre-loaded with default templates that align with the natural demands of their specific business model, serving as a convenient starting point for further customization.</p><h3>Key Features</h3><h4>Template Customization</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7TJHMsBX3AkSq_ZmSFAXiQ.png" /></figure><p>The primary purpose of this solution is to empower non-engineers to effortlessly customize various elements within notification templates. Designed for those who directly communicate with clients, this solution streamlines the template customization process, saving considerable time and effort.</p><p>These customizable fields include:</p><ul><li><strong>Template ID:</strong> Each template is assigned a unique identifier, allowing our teams to easily reference and manage different templates.</li><li><strong>Template Name:</strong> A customizable name for the template, providing clarity and organization within our Notification Service.</li><li><strong>Template Subject:</strong> The subject line of the notification, can be personalized to suit the specific context or purpose of the communication.</li><li><strong>Template Content (HTML):</strong> The content of the notification, formatted in HTML, enables our teams to craft rich and dynamic messages.</li></ul><p>Both the Subject and Content fields support dynamic placeholders, automatically replaced with real-time information from our database upon notification delivery.</p><h4><strong>Real-time Preview</strong></h4><p>To facilitate an intuitive customization process, we incorporated a real-time preview feature. This lets operators instantly visualize how their changes will appear, ensuring a seamless and engaging engineer experience.</p><h4>Attaching Files (PDF)</h4><p>Recognizing the need for diverse content in notifications, we’ve incorporated the ability to attach PDF files. This feature empowers operators to include additional information or documentation directly within notifications, enriching the communication process.</p><h4>Activity Monitoring</h4><p>This App actively keeps a close eye on delivering notifications. With an activity monitoring feature, every notification is carefully tracked. If a notification fails, operators can quickly click a button to resend it. This monitoring system significantly improves the reliability of our notification delivery.</p><h4>Manual Notifications</h4><p>For manual control, our Notification Management App allows operators to trigger notifications intentionally. This feature provides flexibility and control, allowing operators to input details, use templates, and specify recipient addresses. Even if there are issues in our other systems, this manual capability ensures the timely dispatch of critical notifications, independent of automated processes.</p><h3>Future Enhancements</h3><p>Looking ahead, we envision expanding the capabilities of the service to provide an even more robust solution.</p><h4>Advanced Customization Options</h4><p>As part of our commitment to providing a highly customizable notification experience, we are working on introducing advanced options that go beyond basic content and formatting. These advanced customization options will include the ability to attach metadata to emails, such as:</p><ul><li><strong>Sender’s Name or Address:</strong> Enable customization of the sender’s information to align with specific communication needs.</li><li><strong>BCC (Blind Carbon Copy):</strong> Provide the option to include BCC recipients for increased transparency or specialized tracking.</li><li><strong>Reply-To:</strong> Allow customization of the reply-to address, enhancing communication channels and streamlining recipient responses.</li></ul><h4>Multi-Channel Support</h4><p>While the service currently supports the email format, we recognize the importance of diversifying communication channels. In our pursuit of comprehensive multi-channel support, we are actively exploring the integration of additional transport types, such as SMS and In-App Notifications.</p><p>This expansion aims to provide the flexibility to choose the most effective communication channel for different scenarios, ensuring a cohesive brand experience across various platforms. By adopting these additional transport types, we aim to create a more versatile solution.</p><h3>Conclusion</h3><p>In wrapping this article up, our in-house solution may not boast flashy visuals, but it’s the silent hero behind the scenes. Complemented by activity monitoring and manual control options, Our focus on simplicity, template flexibility, and real-time previews reflects our commitment to addressing the unique needs of our clients. As we look ahead, we’re dedicated to improving our solution with advanced customization options, multi-channel support, and so on.</p><p>Stay Tuned for this journey as we continue to explore enhancements, ensuring our notifications evolve in step with the changing demands of our business domain.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=684f68a6681f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/how-we-craft-tailored-notification-experiences-a-peek-into-our-simple-in-house-solution-684f68a6681f">How We Craft Tailored Notification Experiences: A Peek into Our Simple In-House Solution</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Centralized Management of Amazon S3 Resources Using GitLab CI/CD Pipelines and Its Precautions]]></title>
            <link>https://medium.com/wealthpark-engineering/centralized-management-of-amazon-s3-resources-using-gitlab-ci-cd-pipelines-and-its-precautions-70d46767d748?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/70d46767d748</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[wealthpark]]></category>
            <category><![CDATA[gitlab]]></category>
            <dc:creator><![CDATA[Sota Fujimoto]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 13:22:04 GMT</pubDate>
            <atom:updated>2023-10-16T23:54:43.320Z</atom:updated>
            <content:encoded><![CDATA[<p>by <a href="https://www.linkedin.com/in/sota-fujimoto/">Sota Fujimoto</a>, a Backend SWE at WealthPark</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KvCRA-YBtWzxS6wRNmhJlg.jpeg" /><figcaption>Eye of the Storm Image from Outer Space</figcaption></figure><p>Managing S3 buckets and objects can be cumbersome.</p><p>Amazon Simple Storage Service (S3) is a powerful cloud storage solution that offers scalable and durable data storage. However, as your cloud infrastructure grows, so does the complexity of managing your S3 resources. This is where GitLab CI/CD comes to the rescue.</p><p>This article explores how you can leverage GitLab CI/CD pipelines to centralize and automate the management of your S3 Contents, making your cloud storage infrastructure more efficient and secure. Additionally, some measures to be taken into account during the execution of this process are addressed.</p><h3>Case Study</h3><p>Imagine you have an application that relies on S3 to store user uploads, configuration files, or even application binaries. Traditionally, managing these resources might involve manual steps or separate scripts that handle resource provisioning, file uploads, and permissions management.</p><p>Now, consider the introduction of GitLab CI/CD pipelines into this scenario; that will empower you to streamline these processes, ensuring that your application and its associated S3 assets are always in sync.</p><p>Here are the steps to achieve this integration:</p><h4>1. Repository Organization</h4><p>Ensure that your GitLab repository is well-organized. Create dedicated directories or folders within your repository to house the scripts, configurations, and other assets related to your S3 resource management. This keeps your codebase clean and maintains a clear separation between your application code and S3 management components.</p><h4>2. AWS IAM Roles and Policies</h4><p>Review AWS IAM (Identity and Access Management) roles and policies that provide your CI/CD pipeline with the necessary permissions to manage S3 contents. These policies should be restrictive and follow the principle of least privilege.</p><p>Then, <a href="https://docs.gitlab.com/ee/ci/cloud_deployment/#authenticate-gitlab-with-aws">authenticate GitLab with AWS</a>.</p><h4>3. GitLab CI/CD Setup</h4><p>Define the CI/CD pipeline in your GitLab repository’s .gitlab-ci.yml file. This file specifies the stages and jobs needed to manage S3 resources.</p><blockquote>A typical pipeline might consist of four stages, executed in the following order:</blockquote><blockquote>・A <em>build</em> stage, with a job called <em>compile</em>.<br>・A <em>test</em> stage, with two jobs called <em>test1</em> and <em>test2</em>.<br>・A <em>staging</em> stage, with a job called <em>deploy-to-stage</em>.<br>・A <em>production</em> stage, with a job called <em>deploy-to-prod</em>.</blockquote><blockquote>— <a href="https://docs.gitlab.com/ee/ci/pipelines/">Gitlab CI/CD pipelines</a></blockquote><p>You can extend this general pipeline to include stages and jobs for managing your S3 assets. These CI/CD stages can handle tasks like creating buckets, uploading files, and setting permissions, ensuring that S3 management becomes an integral part of your development workflow.</p><p><strong>Example: Uploading Files to S3</strong></p><p>Here is how to upload files to an Amazon S3 bucket using GitLab CI/CD. We’ll use the popular AWS CLI to implement this.</p><pre>deploy_to_s3:<br>  stage: deploy<br>  script:<br>    - aws s3api put-object<br>      --bucket my-s3-bucket<br>      --key script.js<br>      --body script.js</pre><p>In this example:</p><ol><li>We define a single job called deploy_to_s3 within the deploy stage of our CI/CD pipeline.</li><li>In the script section, we use the AWS CLI’s aws s3api put-object command to upload a single file (script.js) to the specified S3 bucket (my-s3-bucket).</li></ol><ul><li>--key script.js specifies the name of the object in the S3 bucket.</li><li>--body script.js specifies the file in your Gitlab repository to be uploaded to the S3 bucket.</li></ul><p>You can adapt and expand on this example to fit your specific requirements, referring to <a href="https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3api/put-object.html">the official documentation</a>.</p><h3>Precautions</h3><p>Though it is highly effective to centralize the management of S3 resources using GitLab CI/CD pipelines, there are some important safety and reliability tips you should keep in mind.</p><h4>Secrets Management</h4><p>Managing sensitive contents like configurations for your application is critical for security. You can store those in your repository setting by using <a href="https://docs.gitlab.com/ee/ci/variables/index.html#use-file-type-cicd-variables">file-type CI/CD variables</a>.</p><p>File-type variables can then be utilized as environment variables in CI/CD jobs. In the illustration below, AWS_S3_OBJECT_SECRETS is file-type.</p><pre>deploy_secrets_to_s3:<br>  stage: deploy<br>  script:<br>    - aws s3api put-object<br>      --bucket ${BUCKET_SECRETS}<br>      --key secrets.js<br>      --body ${AWS_S3_OBJECT_SECRETS}</pre><p>Please note that secret variables cannot be version-controlled directly in your Git repository, as they are meant to be stored securely outside the repository to prevent exposure of sensitive information.</p><h4>Test Dependencies</h4><p>It is important to isolate S3 resources used in test stages from those in production to prevent accidental damage to production or failures of deployments. To implement this, you can copy the files in your repository.</p><p>GitLab CI/CD supports Bash/Shell commands, enabling the straightforward duplication and application of objects in the test stages.</p><pre>.test:<br>  stage: test<br>  script:<br>    - cp script.js /test/script.js<br>    - #run tests using /test/script.js</pre><p>Another possible solution is to create separate S3 buckets dedicated to testing. However, it might not be ideal, as it could disrupt the order of CI/CD jobs by necessitating deployment before the production stages.</p><h3>Conclusion</h3><p>This article discusses how GitLab CI/CD pipelines can simplify the management of S3 buckets and objects as well as its precautions mentioned earlier to maintain security and reliability.</p><p>There is still room for improvement about both what’s written here and what’s been done for our CI/CD, but having said that, it is good at least we treat some S3 resources the same way, just as we version-control codes in our GitLab repository.</p><p>We look forward to witnessing the ongoing development of our CI/CD infrastructure, which will empower and enhance the experiences of our engineering teams.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70d46767d748" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/centralized-management-of-amazon-s3-resources-using-gitlab-ci-cd-pipelines-and-its-precautions-70d46767d748">Centralized Management of Amazon S3 Resources Using GitLab CI/CD Pipelines and Its Precautions</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revamping with Landing Zone: Exploring Multi-Account AWS Architecture in our Infrastructure Rebuild]]></title>
            <link>https://medium.com/wealthpark-engineering/revamping-with-landing-zone-exploring-multi-account-aws-architecture-in-our-infrastructure-rebuild-6b1f2da9327?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/6b1f2da9327</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[network]]></category>
            <category><![CDATA[aws-control-tower]]></category>
            <category><![CDATA[aws-landing-zone]]></category>
            <category><![CDATA[wealthpark]]></category>
            <dc:creator><![CDATA[Ryo Kubota]]></dc:creator>
            <pubDate>Wed, 21 Jun 2023 02:35:39 GMT</pubDate>
            <atom:updated>2023-06-21T02:35:38.916Z</atom:updated>
            <content:encoded><![CDATA[<h3>Revamping with Landing Zone: Exploring Multi-Account AWS Architecture in our Infrastructure Rebuild — Part 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*ddJ1yUc62eUnHcqLM0crhg.jpeg" /></figure><h3>Introduction</h3><p>Welcome to this technical blog post where I, <a href="https://twitter.com/ryok6t">@ryok6t</a>, Senior Lead SRE Manager at WealthPark, will walk you through a project called “Rebuild”, which is a comprehensive project to rebuild our entire infrastructure.</p><p>The project involved addressing various challenges and shortcomings that impeded our operations, with a primary focus on a significant overhaul of our AWS infrastructure. By enhancing security, optimizing operations, and establishing a solid foundation for future scalability and innovation, we aimed to create a robust infrastructure.</p><p>One of the key aspects of the project involved rebuilding an overly complex AWS infrastructure from scratch with multiple accounts, following best practices.</p><p>In this series of blog posts, I will discuss the challenges we faced, the strategies we employed, and the lessons we learned along the way. By sharing our experiences and insights, I hope this blog will help anyone designing AWS multi-account environments.</p><p>While we have made numerous improvements, including Kubernetes-related updates and other architectural enhancements, this blog post specifically focuses on the AWS restructuring aspects of our broader infrastructure project. To ensure a comprehensive overview, I plan to cover other areas of the project in future blog posts.</p><h3>Table of Contents</h3><ul><li>Challenges with the Existing Architecture</li><li>AWS Multi-Account Best Practices</li><li>Redesigning the Architecture</li><li>Benefits and Outcomes</li><li>Lessons Learned</li><li>Conclusion</li></ul><h3>Challenges with the Existing Architecture</h3><p>To grasp the significance of the account structure overhaul, it is crucial to understand the issues plaguing our previous AWS configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gGBwjiX5lcxGTiJC4qrqdw.png" /><figcaption>The architecture of the old infrastructure</figcaption></figure><p>The diagram may appear complex, but it is important to note that it is presented in a simplified form.</p><p>The existing account structure consisted of three AWS accounts, with the production environment distributed across two of them. This distribution was not based on any strategic reasoning, but rather a result of historical circumstances.</p><p>You can see that there are some uncommon configurations in some places.</p><p>For example, the areas in red in the figure:</p><ul><li>Traffic finally reaches the application via ALB -&gt; NGINX -&gt; ALB</li><li>Middleware or dependent components are connected via the Internet</li></ul><p>Numerous problems arose from this arrangement. Let’s break down some of these issues:</p><h4>1. Cognitive Load</h4><p>The complex and fragmented account structure imposed a heavy cognitive load on the teams. With accounts oddly split and workarounds in place, the architecture deviated from standard practices, necessitating additional effort and mental strain. This divergence from the norm added complexity and made day-to-day operations challenging.</p><h4>2. Security (Network Configuration)</h4><p>One of the major security challenges stemmed from the inconsistent and uncommon network configuration. The production environment, spread across two accounts, featured completely separate networks. This separation posed significant problems especially when middleware, such as databases, needed to communicate between accounts. In some cases, middleware was connected by exposing it to the internet, leading to vulnerabilities. Additionally, certain APIs had IP restrictions, but due to the separation of VPCs, they were configured by adding the IP addresses of Kubernetes nodes to the security group. Consequently, incidents occurred when the IP addresses of new nodes were forgotten to be added to the allowed list.</p><h4>3. Security (IAM Management)</h4><p>IAM user management was another area that posed significant security risks. IAM users were created directly for each account, resulting in improper permission management. Many users possessed stronger permissions than necessary, creating a potential attack surface. Moreover, passwords and access keys were not regularly updated and being reused in many different places, further exacerbating security vulnerabilities.</p><h4>4. Operational Costs</h4><p>Our previous infrastructure relied on outdated Kubernetes tools that imposed significant operational costs on us. I will not go into detail in this blog post, but a future blog post will delve into the specific issues and details surrounding these challenges and provide a comprehensive exploration of our new Kubernetes infrastructure.</p><p>While the challenges discussed here shed light on some of the key problems, it is important to note that they are only the tip of the huge iceberg. The existing account structure presented a myriad of issues that hindered our operations and compromised the overall efficiency and security of our infrastructure.</p><h3>AWS Multi-Account Best Practices</h3><p>As part of our endeavor to revamp our AWS account structure, we recognized the importance of adhering to AWS multi-account best practices. These best practices are designed to provide a solid foundation for security, governance, and scalability within an AWS environment. By following these guidelines and leveraging AWS Control Tower, we aimed to establish a more robust and well-organized account structure that would mitigate risks and optimize operations.</p><h4>1. Clear Account Boundaries</h4><p>One key best practice is to establish clear boundaries between AWS accounts.</p><p><a href="https://docs.aws.amazon.com/wellarchitected/2023-04-10/framework/sec_securely_operate_multi_accounts.html">SEC01-BP01 Separate workloads using accounts</a></p><p>We have leveraged AWS Control Tower’s Account Factory feature. This approach allowed us to ensure that each account had a well-defined purpose and scope, enhancing security and improving accountability.</p><h4>2. IAM Centralization</h4><p>Centralizing IAM management across accounts is another crucial aspect of AWS multi-account best practices.</p><p><a href="https://aws.amazon.com/jp/blogs/mt/multi-account-strategy-for-small-and-medium-businesses/">Multi-account strategy for small and medium businesses | Amazon Web Services</a></p><p>By leveraging AWS Identity Center and permissions management capabilities, we achieved better control and streamlined management of access and permissions. This approach reduced the risk of misconfigurations, improved consistency, and enabled more efficient IAM governance.</p><h4>3. Network Isolation and Connectivity</h4><p>To enhance security and control network traffic, we implemented network isolation and connectivity using AWS Control Tower’s guardrails and AWS networking services. By configuring separate VPCs for different accounts and establishing secure communication channels, such as Transit Gateway, we ensured clear separation and controlled access between accounts.</p><h4>4. Security and Compliance Automation</h4><p>Automating security and compliance measures is crucial in maintaining a secure AWS environment. With AWS Control Tower, we leveraged its built-in guardrails, including AWS Config rules, AWS CloudTrail logging, and AWS Security Hub integration, to automate security and compliance checks across accounts.</p><p>In our account structure overhaul project, we made considerable use of AWS Control Tower to implement these AWS multi-account best practices. By following these guidelines and leveraging the capabilities of AWS Control Tower, we were able to establish a more secure, well-governed, and scalable AWS environment. The subsequent sections will detail how we applied these best practices during the redesign, and the positive impact they had on our infrastructure and operations.</p><h3>Redesigning the Architecture</h3><p>The redesign of our AWS account structure was a meticulous process aimed at addressing the challenges and shortcomings of the previous configuration. In this section, I will introduce you to the architectural decisions we made and the considerations we took into account while redesigning our infrastructure.</p><h4>1. Organizational Units and Account Architecture</h4><p>As part of the account structure overhaul, we implemented a new account structure that provides enhanced organization, control, and security. The new structure comprises five Organization Units (OUs), each serving a specific purpose. Here’s an overview of the OUs and the accounts within them:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iR0mBrBfTkn28W1wD4nnPA.png" /><figcaption>OU and Account Structure</figcaption></figure><p><strong>Infrastructure OU:</strong></p><ul><li>Network Account: <br>This account follows the best practice of centralizing all network-related resources (<a href="https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/infrastructure-ou-and-accounts.html#network-account">https://docs.aws.amazon.com/whitepapers/latest/organizing-your-aws-environment/infrastructure-ou-and-accounts.html#network-account</a>).<br>By consolidating networking components such as VPCs and subnets, we achieved improved management, visibility, and control over our network infrastructure.</li><li>Shared Services Account: <br>The Shared Services account holds resources that are not specific to any particular environment or product. This includes services such as Elastic Container Registry (ECR) and Argo CD, which are shared across multiple applications and environments.</li></ul><p><strong>Workloads OU:</strong></p><ul><li>Environment-Specific Workload Accounts: <br>Under the Workloads OU, we have individual accounts for different environments, such as development, staging, and production. Each account is dedicated to hosting specific workloads, ensuring separation and isolation between environments. This segregation helps maintain the integrity of each environment and enables granular access control.</li></ul><p><strong>Workloads (Fintech Product) OU:</strong></p><ul><li>Environment-Specific Workload Accounts: <br>The Workloads (Fintech Product) OU follows a similar structure as the Workloads OU above. However, it is specifically dedicated to hosting our fintech product. Given the higher level of isolation and security requirements for the fintech product, we established a separate OU to ensure stricter access controls and protect sensitive data.</li></ul><p><strong>Security OU:</strong></p><ul><li>Audit Account: <br>This account is automatically created by AWS Control Tower and aligns with the best practice of having a dedicated account for security auditing purposes. It enables centralized monitoring, logging, and auditing of our AWS infrastructure, contributing to enhanced security and compliance.<br>The security team uses this account on a daily basis to perform a variety of monitoring and analysis, including log analysis and threat detection.</li><li>Log Archive Account: <br>The Log Archive Account is automatically created by AWS Control Tower as well. It serves as a centralized location for archiving logs from various accounts, providing a consolidated view for auditing, analysis, and compliance purposes.<br>The security team uses this account to detect security incidents and suspicious behavior.</li></ul><p><strong>Sandbox OU:</strong></p><ul><li>Developer Sandbox Account: <br>The Sandbox OU serves as a playground for developers. It provides a dedicated environment for experimentation, testing, and prototyping without impacting production or other critical workloads. Developers can explore new AWS services, test new ideas, and iterate on solutions within this isolated account.</li></ul><p>In designing this OU structure, we relied heavily on official Landing Zone and other AWS documentation.</p><p><a href="https://docs.aws.amazon.com/prescriptive-guidance/latest/migration-aws-environment/welcome.html">Setting up a secure and scalable multi-account AWS environment</a></p><p>These resources provided valuable guidance on best practices for multi-account configurations.</p><p>We firmly believe that having at least three OUs: Security, Infrastructure and Workloads, is essential for an efficient multi-account configuration. While managing multiple accounts may seem daunting, the clear roles and responsibilities assigned to each account and OU make it straightforward to use and maintain.</p><p>This well-defined structure simplifies access management, resource allocation, and governance across our AWS environment.</p><p>By adopting this refined account structure, we have established a solid foundation for better control, security, and scalability in our AWS infrastructure.</p><h4>2. Network Architecture</h4><p>As part of the infrastructure rebuild, we implemented a new network architecture that provides better organization, security, and connectivity across our AWS environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/989/1*gaQ0LYUa4ln-tw1MgATuuQ.png" /><figcaption>Network Architecture</figcaption></figure><p>Here are the key elements of the new network architecture:</p><p><strong>Network Accounts and Resource Aggregation</strong></p><p>All network-related resources, including Virtual Private Clouds (VPCs) and Transit Gateways, are now aggregated into the dedicated Network account. This consolidation improves management and visibility of our network infrastructure.</p><p><strong>Shared VPCs and RAM Sharing</strong></p><p>VPCs used by individual accounts, such as workload accounts, are shared from the Network account using the AWS Resource Access Manager (RAM).</p><p><strong>Centralized Egress Architecture</strong></p><p>We adopted a “<a href="https://docs.aws.amazon.com/ja_jp/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/centralized-egress-to-internet.html">Centralized Egress</a>” architecture, where all egress traffic from VPCs passes through an Egress VPC via the Transit Gateway and then goes out to the Internet. This design provides several benefits, including improved network security, centralized monitoring and logging of outbound traffic, and consistent egress policies across the organization.</p><p>One additional advantage of the Centralized Egress architecture is its ability to address IP restrictions. When connecting to external APIs or other services, it is often necessary to fix the source IP address for security reasons. However, in dynamic environments, IP addresses can change frequently, requiring some workaround, such as deploying additional proxies like NGINX to handle such requirements.</p><p>With Centralized Egress, all egress traffic flows through the Egress VPC, and the source IP addresses are consistently the Elastic IP Addresses (EIPs) associated with the NAT Gateway of the Egress VPC. This ensures that the source IP remains static, simplifying the management of IP-based security restrictions and eliminating the need for additional proxy solutions.</p><p><strong>Centralized Ingress Considerations</strong></p><p>There are some articles that mention “Centralized Ingress”</p><p><a href="https://docs.aws.amazon.com/whitepapers/latest/building-scalable-secure-multi-vpc-network-infrastructure/using-network-firewall-for-centralized-ingress.html">Using the AWS Network Firewall for centralized ingress</a></p><p>While it offers advantages such as improved network security, we did not adopt it for our environment. Several factors influenced this decision.</p><p>Firstly, AWS Load Balancer Controller used in EKS in the workload accounts requires public subnets, which adds complexity to the configuration.</p><p>Secondly, we leverage Cloudflare for securing the ingress traffic to a certain extent.</p><p><strong>Private Network for In-House Applications</strong></p><p>Applications hosted in-house, such as Argo CD and HashiCorp Vault, reside on a private network.</p><p>They are assigned a domain within a private Route53 zone and secured with private certificates from AWS Certificate Manager (ACM).</p><p>These applications can only be accessed internally within the VPC or via the AWS Client VPN, ensuring a high level of security and restricting unauthorized access.</p><p><strong>Transit Gateway for VPC Interconnectivity</strong></p><p>To establish connectivity between VPCs and enable controlled communication, we utilized AWS Transit Gateway. For example, as mentioned earlier, egress traffic from all VPCs is configured to flow through the Egress VPC via Transit Gateway.</p><p>Additionally, the Shared Services VPC is configured to allow access to other VPCs, but it restricts direct communication between VPCs (e.g., between staging and production).</p><p>This segmentation enhances security and provides granular control over network traffic.</p><p><strong>Simplified Resource Creation with Terraform</strong></p><p>The implementation of this network architecture involves creating numerous resources when setting up new accounts or VPCs. To simplify this process, we developed a reusable Terraform module.</p><p>This module streamlines the creation of VPCs, subnets, RAM, Transit Gateway attachments, VPC/Transit Gateway routes, and other necessary components. By specifying the desired CIDR, the module automatically sets up everything required, including the connections to the Transit Gateway and Egress VPC, reducing manual effort and ensuring consistency across our infrastructure.</p><p>The new network architecture provides a robust and secure foundation for our AWS environment. It enables efficient resource management, controlled traffic flow, and enhanced security measures, ensuring the stability and scalability of our applications and workloads.</p><h4>3. IAM Management Structure</h4><p>In our redesigned AWS account structure, IAM (Identity and Access Management) is now managed using AWS Identity Center. This new approach streamlines and centralizes IAM management, providing improved security and efficient access control across our organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*znng2v1vXduTFRmSXNCybA.png" /><figcaption>IAM Management Structure with Okta and Identity Center</figcaption></figure><p>To enhance identity management and access control, we leverage Okta as our identity management solution. AWS permissions are tightly integrated with Okta, ensuring that only users who belong to specific groups in Okta can assume roles and access their respective AWS accounts.</p><p>One significant change in our IAM management structure is the shift away from issuing individual IAM users as we did before. Instead, we have eliminated the need for static passwords and access keys. Users now receive temporary tokens that grant them access to their AWS accounts for a defined period. This not only enhances security by reducing the risk of credential compromise but also simplifies user management and reduces the complexity associated with password rotations and access key rotations.</p><h4>4. Documentation and Knowledge Transfer</h4><p>Our team places a strong emphasis on documentation as a crucial component of our knowledge sharing and transfer efforts. We firmly believe that creating comprehensive documentation is essential for understanding the intricacies of our account and network structure in this multi-account environment, ensuring seamless onboarding for new team members, and facilitating efficient collaboration among the development team.</p><p>To achieve this, we have dedicated considerable efforts to create extensive documentation covering various aspects of our infrastructure. Here are some examples:</p><ul><li>Multi-account Documentation: <br>This documentation provides a comprehensive overview of AWS Landing Zones, Control Tower, Organizational Units (OUs), and their roles within our infrastructure. It outlines the specific OUs and accounts that exist, along with their respective functions and responsibilities.</li><li>Login Documentation: <br>We have created detailed documentation that guides each developer on how to log into AWS from their local environment. It covers the setup process and provides instructions on using a command to simplify the login process.</li><li>AWS Client VPN Documentation: <br>We have documented the setup process for AWS Client VPN. This documentation includes the necessary configuration steps, for example, to enable resolution of names using private Route53 zones and instructions on trusting the required self-certificates.</li></ul><p>Our documentation primarily resides in Confluence, where it serves as a centralized knowledge base. However, we also ensure that relevant documentation is available in appropriate locations. For instance, we extensively use Terraform to manage our AWS resources, leveraging reusable modules. For modules created during and after this project, we adhere to the <a href="https://developer.hashicorp.com/terraform/language/modules/develop/structure">Standard Module Structure</a> and include a README file. These READMEs provide clear instructions on module usage, examples, and the contextual background of each module.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6BXotcHNnp1PIKfGejZWkA.png" /><figcaption>README Example</figcaption></figure><p>By prioritizing documentation and knowledge transfer, we foster a culture of effective communication and collaboration within our team. This not only facilitates seamless onboarding for new members but also ensures that our entire development team can easily navigate the intricacies of our account and network structure.</p><h3>Benefits and Outcomes</h3><p>The comprehensive rebuild of our infrastructure, particularly the restructuring of our AWS architecture, has yielded significant benefits and outcomes. Here, we highlight some of the key advantages and positive outcomes that we have achieved through this project:</p><h4><strong>1. Enhanced Security</strong></h4><p>The new AWS account structure, based on best practices and recommendations from AWS, has significantly improved the overall security posture of our infrastructure. By implementing consistent network configurations, implementing appropriate IAM management practices, and adopting centralized egress architecture, we have greatly enhanced the security of our applications and data.</p><h4>2. Optimized Operational Costs</h4><p>Through the rebuild project, we have optimized our operational costs by leveraging AWS services and features effectively. The adoption of AWS Control Tower and AWS SSO has streamlined the management of IAM, reducing complexity and administrative overhead. We also implemented cost optimization measures not covered in this blog, such as Savings Plans and the use of Spot Instances, to maximize the cost-effectiveness of our infrastructure operations.</p><h4>3. Improved Efficiency and Scalability</h4><p>The new account structure and network architecture have led to improved efficiency and scalability in our operations. The clear separation of accounts and the use of organization units have reduced cognitive load and simplified the management and provisioning of resources. Furthermore, the use of reusable Terraform modules has expedited the creation of new accounts and VPCs, reducing manual effort and improving efficiency.</p><h4>4. Enhanced Documentation and Knowledge Transfer</h4><p>With a strong focus on documentation, we have created comprehensive resources that provide clarity and guidance on our account structure, network architecture, and various aspects of our infrastructure. This documentation has proven invaluable for onboarding new team members, facilitating knowledge transfer, and ensuring a thorough understanding of our infrastructure setup.</p><h4>5. Future-Proof Foundation</h4><p>The rebuild project has established a robust and future-proof foundation for our infrastructure. By adhering to AWS best practices and utilizing services like AWS Control Tower, we have established a scalable and flexible architecture that can accommodate future growth and innovation.</p><p>Overall, the rebuild project has delivered significant benefits, including enhanced security, optimized operational costs, improved efficiency and scalability, comprehensive documentation, and a future-proof foundation. These outcomes have set the stage for continued growth, innovation, and seamless management of our infrastructure as we move forward.</p><h3>Lessons Learned</h3><p>Throughout the rebuild project, we have gained valuable insights and lessons that have contributed to our growth and improved our understanding of managing infrastructure. Here, we share some of the key lessons we learned during this endeavor:</p><h4>1. Proper Planning and Design</h4><p>Thorough planning and design are crucial for a successful infrastructure rebuild. Taking the time to carefully analyze the existing infrastructure, identify pain points, and define clear goals sets the foundation for an effective rebuild. Especially, once the account structure and network architecture have been built, it is quite difficult to change them later. It is important to involve all relevant stakeholders and subject matter experts in the planning phase to ensure that the new architecture aligns with the organization’s requirements and future scalability needs.</p><h4>2. Leveraging Best Practices</h4><p>Embracing and implementing AWS best practices and recommendations greatly simplifies the management and security of multi-account environments. AWS offers a lot of documentation on multi-account recommendations. Staying up-to-date with such documentation, Landing Zone guides and other relevant resources ensures well-informed decisions.</p><h4>3. Document Everything</h4><p>Documentation is a critical aspect of managing complex infrastructure. Multi-account configurations are easy once you get used to them, but are often difficult to understand at first for those with only single account experience. Maintaining comprehensive and up-to-date documentation, including network architecture diagrams and account structures, is essential for effective knowledge transfer, and onboarding new team members. It is important to foster a culture of documentation and assign responsibility for regularly updating and reviewing documentation.</p><h4>Conclusion</h4><p>The “Rebuild” project has been an ambitious endeavor to rebuild our entire infrastructure from scratch, addressing the limitations and challenges of the existing architecture.</p><p>One of the primary goals of our team has been to empower the development team to manage the application infrastructure autonomously. However, the previous infrastructure, with its complexities, uncommon configurations, and various challenges, hindered progress toward that ideal. With the completion of this project, we have reached an important milestone and are now poised to move forward from a more solid foundation.</p><p>I extend my sincere appreciation to the entire team and everyone who was involved for their dedication and hard work. Together, we have achieved a significant milestone in our infrastructure journey.</p><p>In conclusion, the “Rebuild” project represents a comprehensive effort to revamp our infrastructure. This transformation lays the groundwork for a secure, scalable, and efficient infrastructure, positioning our organization for success in the dynamic world of cloud computing.</p><p>In the upcoming blog post, I will provide an in-depth exploration of the migration process, where I will unravel the techniques and strategies we employed to seamlessly implement this major overhaul while minimizing disruptions to our production environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b1f2da9327" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/revamping-with-landing-zone-exploring-multi-account-aws-architecture-in-our-infrastructure-rebuild-6b1f2da9327">Revamping with Landing Zone: Exploring Multi-Account AWS Architecture in our Infrastructure Rebuild</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On starting a tech blog at WealthPark]]></title>
            <link>https://medium.com/wealthpark-engineering/on-starting-a-tech-blog-at-wealthpark-3bd84c46336?source=rss----cd91ab48f9e8---4</link>
            <guid isPermaLink="false">https://medium.com/p/3bd84c46336</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[japan]]></category>
            <category><![CDATA[wealthpark]]></category>
            <dc:creator><![CDATA[Takahiro Fujii]]></dc:creator>
            <pubDate>Sun, 11 Jun 2023 12:11:56 GMT</pubDate>
            <atom:updated>2023-06-11T12:36:53.806Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi! I am <a href="https://www.linkedin.com/in/takahiro-fujii-221a7461/">Taka</a>, SVP of Engineering at WealthPark.</p><p>I’m excited to announce the launch of our tech blog titled “WealthPark Engineering”.</p><p>Allow me to share a brief message about our company and organization as we launch this blog.</p><h3>What Does WealthPark Do?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FHd6G3hwIZp8erLOiXvLSQ.png" /><figcaption>Company logo</figcaption></figure><p><a href="https://wealth-park.com/en/lp-product-us/">WealthPark</a> is a Japanese startup in the PropTech and FinTech areas.</p><p>We are running several businesses.<br>From an engineering perspective, we primarily develop products in two domains:</p><ul><li><strong>WealthPark Business</strong> offers products (SaaS) and services for real estate management companies and property owners.</li><li><strong>WealthPark Alternative Investments</strong> provides products and services offering fractional assets investment products in the financial domain.</li></ul><p>For further information on the origins of our company, please check out the article written by our CDO, <a href="https://www.linkedin.com/in/yukiyoshimoto/">Yuki</a>, regarding the story behind WealthPark’s logo.</p><p><a href="https://bootcamp.uxdesign.cc/the-story-behind-the-wealthpark-logo-design-8fff9ea98cbb">The story behind the WealthPark logo design</a></p><h3>WealthPark’s Engineering Organization</h3><p>You might wonder why we have written our tech blog in English.</p><p>The answer is that WealthPark’s engineering organization is incredibly diverse and global. While still relatively uncommon in Japan, about 80% of our engineering team consists of international members, and English is the working language. Our team is not only fluent in English but is also composed of members from a large variety of countries (more than 15 countries). There isn’t an overwhelming majority from any particular country. As such, it is natural for our communications to be in English.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zc2ZdKseF3Gp5iDPXuxRTw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MQeW4td5DLahWBmZ65ixGQ.jpeg" /><figcaption>Potluck activity in Engineering Team</figcaption></figure><p>As a side note: Our business is primarily centered in Japan, so we have product managers and some engineering managers who are proficient in both Japanese and English to bridge the gap between business and engineering.</p><h3>Why a Global Engineering Organization?</h3><p>Some might question why WealthPark has a global engineering organization. Let me share my thoughts.</p><p>Being a global engineering organization is not an end but a means to deliver better products and services.</p><p>Programming is fundamentally in English, and at least much of the primary information is provided in English. In the West, working in English is natural, but due to several reasons, English proficiency remains low in Japan. Furthermore, Japan is facing a critical turning point with a declining population and a shrinking market.</p><h3>Elon Musk on Twitter: &quot;At risk of stating the obvious, unless something changes to cause the birth rate to exceed the death rate, Japan will eventually cease to exist. This would be a great loss for the world. / Twitter&quot;</h3><p>At risk of stating the obvious, unless something changes to cause the birth rate to exceed the death rate, Japan will eventually cease to exist. This would be a great loss for the world.</p><p>In the software engineering industry, which already has a high demand surpassing supply, the above circumstances pose a challenge. That’s why several large Japanese companies have been actively working on globalizing their engineering organizations. I used to work in such an environment myself. While I believe this trend is essential, I also sense an oddity.</p><p><strong>Is having a global engineering organization special🤔?</strong></p><p>Personally, I don’t think there should be any particular reason for being a global engineering organization. I want our organization to show, through product development and problem-solving, that being global is an one of the natural choices for creating the best products through software engineering.</p><p>The reason I arrived at this way of thinking is probably because I am not someone who grew up in a global environment. I was just a Japanese person who really loved Japan🇯🇵. <br>When I was a child, I didn’t have any desire to go abroad. I disliked English in school, and I could hardly speak English during my student days.</p><p>However, I was someone who enjoyed communication.<br>As I entered society, I started having friends who were not Japanese. <br>Fortunately, I became close with some of them, and as I enjoyed talking with them, I gradually lost my hesitation to speak English. It wasn’t that I felt a strong need to learn English, but through talking with friends and learning programming, I naturally became able to speak it (though I did study).</p><p>Therefore, it’s not that I have an extremely strong sense of purpose to lead a global engineering organization, but rather, I just want to create good products in this organization as one of the natural options, and I want to solve various technical challenges without putting on airs. However, I believe there should be various diversities in an organization. It’s perfectly fine if there are Japanese people who want to improve their English skills in this environment, people who have a sense of mission in globalizing, or even people who want to see with their own eyes whether such an organization can really function.</p><p>Currently, being a global engineering organization distinguishes the WealthPark engineering team in Japan. However, I hope that in the future, products and problem-solving take precedence over the engineering organization itself.</p><p>I don’t believe it’s necessary for all engineering organizations in Japan to be global. But, I’d be happy if we can serve as an example that companies naturally build great products with such an organization.</p><h3>Reality</h3><p>On the other hand, there are certainly challenges in creating a global engineering organization in reality here in Japan. Many of our customers are Japanese companies, as well as Japanese users. We need to empathize with the challenges they face and provide solutions and improvements through our products. Naturally, it’s necessary to listen to the voices of our customers and understand the real estate and financial domains, which have many structures unique to Japan. For this, it is essential to convey information and context to the engineering organization as freshly as possible.</p><p>Also, there may be cases where technical discussions in Japanese with customers and partners are necessary.</p><p>There are many efforts and challenges to make a global engineering organization function efficiently in our business and domain. We are considering sharing our initiatives and organizational stories on how an organization like ours can be established in this domain.</p><h3>Establishing a Tech Blog</h3><p>What personally sticks in my memory regarding tech blogs is <a href="https://netflixtechblog.com/">Netflix’s Tech Blog</a>.</p><p>At the time, when I read old Netflix articles and came across articles about microservices and <a href="https://www.linuxinsider.com/story/netflix-releases-chaos-monkey-into-the-wild-75780.html">Chaos Engineering</a>, I felt as though they were solving challenges that were far ahead of my own, and I enjoyed reading the articles as if I was learning about the future.</p><p>With the emergence of LLM, ChatGPT, and others, searching the web for simple technical solutions may not be as common in the near future.</p><p>On the other hand, various challenges and case studies that we have undertaken will never be known by everyone unless we share them through a tech blog.</p><p>Although the phases and scale are completely different, we hope to share the amazing challenges of WealthPark’s engineers through our tech blog.</p><p>Through our articles, we can convey what kind of phase and challenges WealthPark was facing at that time. If this information can be even slightly useful for you or your company when facing similar challenges in the future, I would be delighted.</p><p>Takahiro Fujii</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSagHhrzydGmBP5GnNFgKw.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bd84c46336" width="1" height="1" alt=""><hr><p><a href="https://medium.com/wealthpark-engineering/on-starting-a-tech-blog-at-wealthpark-3bd84c46336">On starting a tech blog at WealthPark</a> was originally published in <a href="https://medium.com/wealthpark-engineering">WealthPark Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>