Skip to content

feat: add optional aws region to cdn bucket config#1404

Merged
akshaymagapu merged 1 commit intomainfrom
add-region-to-s3
Mar 5, 2026
Merged

feat: add optional aws region to cdn bucket config#1404
akshaymagapu merged 1 commit intomainfrom
add-region-to-s3

Conversation

@akshaymagapu
Copy link
Contributor

@akshaymagapu akshaymagapu commented Mar 5, 2026

Summary

This PR adds optional region support to cdnBucketConfig and validates AWS-style region formats.

Changes

  • Added optional region to the Zod schema in packages/spacecat-shared-utils/src/schemas.js.
  • Added optional region validation to the Joi schema in packages/spacecat-shared-data-access/src/models/site/config.js.
  • Added tests for:
    • valid region format: us-east-1
    • invalid region format: us_east_1

Validation

  • npm test -w @adobe/spacecat-shared-utils -- test/schemas.test.js
  • npx mocha --require ./test/setup-env.js --spec "test/unit/models/site/config.test.js" --grep "cdnBucketConfig region|cdn bucket config|validateConfiguration Function"

Example

cdnBucketConfig: {
  bucketName: 'my-bucket',
  allowedPaths: ['/logs/'],
  cdnProvider: 'aws',
  region: 'us-east-1', // optional
}

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

This PR will trigger a minor release when merged.

@akshaymagapu akshaymagapu merged commit 76a7051 into main Mar 5, 2026
7 checks passed
@akshaymagapu akshaymagapu deleted the add-region-to-s3 branch March 5, 2026 09:44
solaris007 pushed a commit that referenced this pull request Mar 5, 2026
## [@adobe/spacecat-shared-data-access-v3.9.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v3.8.0...@adobe/spacecat-shared-data-access-v3.9.0) (2026-03-05)

### Features

* add optional aws region to cdn bucket config ([#1404](#1404)) ([76a7051](76a7051))
@solaris007
Copy link
Member

🎉 This PR is included in version @adobe/spacecat-shared-data-access-v3.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

solaris007 pushed a commit that referenced this pull request Mar 5, 2026
## [@adobe/spacecat-shared-utils-v1.100.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-utils-v1.99.0...@adobe/spacecat-shared-utils-v1.100.0) (2026-03-05)

### Features

* add optional aws region to cdn bucket config ([#1404](#1404)) ([76a7051](76a7051))
@solaris007
Copy link
Member

🎉 This PR is included in version @adobe/spacecat-shared-utils-v1.100.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants