Skip to content

@W-20452321: migrate aws-sdk from v2 to v3#3562

Closed
o-olaosebikan wants to merge 5 commits intoSalesforceCommerceCloud:developfrom
o-olaosebikan:o.olaosebikan/W-20452321/aws-sdk-upgrade
Closed

@W-20452321: migrate aws-sdk from v2 to v3#3562
o-olaosebikan wants to merge 5 commits intoSalesforceCommerceCloud:developfrom
o-olaosebikan:o.olaosebikan/W-20452321/aws-sdk-upgrade

Conversation

@o-olaosebikan
Copy link
Contributor

@o-olaosebikan o-olaosebikan commented Jan 6, 2026

Migrate AWS SDK FROM Version 2 TO Version 3

Description

End of life support FOR AWS-SDK was reached on September 8, 2025

The JS AWS SDK is used to send metrics to cloudwatch from pwa kit runtime library. The goal is to update the library to use v3 version. We utilize codemod scripts for the migration (recommended by AWS) and manually adjust discrepancies between the two versions

Types of Changes

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Breaking change (could cause existing functionality to not work as expected)
  • Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

  • Change of import; use of client-cloudwatch instead for v3
  • The key maxRetries was renamed to maxAttempts for v3
  • v3 supports promises instead of callback functionality
  • Adjust metric sender to convert timestamp to Date where necessary

How to Test-Drive This PR

  • Run npm install and npm ci at the root
  • cd into packages/template-mrt-reference-app
  • Run the following commands:
npm run save-credentials -- --cloud-origin https://cloud-<env>.mobify-staging.com/ -u <email> -k <api-key>
npx pwa-kit-create-app
npm run push -- --cloud-origin https://cloud-<env>.mobify-staging.com -s <project>
  • Deploy the bundle to your target
  • Run the command below about 5 times to ping the endpoint
    curl -s -o /dev/null -w "%{http_code}\n" https://{project}-{target}.[mobify-storefront-staging.com](http://mobify-storefront-staging.com
    Wait for a few minutes and then check your subaccount of the target for the following metrics
    Cloudwatch > Metrics > ssr > Project, Target
    Ensure RequestTime and RequestSuccess are displayed in metrics
  • Run the command below about 5 times to ping the endpoint
    curl -s -o /dev/null -w "%{http_code}\n" https://{project}-{target}.[mobify-storefront-staging.com](http://mobify-storefront-staging.com/exception
    Wait for a few minutes and then check your subaccount of the target for the following metrics
    Cloudwatch > Metrics > ssr > Project, Target
    Ensure RequestTime and RequestFailed500 are displayed in metrics

Checklists

General

  • Changes are covered by test cases
  • CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance

You must check off all items in one of the follow two lists:

  • There are no changes to UI

or...

Localization

  • Changes include a UI text update in the Retail React App (which requires translation)

@o-olaosebikan o-olaosebikan requested a review from a team as a code owner January 6, 2026 23:21
@salesforce-cla
Copy link

salesforce-cla bot commented Jan 6, 2026

Thanks for the contribution! It looks like @o-olaosebikan is an internal user so signing the CLA is not required. However, we need to confirm this.

@cc-prodsec
Copy link
Collaborator

cc-prodsec commented Jan 6, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@o-olaosebikan o-olaosebikan added skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated and removed skip changelog Skip the "Changelog Check" GitHub Actions step even if the Changelog.md files are not updated labels Jan 7, 2026
@noahadams noahadams self-assigned this Jan 7, 2026
@o-olaosebikan o-olaosebikan closed this by deleting the head repository Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants