message: fix(aws-cloudfront, nextjs-component): fix aliases updating when domain is used
diff: @@ -408,12 +408,15 @@ const addDomainToCloudfrontDistribution = async (
  params.Id = subdomain.distributionId;
  // 5. then make our changes
  - params.DistributionConfig.Aliases.Items.push(subdomain.domain);
  + params.DistributionConfig.Aliases = {
  + Items: [subdomain.domain]
  + };
  +
  if (subdomain.domain.startsWith("www.")) {
  if (domainType === "apex") {
  - params.DistributionConfig.Aliases.Items[
  - params.DistributionConfig.Aliases.Items.length - 1
  - ] = `${subdomain.domain.replace("www.", "")}`;
  + params.DistributionConfig.Aliases.Items = [
  + `${subdomain.domain.replace("www.", "")}`
  + ];
  } else if (domainType !== "www") {
  params.DistributionConfig.Aliases.Items.push(
  `${subdomain.domain.replace("www.", "")}`
  @@ -421,6 +424,7 @@ const addDomainToCloudfrontDistribution = async (
  }
  }
  + // Update aliases quantity to reflect actual number of items
  params.DistributionConfig.Aliases.Quantity =
  params.DistributionConfig.Aliases.Items.length;
  