@maestro-js/aws-cdk-recipes 1.0.0-alpha.26 → 1.0.0-alpha.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +6 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -4250,7 +4250,12 @@ function resolveSenderType(sender) {
4250
4250
  }
4251
4251
  function resolveIdentity(senderType, sender, hostedZone) {
4252
4252
  if (senderType === "email") return ses.Identity.email(sender);
4253
- if (hostedZone) return ses.Identity.publicHostedZone(hostedZone);
4253
+ if (hostedZone) {
4254
+ if (sender !== hostedZone.zoneName && !sender.endsWith(`.${hostedZone.zoneName}`)) {
4255
+ throw new Error(`sender "${sender}" is not within hosted zone "${hostedZone.zoneName}"`);
4256
+ }
4257
+ return { value: sender, hostedZone };
4258
+ }
4254
4259
  return ses.Identity.domain(sender);
4255
4260
  }
4256
4261
  function resolveEventDestination(event) {
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "aws-cdk-lib": "^2.178.0",
21
21
  "esbuild": "^0.25.0"
22
22
  },
23
- "version": "1.0.0-alpha.26",
23
+ "version": "1.0.0-alpha.28",
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },