@pwrdrvr/microapps-cdk 0.2.9 → 0.2.12

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 (42) hide show
  1. package/.gitattributes +18 -18
  2. package/.jsii +1264 -165
  3. package/API.md +511 -8
  4. package/README.md +29 -0
  5. package/changelog.md +2 -0
  6. package/lib/MicroApps.d.ts +126 -105
  7. package/lib/MicroApps.d.ts.map +1 -0
  8. package/lib/MicroApps.js +32 -30
  9. package/lib/MicroAppsAPIGwy.d.ts +28 -61
  10. package/lib/MicroAppsAPIGwy.d.ts.map +1 -0
  11. package/lib/MicroAppsAPIGwy.js +14 -23
  12. package/lib/MicroAppsCF.d.ts +85 -104
  13. package/lib/MicroAppsCF.d.ts.map +1 -0
  14. package/lib/MicroAppsCF.js +58 -41
  15. package/lib/MicroAppsEdgeToOrigin.d.ts +108 -0
  16. package/lib/MicroAppsEdgeToOrigin.d.ts.map +1 -0
  17. package/lib/MicroAppsEdgeToOrigin.js +139 -0
  18. package/lib/MicroAppsS3.d.ts +19 -69
  19. package/lib/MicroAppsS3.d.ts.map +1 -0
  20. package/lib/MicroAppsS3.js +5 -32
  21. package/lib/MicroAppsSvcs.d.ts +58 -86
  22. package/lib/MicroAppsSvcs.d.ts.map +1 -0
  23. package/lib/MicroAppsSvcs.js +36 -95
  24. package/lib/MicroAppsTable.d.ts +60 -0
  25. package/lib/MicroAppsTable.d.ts.map +1 -0
  26. package/lib/MicroAppsTable.js +42 -0
  27. package/lib/index.d.ts +3 -0
  28. package/lib/index.d.ts.map +1 -0
  29. package/lib/index.js +3 -1
  30. package/lib/microapps-deployer/index.js +174 -113
  31. package/lib/microapps-deployer/index.js.map +3 -3
  32. package/lib/microapps-edge-to-origin/index.js +97 -0
  33. package/lib/microapps-edge-to-origin/index.js.map +7 -0
  34. package/lib/microapps-router/index.js +54 -69
  35. package/lib/microapps-router/index.js.map +3 -3
  36. package/lib/microapps-router/templates/appFrame.html +0 -0
  37. package/lib/utils/ReverseDomain.d.ts +1 -0
  38. package/lib/utils/ReverseDomain.d.ts.map +1 -0
  39. package/package.json +29 -24
  40. package/releasetag.txt +1 -0
  41. package/version.txt +1 -0
  42. package/patches/@aws-cdk+aws-apigatewayv2-alpha+2.8.0-alpha.0.patch +0 -39
package/.jsii CHANGED
@@ -1,14 +1,17 @@
1
1
  {
2
2
  "author": {
3
3
  "email": "harold@pwrdrvr.com",
4
- "name": "Harold Hunt",
4
+ "name": "PwrDrvr LLC",
5
+ "organization": true,
5
6
  "roles": [
6
7
  "author"
7
8
  ]
8
9
  },
9
10
  "dependencies": {
10
- "@aws-cdk/aws-apigatewayv2-alpha": "2.8.0-alpha.0",
11
- "aws-cdk-lib": "^2.8.0",
11
+ "@aws-cdk/aws-apigatewayv2-alpha": "^2.24.1-alpha.0",
12
+ "@aws-cdk/aws-apigatewayv2-authorizers-alpha": "^2.24.1-alpha.0",
13
+ "@aws-cdk/aws-apigatewayv2-integrations-alpha": "^2.24.1-alpha.0",
14
+ "aws-cdk-lib": "^2.24.1",
12
15
  "constructs": "^10.0.5"
13
16
  },
14
17
  "dependencyClosure": {
@@ -36,13 +39,77 @@
36
39
  "python": {
37
40
  "classifiers": [
38
41
  "Framework :: AWS CDK",
39
- "Framework :: AWS CDK :: 1"
42
+ "Framework :: AWS CDK :: 2"
40
43
  ],
41
44
  "distName": "aws-cdk.aws-apigatewayv2-alpha",
42
45
  "module": "aws_cdk.aws_apigatewayv2_alpha"
43
46
  }
44
47
  }
45
48
  },
49
+ "@aws-cdk/aws-apigatewayv2-authorizers-alpha": {
50
+ "targets": {
51
+ "dotnet": {
52
+ "assemblyOriginatorKeyFile": "../../key.snk",
53
+ "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png",
54
+ "namespace": "Amazon.CDK.AWS.Apigatewayv2.Authorizers.Alpha",
55
+ "packageId": "Amazon.CDK.AWS.APIGatewayv2.Authorizers.Alpha",
56
+ "signAssembly": true
57
+ },
58
+ "go": {
59
+ "moduleName": "github.com/aws/aws-cdk-go",
60
+ "packageName": "awscdkapigatewayv2authorizersalpha"
61
+ },
62
+ "java": {
63
+ "maven": {
64
+ "artifactId": "apigatewayv2-authorizers-alpha",
65
+ "groupId": "software.amazon.awscdk"
66
+ },
67
+ "package": "software.amazon.awscdk.services.apigatewayv2.authorizers.alpha"
68
+ },
69
+ "js": {
70
+ "npm": "@aws-cdk/aws-apigatewayv2-authorizers-alpha"
71
+ },
72
+ "python": {
73
+ "classifiers": [
74
+ "Framework :: AWS CDK",
75
+ "Framework :: AWS CDK :: 2"
76
+ ],
77
+ "distName": "aws-cdk.aws-apigatewayv2-authorizers-alpha",
78
+ "module": "aws_cdk.aws_apigatewayv2_authorizers_alpha"
79
+ }
80
+ }
81
+ },
82
+ "@aws-cdk/aws-apigatewayv2-integrations-alpha": {
83
+ "targets": {
84
+ "dotnet": {
85
+ "iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png",
86
+ "namespace": "Amazon.CDK.AWS.Apigatewayv2.Integrations.Alpha",
87
+ "packageId": "Amazon.CDK.AWS.APIGatewayv2.Integrations.Alpha"
88
+ },
89
+ "go": {
90
+ "moduleName": "github.com/aws/aws-cdk-go",
91
+ "packageName": "awscdkapigatewayv2integrationsalpha"
92
+ },
93
+ "java": {
94
+ "maven": {
95
+ "artifactId": "apigatewayv2-integrations-alpha",
96
+ "groupId": "software.amazon.awscdk"
97
+ },
98
+ "package": "software.amazon.awscdk.services.apigatewayv2.integrations.alpha"
99
+ },
100
+ "js": {
101
+ "npm": "@aws-cdk/aws-apigatewayv2-integrations-alpha"
102
+ },
103
+ "python": {
104
+ "classifiers": [
105
+ "Framework :: AWS CDK",
106
+ "Framework :: AWS CDK :: 2"
107
+ ],
108
+ "distName": "aws-cdk.aws-apigatewayv2-integrations-alpha",
109
+ "module": "aws_cdk.aws_apigatewayv2_integrations_alpha"
110
+ }
111
+ }
112
+ },
46
113
  "aws-cdk-lib": {
47
114
  "submodules": {
48
115
  "aws-cdk-lib.alexa_ask": {
@@ -409,6 +476,19 @@
409
476
  }
410
477
  }
411
478
  },
479
+ "aws-cdk-lib.aws_billingconductor": {
480
+ "targets": {
481
+ "dotnet": {
482
+ "namespace": "Amazon.CDK.AWS.BillingConductor"
483
+ },
484
+ "java": {
485
+ "package": "software.amazon.awscdk.services.billingconductor"
486
+ },
487
+ "python": {
488
+ "module": "aws_cdk.aws_billingconductor"
489
+ }
490
+ }
491
+ },
412
492
  "aws-cdk-lib.aws_budgets": {
413
493
  "targets": {
414
494
  "dotnet": {
@@ -1216,6 +1296,19 @@
1216
1296
  }
1217
1297
  }
1218
1298
  },
1299
+ "aws-cdk-lib.aws_forecast": {
1300
+ "targets": {
1301
+ "dotnet": {
1302
+ "namespace": "Amazon.CDK.AWS.Forecast"
1303
+ },
1304
+ "java": {
1305
+ "package": "software.amazon.awscdk.services.forecast"
1306
+ },
1307
+ "python": {
1308
+ "module": "aws_cdk.aws_forecast"
1309
+ }
1310
+ }
1311
+ },
1219
1312
  "aws-cdk-lib.aws_frauddetector": {
1220
1313
  "targets": {
1221
1314
  "dotnet": {
@@ -1398,6 +1491,19 @@
1398
1491
  }
1399
1492
  }
1400
1493
  },
1494
+ "aws-cdk-lib.aws_inspectorv2": {
1495
+ "targets": {
1496
+ "dotnet": {
1497
+ "namespace": "Amazon.CDK.AWS.InspectorV2"
1498
+ },
1499
+ "java": {
1500
+ "package": "software.amazon.awscdk.services.inspectorv2"
1501
+ },
1502
+ "python": {
1503
+ "module": "aws_cdk.aws_inspectorv2"
1504
+ }
1505
+ }
1506
+ },
1401
1507
  "aws-cdk-lib.aws_iot": {
1402
1508
  "targets": {
1403
1509
  "dotnet": {
@@ -1502,6 +1608,19 @@
1502
1608
  }
1503
1609
  }
1504
1610
  },
1611
+ "aws-cdk-lib.aws_iottwinmaker": {
1612
+ "targets": {
1613
+ "dotnet": {
1614
+ "namespace": "Amazon.CDK.AWS.IoTTwinMaker"
1615
+ },
1616
+ "java": {
1617
+ "package": "software.amazon.awscdk.services.iottwinmaker"
1618
+ },
1619
+ "python": {
1620
+ "module": "aws_cdk.aws_iottwinmaker"
1621
+ }
1622
+ }
1623
+ },
1505
1624
  "aws-cdk-lib.aws_iotwireless": {
1506
1625
  "targets": {
1507
1626
  "dotnet": {
@@ -1528,6 +1647,19 @@
1528
1647
  }
1529
1648
  }
1530
1649
  },
1650
+ "aws-cdk-lib.aws_kafkaconnect": {
1651
+ "targets": {
1652
+ "dotnet": {
1653
+ "namespace": "Amazon.CDK.AWS.KafkaConnect"
1654
+ },
1655
+ "java": {
1656
+ "package": "software.amazon.awscdk.services.kafkaconnect"
1657
+ },
1658
+ "python": {
1659
+ "module": "aws_cdk.aws_kafkaconnect"
1660
+ }
1661
+ }
1662
+ },
1531
1663
  "aws-cdk-lib.aws_kendra": {
1532
1664
  "targets": {
1533
1665
  "dotnet": {
@@ -1567,6 +1699,19 @@
1567
1699
  }
1568
1700
  }
1569
1701
  },
1702
+ "aws-cdk-lib.aws_kinesisanalyticsv2": {
1703
+ "targets": {
1704
+ "dotnet": {
1705
+ "namespace": "Amazon.CDK.AWS.KinesisAnalyticsV2"
1706
+ },
1707
+ "java": {
1708
+ "package": "software.amazon.awscdk.services.kinesisanalyticsv2"
1709
+ },
1710
+ "python": {
1711
+ "module": "aws_cdk.aws_kinesisanalyticsv2"
1712
+ }
1713
+ }
1714
+ },
1570
1715
  "aws-cdk-lib.aws_kinesisfirehose": {
1571
1716
  "targets": {
1572
1717
  "dotnet": {
@@ -1580,6 +1725,19 @@
1580
1725
  }
1581
1726
  }
1582
1727
  },
1728
+ "aws-cdk-lib.aws_kinesisvideo": {
1729
+ "targets": {
1730
+ "dotnet": {
1731
+ "namespace": "Amazon.CDK.AWS.KinesisVideo"
1732
+ },
1733
+ "java": {
1734
+ "package": "software.amazon.awscdk.services.kinesisvideo"
1735
+ },
1736
+ "python": {
1737
+ "module": "aws_cdk.aws_kinesisvideo"
1738
+ }
1739
+ }
1740
+ },
1583
1741
  "aws-cdk-lib.aws_kms": {
1584
1742
  "targets": {
1585
1743
  "dotnet": {
@@ -1866,6 +2024,19 @@
1866
2024
  }
1867
2025
  }
1868
2026
  },
2027
+ "aws-cdk-lib.aws_mediatailor": {
2028
+ "targets": {
2029
+ "dotnet": {
2030
+ "namespace": "Amazon.CDK.AWS.MediaTailor"
2031
+ },
2032
+ "java": {
2033
+ "package": "software.amazon.awscdk.services.mediatailor"
2034
+ },
2035
+ "python": {
2036
+ "module": "aws_cdk.aws_mediatailor"
2037
+ }
2038
+ }
2039
+ },
1869
2040
  "aws-cdk-lib.aws_memorydb": {
1870
2041
  "targets": {
1871
2042
  "dotnet": {
@@ -2009,6 +2180,19 @@
2009
2180
  }
2010
2181
  }
2011
2182
  },
2183
+ "aws-cdk-lib.aws_personalize": {
2184
+ "targets": {
2185
+ "dotnet": {
2186
+ "namespace": "Amazon.CDK.AWS.Personalize"
2187
+ },
2188
+ "java": {
2189
+ "package": "software.amazon.awscdk.services.personalize"
2190
+ },
2191
+ "python": {
2192
+ "module": "aws_cdk.aws_personalize"
2193
+ }
2194
+ }
2195
+ },
2012
2196
  "aws-cdk-lib.aws_pinpoint": {
2013
2197
  "targets": {
2014
2198
  "dotnet": {
@@ -2827,6 +3011,19 @@
2827
3011
  "module": "aws_cdk.region_info"
2828
3012
  }
2829
3013
  }
3014
+ },
3015
+ "aws-cdk-lib.triggers": {
3016
+ "targets": {
3017
+ "dotnet": {
3018
+ "namespace": "Amazon.CDK.Triggers"
3019
+ },
3020
+ "java": {
3021
+ "package": "software.amazon.awscdk.triggers"
3022
+ },
3023
+ "python": {
3024
+ "module": "aws_cdk.triggers"
3025
+ }
3026
+ }
2830
3027
  }
2831
3028
  },
2832
3029
  "targets": {
@@ -2886,7 +3083,7 @@
2886
3083
  "stability": "experimental"
2887
3084
  },
2888
3085
  "homepage": "https://github.com/pwrdrvr/microapps-core",
2889
- "jsiiVersion": "1.52.1 (build 5ccc8f6)",
3086
+ "jsiiVersion": "1.59.0 (build eb02c92)",
2890
3087
  "keywords": [
2891
3088
  "awscdk",
2892
3089
  "cdk",
@@ -2903,7 +3100,7 @@
2903
3100
  },
2904
3101
  "name": "@pwrdrvr/microapps-cdk",
2905
3102
  "readme": {
2906
- "markdown": "![Build/Deploy CI](https://github.com/pwrdrvr/microapps-core/actions/workflows/ci.yml/badge.svg) ![Main Build](https://github.com/pwrdrvr/microapps-core/actions/workflows/main-build.yml/badge.svg) ![Release](https://github.com/pwrdrvr/microapps-core/actions/workflows/release.yml/badge.svg)\n\n# Overview\n\nThe MicroApps project enables rapidly deploying many web apps to AWS on a single shared host name, fronted by a CloudFront Distribution, serving static assets from an S3 Bucket, and routing application requests via API Gateway. MicroApps is delivered as a CDK Construct for deployment, although alternative deployment methods can be used if desired and implemented.\n\nMicroApps allows many versions of an application to be deployed either as ephemeral deploys (e.g. for pull request builds) or as semi-permanent deploys. The `microapps-router` Lambda function handled routing requests to apps to the current version targeted for a particular application start request using rules as complex as one is interested in implementing (e.g. A/B testing integration, canary releases, per-user rules for logged in users, per-group, per-deparment, and default rules).\n\nUsers start applications via a URL such as `[/{prefix}]/{appname}/`, which hits the `microapps-router` that looks up the version of the application to be run, then renders a transparent `iframe` with a link to that version. The URL seen by the user in the browser (and available for bookmarking) has no version in it, so subsequent launches (e.g. the next day or just in another tab) will lookup the version again. All relative URL API requests (e.g. `some/api/path`) will go to the corresponding API version that matches the version of the loaded static files, eliminating issues of incompatibility between static files and API deployments.\n\nFor development / testing purposes only, each version of an applicaton can be accessed directly via a URL of the pattern `[/{prefix}]/{appname}/{semver}/`. These \"versioned\" URLs are not intended to be advertised to end users as they would cause a user to be stuck on a particular version of the app if the URL was bookmarked. Note that the system does not limit access to particular versions of an application, as of 2022-01-26, but that can be added as a feature.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Overview](#overview)\n- [Video Preview of the Deploying CDK Construct](#video-preview-of-the-deploying-cdk-construct)\n- [Installation / CDK Constructs](#installation--cdk-constructs)\n- [Tutorial - Bootstrapping a Deploy](#tutorial---bootstrapping-a-deploy)\n- [Why MicroApps](#why-microapps)\n- [Limitations / Future Development](#limitations--future-development)\n- [Related Projects / Components](#related-projects--components)\n- [Architecure Diagram](#architecure-diagram)\n- [Project Layout](#project-layout)\n- [Creating a MicroApp Using Zip Lambda Functions](#creating-a-microapp-using-zip-lambda-functions)\n- [Creating a MicroApp Using Docker Lambda Functions](#creating-a-microapp-using-docker-lambda-functions)\n - [Next.js Apps](#nextjs-apps)\n - [Modify package.json](#modify-packagejson)\n - [Install Dependencies](#install-dependencies)\n - [Dockerfile](#dockerfile)\n - [next.config.js](#nextconfigjs)\n - [deploy.json](#deployjson)\n - [serverless.yaml](#serverlessyaml)\n\n# Video Preview of the Deploying CDK Construct\n\n![Video Preview of Deploying](https://raw.githubusercontent.com/pwrdrvr/microapps-core/main/assets/videos/microapps-core-demo-deploy.gif)\n\n# Installation / CDK Constructs\n\n- `npm i --save-dev @pwrdrvr/microapps-cdk`\n- Add `MicroApps` construct to your stack\n- The `MicroApps` construct does a \"turn-key\" deployment complete with the Release app\n- [Construct Hub](https://constructs.dev/packages/@pwrdrvr/microapps-cdk/)\n - CDK API docs\n - Python, DotNet, Java, JS/TS installation instructions\n\n# Tutorial - Bootstrapping a Deploy\n\n- `git clone https://github.com/pwrdrvr/microapps-core.git`\n - Note: the repo is only being for the example CDK Stack, it is not necessary to clone the repo when used in a custom CDK Stack\n- `cd microapps-core`\n- `npm i -g aws-cdk`\n - Install AWS CDK v2 CLI\n- `asp [my-sso-profile-name]`\n - Using the `aws` plugin from `oh-my-zsh` for AWS SSO\n - Of course, there are other methods of setting env vars\n- `aws sso login`\n - Establish an AWS SSO session\n- `cdk-sso-sync`\n - Using `npm i -g cdk-sso-sync`\n - Sets AWS SSO credentials in a way that CDK can use them\n - Not necessary if not using AWS SSO\n- `export AWS_REGION=us-east-2`\n - Region needs to be set for the Lambda invoke - This can be done other ways in `~/.aws/config` as well\n- `./deploy.sh`\n - Deploys the CDK Stack\n - Essentially runs two commands along with extraction of outputs:\n - `npx cdk deploy --context @pwrdrvr/microapps:stackName=microapps-demo-deploy --context @pwrdrvr/microapps:deployReleaseApp=true microapps-basic`\n - `npx microapps-publish publish -a release -n ${RELEASE_APP_PACKAGE_VERSION} -d ${DEPLOYER_LAMBDA_NAME} -l ${RELEASE_APP_LAMBDA_NAME} -s node_modules/@pwrdrvr/microapps-app-release-cdk/lib/.static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --noCache`\n - URL will be printed as last output\n\n# Why MicroApps\n\nMicroApps are like micro services, but for Web UIs. A MicroApp allows a single functional site to be developed by many independent teams within an organization. Teams must coordinate deployments and agree upon one implementation technology and framework when building a monolithic, or even a monorepo, web application.\n\nTeams using MicroApps can deploy independently of each other with coordination being required only at points of intentional integration (e.g. adding a feature to pass context from one MicroApp to another or coordination of a major feature release to users) and sharing UI styles, if desired (it is possible to build styles that look the same across many different UI frameworks).\n\nMicroApps also allow each team to use a UI framework and backend language that is most appropriate for their solving their business problem. Not every app has to use React or Next.js or even Node on the backend, but instead they can use whatever framework they want and Java, Go, C#, Python, etc. for UI API calls.\n\nFor internal sites, or logged-in-customer sites, different tools or products can be hosted in entirely independent MicroApps. A menuing system / toolbar application can be created as a MicroApp and that menu app can open the apps in the system within a transparent iframe. For externally facing sites, such as for an e-commerce site, it is possible to have a MicroApp serving `/product/...`, another serving `/search/...`, another serving `/`, etc.\n\n# Limitations / Future Development\n\n- `iframes`\n - Yeah, yeah: `iframes` are not framesets and most of the hate about iframes is probably better directed at framesets\n - The iframe serves a purpose but it stinks that it is there, primarily because it will cause issues with search bot indexing (SEO)\n - There are other options available to implement that have their own drabacks:\n - Using the `microapps-router` to proxy the \"app start\" request to a particular version of an app that then renders all of it's API resource requests to versioned URLs\n - Works only with frameworks that support hashing filenams for each deploy to unique names\n - This page would need to be marked as non-cachable\n - This may work well with Next.js which wants to know the explicit path that it will be running at (it writes that path into all resource and API requests)\n - Possible issue: the app would need to work ok being displayed at `[/{prefix}]/{appname}` when it may think that it's being displayed at `[/{prefix}]/{appname}/{semver}`\n - Disadvantage: requires some level of UI framework features (e.g. writing the absolute resource paths) to work correctly - may not work as easily for all UI frameworks\n - HTML5 added features to allow setting the relative path of all subsequent requests to be different than that displayed in the address bar\n - Gotta see if this works in modern browsers\n - Option to ditch the multiple-versions feature\n - Works only with frameworks that support hashing filenams for each deploy to unique names\n - Allows usage of the deploy and routing tooling without advantages and disadvantages of multiple-versions support\n- AWS Only\n - For the time being this has only been implemented for AWS technologies and APIs\n - It is possible that Azure and GCP have sufficient support to enable porting the framework\n - CDK would have to be replaced as well (unless it's made available for Azure and GCP in the near future)\n- `microapps-publish` only supports Lambda function apps\n - There is no technical reason for the apps to only run as Lambda functions\n - Web apps could just as easily run on EC2, Kubernetes, EKS, ECS, etc\n - Anything that API Gateway can route to can work for serving a MicroApp\n - The publish tool needs to provide additional options for setting up the API Gateway route to the app\n- Authentication\n - Authentication requires rolling your own API Gateway and CloudFront deployment at the moment\n - The \"turn key\" CDK Construct should provide options to show an example of how authentication can be integrated\n- Release Rules\n - Currently only a Default rule is supported\n - Need to evaluate if a generic implementation can be made, possibly allowing plugins or webhooks to support arbitrary rules\n - If not possible to make it perfectly generic, consider providing a more complete reference implementation of examples\n\n# Related Projects / Components\n\n- Release App\n - The Release app is an initial, rudimentary, release control console for setting the default version of an application\n - Built with Next.js\n - [pwrdrvr/microapps-app-release](https://github.com/pwrdrvr/microapps-app-release)\n- Next.js Demo App\n - The Next.js Tutorial application deployed as a MicroApp\n - [pwrdrvr/serverless-nextjs-demo](https://github.com/pwrdrvr/serverless-nextjs-demo)\n- Serverless Next.js Router\n - [pwrdrvr/serverless-nextjs-router](https://github.com/pwrdrvr/serverless-nextjs-router)\n - Complementary to [@sls-next/serverless-component](https://github.com/serverless-nextjs/serverless-next.js)\n - Allows Next.js apps to run as Lambda @ Origin for speed and cost improvements vs Lambda@Edge\n - Essentially the router translates CloudFront Lambda events to API Gateway Lambda events and vice versa for responses\n - The `serverless-nextjs` project allows Next.js apps to run as Lambda functions without Express, but there was a design change to make the Lambda functions run at Edge (note: need to recheck if this changed after early 2021)\n - Lambda@Edge is _at least_ 3x more expensive than Lambda at the origin:\n - In US East 1, the price per GB-Second is $0.00005001 for Lambda@Edge vs $0.0000166667 for Lambda at the origin\n - Additionally, any DB or services calls from Lambda@Edge back to the origin will pay that 3x higher per GB-Second cost for any time spent waiting to send the request and get a response. Example:\n - Lambda@Edge\n - 0.250s Round Trip Time (RTT) for EU-zone edge request to hit US-East 1 Origin\n - 0.200s DB lookup time\n - 0.050s CPU usage to process the DB response\n - 0.500s total billed time @ $0.00005001 @ 128 MB\n - $0.000003125625 total charge\n - Lambda at Origin\n - RTT does not apply (it's effectively 1-2 ms to hit a DB in the same region)\n - 0.200s DB lookup time\n - 0.050s CPU usage to process the DB response\n - 0.250s total billed time @ $0.0000166667 @ 128 MB\n - Half the billed time of running on Lambda@Edge\n - 1/6th the cost of running on Lambda@Edge:\n - $0.000000520834375 total charge (assuming no CPU time to process the response)\n - $0.000003125625 / $0.000000520834375 = 6x more expensive in Lambda@Edge\n\n# Architecure Diagram\n\n![Architecure Diagram](https://raw.githubusercontent.com/pwrdrvr/microapps-core/main/assets/images/architecture-diagram.png)\n\n# Project Layout\n\n- [packages/cdk](https://github.com/pwrdrvr/microapps-core/tree/main/packages/cdk)\n - Example CDK Stack\n - Deploys MicroApps CDK stack for the GitHub Workflows\n - Can be used as an example of how to use the MicroApps CDK Construct\n- [packages/demo-app](https://github.com/pwrdrvr/microapps-core/tree/main/packages/demo-app)\n - Example app with static resources and a Lambda function\n - Does not use any Web UI framework at all\n- [packages/microapps-cdk](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-cdk)\n - MicroApps\n - \"Turn key\" CDK Construct that creates all assets needed for a working MicroApps deployment\n - MicroAppsAPIGwy\n - Create APIGateway HTTP API\n - Creates domain names to point to the edge (Cloudfront) and origin (API Gateway)\n - MicroAppsCF\n - Creates Cloudfront distribution\n - MicroAppsS3\n - Creates S3 buckets\n - MicroAppsSvcs\n - Create DynamoDB table\n - Create Deployer Lambda function\n - Create Router Lambda function\n- [packages/microapps-datalib](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-datalib)\n - Installed from `npm`:\n - `npm i -g @pwrdrvr/microapps-datalib`\n - APIs for access to the DynamoDB Table used by `microapps-publish`, `microapps-deployer`, and `@pwrdrvr/microapps-app-release-cdk`\n- [packages/microapps-deployer](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-deployer)\n - Lambda service invoked by `microapps-publish` to record new app/version in the DynamoDB table, create API Gateway integrations, copy S3 assets from staging to prod bucket, etc.\n - Returns a temporary S3 token with restricted access to the staging S3 bucket for upload of the static files for one app/semver\n- [packages/microapps-publish](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-publish)\n - Installed from `npm`:\n - `npm i -g @pwrdrvr/microapps-publish`\n - Node executable that updates versions in config files, deploys static assets to the S3 staging bucket, optionally compiles and deploys a new Lambda function version, and invokes `microapps-deployer`\n - AWS IAM permissions required:\n - `lambda:InvokeFunction`\n- [packages/microapps-router](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-router)\n - Lambda function that determines which version of an app to point a user to on a particular invocation\n\n# Creating a MicroApp Using Zip Lambda Functions\n\n[TBC]\n\n# Creating a MicroApp Using Docker Lambda Functions\n\nNote: semi-deprecated as of 2022-01-27. Zip Lambda functions are better supported.\n\n## Next.js Apps\n\nCreate a Next.js app then follow the steps in this section to set it up for publishing to AWS Lambda @ Origin as a MicroApp. To publish new versions of the app use `npx microapps-publish --new-version x.y.z` when logged in to the target AWS account.\n\n### Modify package.json\n\nReplace the version with `0.0.0` so it can be modified by the `microapps-publish` tool.\n\n### Install Dependencies\n\n```\nnpm i --save-dev @sls-next/serverless-component@1.19.0 @pwrdrvr/serverless-nextjs-router @pwrdrvr/microapps-publish\n```\n\n### Dockerfile\n\nAdd this file to the root of the app.\n\n```Dockerfile\nFROM node:15-slim as base\n\nWORKDIR /app\n\n# Download the sharp libs once to save time\n# Do this before copying anything else in\nRUN mkdir -p image-lambda-npms && \\\n cd image-lambda-npms && npm i sharp && \\\n rm -rf node_modules/sharp/vendor/*/include/\n\n# Copy in the build output from `npx serverless`\nCOPY .serverless_nextjs .\nCOPY config.json .\n\n# Move the sharp libs into place\nRUN rm -rf image-lambda/node_modules/ && \\\n mv image-lambda-npms/node_modules image-labmda/ && \\\n rm -rf image-lambda-npms\n\nFROM public.ecr.aws/lambda/nodejs:14 AS final\n\n# Copy in the munged code\nCOPY --from=base /app .\n\nCMD [ \"./index.handler\" ]\n```\n\n### next.config.js\n\nAdd this file to the root of the app.\n\nReplace `appname` with your URL path-compatible application name.\n\n```js\nconst appRoot = '/appname/0.0.0';\n\n// eslint-disable-next-line no-undef\nmodule.exports = {\n target: 'serverless',\n webpack: (config, _options) => {\n return config;\n },\n basePath: appRoot,\n publicRuntimeConfig: {\n // Will be available on both server and client\n staticFolder: appRoot,\n },\n};\n```\n\n### deploy.json\n\nAdd this file to the root of the app.\n\nReplace `appname` with your URL path-compatible application name.\n\n```json\n{\n \"AppName\": \"appname\",\n \"SemVer\": \"0.0.0\",\n \"DefaultFile\": \"\",\n \"StaticAssetsPath\": \"./.serverless_nextjs/assets/appname/0.0.0/\",\n \"LambdaARN\": \"arn:aws:lambda:us-east-1:123456789012:function:appname:v0_0_0\",\n \"AWSAccountID\": \"123456789012\",\n \"AWSRegion\": \"us-east-2\",\n \"ServerlessNextRouterPath\": \"./node_modules/@pwrdrvr/serverless-nextjs-router/dist/index.js\"\n}\n```\n\n### serverless.yaml\n\nAdd this file to the root of the app.\n\n```yaml\nnextApp:\n component: './node_modules/@sls-next/serverless-component'\n inputs:\n deploy: false\n uploadStaticAssetsFromBuild: false\n```\n"
3103
+ "markdown": "![Build/Deploy CI](https://github.com/pwrdrvr/microapps-core/actions/workflows/ci.yml/badge.svg) ![Main Build](https://github.com/pwrdrvr/microapps-core/actions/workflows/main-build.yml/badge.svg) ![Release](https://github.com/pwrdrvr/microapps-core/actions/workflows/release.yml/badge.svg)\n\n# Overview\n\nThe MicroApps project enables rapidly deploying many web apps to AWS on a single shared host name, fronted by a CloudFront Distribution, serving static assets from an S3 Bucket, and routing application requests via API Gateway. MicroApps is delivered as a CDK Construct for deployment, although alternative deployment methods can be used if desired and implemented.\n\nMicroApps allows many versions of an application to be deployed either as ephemeral deploys (e.g. for pull request builds) or as semi-permanent deploys. The `microapps-router` Lambda function handled routing requests to apps to the current version targeted for a particular application start request using rules as complex as one is interested in implementing (e.g. A/B testing integration, canary releases, per-user rules for logged in users, per-group, per-deparment, and default rules).\n\nUsers start applications via a URL such as `[/{prefix}]/{appname}/`, which hits the `microapps-router` that looks up the version of the application to be run, then renders a transparent `iframe` with a link to that version. The URL seen by the user in the browser (and available for bookmarking) has no version in it, so subsequent launches (e.g. the next day or just in another tab) will lookup the version again. All relative URL API requests (e.g. `some/api/path`) will go to the corresponding API version that matches the version of the loaded static files, eliminating issues of incompatibility between static files and API deployments.\n\nFor development / testing purposes only, each version of an applicaton can be accessed directly via a URL of the pattern `[/{prefix}]/{appname}/{semver}/`. These \"versioned\" URLs are not intended to be advertised to end users as they would cause a user to be stuck on a particular version of the app if the URL was bookmarked. Note that the system does not limit access to particular versions of an application, as of 2022-01-26, but that can be added as a feature.\n\n# Table of Contents <!-- omit in toc -->\n\n- [Overview](#overview)\n- [Video Preview of the Deploying CDK Construct](#video-preview-of-the-deploying-cdk-construct)\n- [Installation / CDK Constructs](#installation--cdk-constructs)\n- [Tutorial - Bootstrapping a Deploy](#tutorial---bootstrapping-a-deploy)\n- [Why MicroApps](#why-microapps)\n- [Limitations / Future Development](#limitations--future-development)\n- [Related Projects / Components](#related-projects--components)\n- [Architecure Diagram](#architecure-diagram)\n- [Project Layout](#project-layout)\n- [Creating a MicroApp Using Zip Lambda Functions](#creating-a-microapp-using-zip-lambda-functions)\n- [Creating a MicroApp Using Docker Lambda Functions](#creating-a-microapp-using-docker-lambda-functions)\n - [Next.js Apps](#nextjs-apps)\n - [Modify package.json](#modify-packagejson)\n - [Install Dependencies](#install-dependencies)\n - [Dockerfile](#dockerfile)\n - [next.config.js](#nextconfigjs)\n - [deploy.json](#deployjson)\n - [serverless.yaml](#serverlessyaml)\n- [Troubleshooting](#troubleshooting)\n - [CloudFront Requests to API Gateway are Rejected with 403 Forbidden](#cloudfront-requests-to-api-gateway-are-rejected-with-403-forbidden)\n - [SignatureV4 Headers](#signaturev4-headers)\n\n# Video Preview of the Deploying CDK Construct\n\n![Video Preview of Deploying](https://raw.githubusercontent.com/pwrdrvr/microapps-core/main/assets/videos/microapps-core-demo-deploy.gif)\n\n# Installation / CDK Constructs\n\n- `npm i --save-dev @pwrdrvr/microapps-cdk`\n- Add `MicroApps` construct to your stack\n- The `MicroApps` construct does a \"turn-key\" deployment complete with the Release app\n- [Construct Hub](https://constructs.dev/packages/@pwrdrvr/microapps-cdk/)\n - CDK API docs\n - Python, DotNet, Java, JS/TS installation instructions\n\n# Tutorial - Bootstrapping a Deploy\n\n- `git clone https://github.com/pwrdrvr/microapps-core.git`\n - Note: the repo is only being for the example CDK Stack, it is not necessary to clone the repo when used in a custom CDK Stack\n- `cd microapps-core`\n- `npm i -g aws-cdk`\n - Install AWS CDK v2 CLI\n- `asp [my-sso-profile-name]`\n - Using the `aws` plugin from `oh-my-zsh` for AWS SSO\n - Of course, there are other methods of setting env vars\n- `aws sso login`\n - Establish an AWS SSO session\n- `cdk-sso-sync`\n - Using `npm i -g cdk-sso-sync`\n - Sets AWS SSO credentials in a way that CDK can use them\n - Not necessary if not using AWS SSO\n- `export AWS_REGION=us-east-2`\n - Region needs to be set for the Lambda invoke - This can be done other ways in `~/.aws/config` as well\n- `./deploy.sh`\n - Deploys the CDK Stack\n - Essentially runs two commands along with extraction of outputs:\n - `npx cdk deploy --context @pwrdrvr/microapps:stackName=microapps-demo-deploy --context @pwrdrvr/microapps:deployReleaseApp=true microapps-basic`\n - `npx microapps-publish publish -a release -n ${RELEASE_APP_PACKAGE_VERSION} -d ${DEPLOYER_LAMBDA_NAME} -l ${RELEASE_APP_LAMBDA_NAME} -s node_modules/@pwrdrvr/microapps-app-release-cdk/lib/.static_files/release/${RELEASE_APP_PACKAGE_VERSION}/ --overwrite --noCache`\n - URL will be printed as last output\n\n# Why MicroApps\n\nMicroApps are like micro services, but for Web UIs. A MicroApp allows a single functional site to be developed by many independent teams within an organization. Teams must coordinate deployments and agree upon one implementation technology and framework when building a monolithic, or even a monorepo, web application.\n\nTeams using MicroApps can deploy independently of each other with coordination being required only at points of intentional integration (e.g. adding a feature to pass context from one MicroApp to another or coordination of a major feature release to users) and sharing UI styles, if desired (it is possible to build styles that look the same across many different UI frameworks).\n\nMicroApps also allow each team to use a UI framework and backend language that is most appropriate for their solving their business problem. Not every app has to use React or Next.js or even Node on the backend, but instead they can use whatever framework they want and Java, Go, C#, Python, etc. for UI API calls.\n\nFor internal sites, or logged-in-customer sites, different tools or products can be hosted in entirely independent MicroApps. A menuing system / toolbar application can be created as a MicroApp and that menu app can open the apps in the system within a transparent iframe. For externally facing sites, such as for an e-commerce site, it is possible to have a MicroApp serving `/product/...`, another serving `/search/...`, another serving `/`, etc.\n\n# Limitations / Future Development\n\n- `iframes`\n - Yeah, yeah: `iframes` are not framesets and most of the hate about iframes is probably better directed at framesets\n - The iframe serves a purpose but it stinks that it is there, primarily because it will cause issues with search bot indexing (SEO)\n - There are other options available to implement that have their own drabacks:\n - Using the `microapps-router` to proxy the \"app start\" request to a particular version of an app that then renders all of it's API resource requests to versioned URLs\n - Works only with frameworks that support hashing filenams for each deploy to unique names\n - This page would need to be marked as non-cachable\n - This may work well with Next.js which wants to know the explicit path that it will be running at (it writes that path into all resource and API requests)\n - Possible issue: the app would need to work ok being displayed at `[/{prefix}]/{appname}` when it may think that it's being displayed at `[/{prefix}]/{appname}/{semver}`\n - Disadvantage: requires some level of UI framework features (e.g. writing the absolute resource paths) to work correctly - may not work as easily for all UI frameworks\n - HTML5 added features to allow setting the relative path of all subsequent requests to be different than that displayed in the address bar\n - Gotta see if this works in modern browsers\n - Option to ditch the multiple-versions feature\n - Works only with frameworks that support hashing filenams for each deploy to unique names\n - Allows usage of the deploy and routing tooling without advantages and disadvantages of multiple-versions support\n- AWS Only\n - For the time being this has only been implemented for AWS technologies and APIs\n - It is possible that Azure and GCP have sufficient support to enable porting the framework\n - CDK would have to be replaced as well (unless it's made available for Azure and GCP in the near future)\n- `microapps-publish` only supports Lambda function apps\n - There is no technical reason for the apps to only run as Lambda functions\n - Web apps could just as easily run on EC2, Kubernetes, EKS, ECS, etc\n - Anything that API Gateway can route to can work for serving a MicroApp\n - The publish tool needs to provide additional options for setting up the API Gateway route to the app\n- Authentication\n - Authentication requires rolling your own API Gateway and CloudFront deployment at the moment\n - The \"turn key\" CDK Construct should provide options to show an example of how authentication can be integrated\n- Release Rules\n - Currently only a Default rule is supported\n - Need to evaluate if a generic implementation can be made, possibly allowing plugins or webhooks to support arbitrary rules\n - If not possible to make it perfectly generic, consider providing a more complete reference implementation of examples\n\n# Related Projects / Components\n\n- Release App\n - The Release app is an initial, rudimentary, release control console for setting the default version of an application\n - Built with Next.js\n - [pwrdrvr/microapps-app-release](https://github.com/pwrdrvr/microapps-app-release)\n- Next.js Demo App\n - The Next.js Tutorial application deployed as a MicroApp\n - [pwrdrvr/serverless-nextjs-demo](https://github.com/pwrdrvr/serverless-nextjs-demo)\n- Serverless Next.js Router\n - [pwrdrvr/serverless-nextjs-router](https://github.com/pwrdrvr/serverless-nextjs-router)\n - Complementary to [@sls-next/serverless-component](https://github.com/serverless-nextjs/serverless-next.js)\n - Allows Next.js apps to run as Lambda @ Origin for speed and cost improvements vs Lambda@Edge\n - Essentially the router translates CloudFront Lambda events to API Gateway Lambda events and vice versa for responses\n - The `serverless-nextjs` project allows Next.js apps to run as Lambda functions without Express, but there was a design change to make the Lambda functions run at Edge (note: need to recheck if this changed after early 2021)\n - Lambda@Edge is _at least_ 3x more expensive than Lambda at the origin:\n - In US East 1, the price per GB-Second is $0.00005001 for Lambda@Edge vs $0.0000166667 for Lambda at the origin\n - Additionally, any DB or services calls from Lambda@Edge back to the origin will pay that 3x higher per GB-Second cost for any time spent waiting to send the request and get a response. Example:\n - Lambda@Edge\n - 0.250s Round Trip Time (RTT) for EU-zone edge request to hit US-East 1 Origin\n - 0.200s DB lookup time\n - 0.050s CPU usage to process the DB response\n - 0.500s total billed time @ $0.00005001 @ 128 MB\n - $0.000003125625 total charge\n - Lambda at Origin\n - RTT does not apply (it's effectively 1-2 ms to hit a DB in the same region)\n - 0.200s DB lookup time\n - 0.050s CPU usage to process the DB response\n - 0.250s total billed time @ $0.0000166667 @ 128 MB\n - Half the billed time of running on Lambda@Edge\n - 1/6th the cost of running on Lambda@Edge:\n - $0.000000520834375 total charge (assuming no CPU time to process the response)\n - $0.000003125625 / $0.000000520834375 = 6x more expensive in Lambda@Edge\n\n# Architecure Diagram\n\n![Architecure Diagram](https://raw.githubusercontent.com/pwrdrvr/microapps-core/main/assets/images/architecture-diagram.png)\n\n# Project Layout\n\n- [packages/cdk](https://github.com/pwrdrvr/microapps-core/tree/main/packages/cdk)\n - Example CDK Stack\n - Deploys MicroApps CDK stack for the GitHub Workflows\n - Can be used as an example of how to use the MicroApps CDK Construct\n- [packages/demo-app](https://github.com/pwrdrvr/microapps-core/tree/main/packages/demo-app)\n - Example app with static resources and a Lambda function\n - Does not use any Web UI framework at all\n- [packages/microapps-cdk](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-cdk)\n - MicroApps\n - \"Turn key\" CDK Construct that creates all assets needed for a working MicroApps deployment\n - MicroAppsAPIGwy\n - Create APIGateway HTTP API\n - Creates domain names to point to the edge (Cloudfront) and origin (API Gateway)\n - MicroAppsCF\n - Creates Cloudfront distribution\n - MicroAppsS3\n - Creates S3 buckets\n - MicroAppsSvcs\n - Create DynamoDB table\n - Create Deployer Lambda function\n - Create Router Lambda function\n- [packages/microapps-datalib](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-datalib)\n - Installed from `npm`:\n - `npm i -g @pwrdrvr/microapps-datalib`\n - APIs for access to the DynamoDB Table used by `microapps-publish`, `microapps-deployer`, and `@pwrdrvr/microapps-app-release-cdk`\n- [packages/microapps-deployer](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-deployer)\n - Lambda service invoked by `microapps-publish` to record new app/version in the DynamoDB table, create API Gateway integrations, copy S3 assets from staging to prod bucket, etc.\n - Returns a temporary S3 token with restricted access to the staging S3 bucket for upload of the static files for one app/semver\n- [packages/microapps-publish](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-publish)\n - Installed from `npm`:\n - `npm i -g @pwrdrvr/microapps-publish`\n - Node executable that updates versions in config files, deploys static assets to the S3 staging bucket, optionally compiles and deploys a new Lambda function version, and invokes `microapps-deployer`\n - AWS IAM permissions required:\n - `lambda:InvokeFunction`\n- [packages/microapps-router](https://github.com/pwrdrvr/microapps-core/tree/main/packages/microapps-router)\n - Lambda function that determines which version of an app to point a user to on a particular invocation\n\n# Creating a MicroApp Using Zip Lambda Functions\n\n[TBC]\n\n# Creating a MicroApp Using Docker Lambda Functions\n\nNote: semi-deprecated as of 2022-01-27. Zip Lambda functions are better supported.\n\n## Next.js Apps\n\nCreate a Next.js app then follow the steps in this section to set it up for publishing to AWS Lambda @ Origin as a MicroApp. To publish new versions of the app use `npx microapps-publish --new-version x.y.z` when logged in to the target AWS account.\n\n### Modify package.json\n\nReplace the version with `0.0.0` so it can be modified by the `microapps-publish` tool.\n\n### Install Dependencies\n\n```\nnpm i --save-dev @sls-next/serverless-component@1.19.0 @pwrdrvr/serverless-nextjs-router @pwrdrvr/microapps-publish\n```\n\n### Dockerfile\n\nAdd this file to the root of the app.\n\n```Dockerfile\nFROM node:15-slim as base\n\nWORKDIR /app\n\n# Download the sharp libs once to save time\n# Do this before copying anything else in\nRUN mkdir -p image-lambda-npms && \\\n cd image-lambda-npms && npm i sharp && \\\n rm -rf node_modules/sharp/vendor/*/include/\n\n# Copy in the build output from `npx serverless`\nCOPY .serverless_nextjs .\nCOPY config.json .\n\n# Move the sharp libs into place\nRUN rm -rf image-lambda/node_modules/ && \\\n mv image-lambda-npms/node_modules image-labmda/ && \\\n rm -rf image-lambda-npms\n\nFROM public.ecr.aws/lambda/nodejs:14 AS final\n\n# Copy in the munged code\nCOPY --from=base /app .\n\nCMD [ \"./index.handler\" ]\n```\n\n### next.config.js\n\nAdd this file to the root of the app.\n\nReplace `appname` with your URL path-compatible application name.\n\n```js\nconst appRoot = '/appname/0.0.0';\n\n// eslint-disable-next-line no-undef\nmodule.exports = {\n target: 'serverless',\n webpack: (config, _options) => {\n return config;\n },\n basePath: appRoot,\n publicRuntimeConfig: {\n // Will be available on both server and client\n staticFolder: appRoot,\n },\n};\n```\n\n### deploy.json\n\nAdd this file to the root of the app.\n\nReplace `appname` with your URL path-compatible application name.\n\n```json\n{\n \"AppName\": \"appname\",\n \"SemVer\": \"0.0.0\",\n \"DefaultFile\": \"\",\n \"StaticAssetsPath\": \"./.serverless_nextjs/assets/appname/0.0.0/\",\n \"LambdaARN\": \"arn:aws:lambda:us-east-1:123456789012:function:appname:v0_0_0\",\n \"AWSAccountID\": \"123456789012\",\n \"AWSRegion\": \"us-east-2\",\n \"ServerlessNextRouterPath\": \"./node_modules/@pwrdrvr/serverless-nextjs-router/dist/index.js\"\n}\n```\n\n### serverless.yaml\n\nAdd this file to the root of the app.\n\n```yaml\nnextApp:\n component: './node_modules/@sls-next/serverless-component'\n inputs:\n deploy: false\n uploadStaticAssetsFromBuild: false\n```\n\n# Troubleshooting\n\n## CloudFront Requests to API Gateway are Rejected with 403 Forbidden\n\nRequests to the API Gateway origin can be rejected with a 403 Forbidden error if the signed request headers are not sent to the origin by CloudFront.\n\nThe error in the API Gateway CloudWatch logs will show up as:\n\n```log\n\"authorizerError\": \"The request for the IAM Authorizer doesn't match the format that API Gateway expects.\"\n```\n\nThis can be simulated by simply running `curl [api-gateway-url]`, with no headers.\n\nTo confirm that API Gateway is allowing signed requests when the IAM Authorizer is configured, establish credentials as a user that is allowed to execute the API Gateay, install `awscurl` with `pip3 install awscurl`, then then use `awscurl --service execute-api --region [api-gateway-region] [api-gateway-url]`.\n\nSignature headers will not be sent from CloudFront to API Gateway unless the `OriginRequestPolicy` is set to specifically include those headers on requests to the origin, or the `headersBehavior` is set to `cfront.OriginRequestHeaderBehavior.all()`.\n\nSimilarly, if `presign` is used, the `OriginRequestPolicy` must be set to `cfront.OriginRequestQueryStringBehavior.all()` or to specifically forward the query string parameters used by the presigned URL.\n\n### SignatureV4 Headers\n- `authorization`\n- `x-amz-date`\n- `x-amz-security-token`\n- `x-amz-content-sha256`"
2907
3104
  },
2908
3105
  "repository": {
2909
3106
  "type": "git",
@@ -2942,7 +3139,7 @@
2942
3139
  "kind": "interface",
2943
3140
  "locationInModule": {
2944
3141
  "filename": "src/MicroAppsCF.ts",
2945
- "line": 143
3142
+ "line": 167
2946
3143
  },
2947
3144
  "name": "AddRoutesOptions",
2948
3145
  "properties": [
@@ -2955,7 +3152,7 @@
2955
3152
  "immutable": true,
2956
3153
  "locationInModule": {
2957
3154
  "filename": "src/MicroAppsCF.ts",
2958
- "line": 147
3155
+ "line": 171
2959
3156
  },
2960
3157
  "name": "apiGwyOrigin",
2961
3158
  "type": {
@@ -2971,7 +3168,7 @@
2971
3168
  "immutable": true,
2972
3169
  "locationInModule": {
2973
3170
  "filename": "src/MicroAppsCF.ts",
2974
- "line": 162
3171
+ "line": 186
2975
3172
  },
2976
3173
  "name": "apigwyOriginRequestPolicy",
2977
3174
  "type": {
@@ -2987,7 +3184,7 @@
2987
3184
  "immutable": true,
2988
3185
  "locationInModule": {
2989
3186
  "filename": "src/MicroAppsCF.ts",
2990
- "line": 152
3187
+ "line": 176
2991
3188
  },
2992
3189
  "name": "bucketAppsOrigin",
2993
3190
  "type": {
@@ -3003,13 +3200,35 @@
3003
3200
  "immutable": true,
3004
3201
  "locationInModule": {
3005
3202
  "filename": "src/MicroAppsCF.ts",
3006
- "line": 157
3203
+ "line": 181
3007
3204
  },
3008
3205
  "name": "distro",
3009
3206
  "type": {
3010
3207
  "fqn": "aws-cdk-lib.aws_cloudfront.Distribution"
3011
3208
  }
3012
3209
  },
3210
+ {
3211
+ "abstract": true,
3212
+ "docs": {
3213
+ "stability": "experimental",
3214
+ "summary": "Edge lambdas to associate with the API Gateway routes."
3215
+ },
3216
+ "immutable": true,
3217
+ "locationInModule": {
3218
+ "filename": "src/MicroAppsCF.ts",
3219
+ "line": 226
3220
+ },
3221
+ "name": "apigwyEdgeFunctions",
3222
+ "optional": true,
3223
+ "type": {
3224
+ "collection": {
3225
+ "elementtype": {
3226
+ "fqn": "aws-cdk-lib.aws_cloudfront.EdgeLambda"
3227
+ },
3228
+ "kind": "array"
3229
+ }
3230
+ }
3231
+ },
3013
3232
  {
3014
3233
  "abstract": true,
3015
3234
  "docs": {
@@ -3021,7 +3240,7 @@
3021
3240
  "immutable": true,
3022
3241
  "locationInModule": {
3023
3242
  "filename": "src/MicroAppsCF.ts",
3024
- "line": 182
3243
+ "line": 206
3025
3244
  },
3026
3245
  "name": "createAPIPathRoute",
3027
3246
  "optional": true,
@@ -3029,6 +3248,25 @@
3029
3248
  "primitive": "boolean"
3030
3249
  }
3031
3250
  },
3251
+ {
3252
+ "abstract": true,
3253
+ "docs": {
3254
+ "default": "true",
3255
+ "remarks": "When false API routes with a period in the path will get routed to S3.\n\nWhen true API routes that contain /_next/data/ in the path will get routed to API Gateway\neven if they have a period in the path.",
3256
+ "stability": "experimental",
3257
+ "summary": "Create an extra Behavior (Route) for /_next/data/ This route is used by Next.js to load data from the API Gateway on `getServerSideProps` calls. The requests can end in `.json`, which would cause them to be routed to S3 if this route is not created."
3258
+ },
3259
+ "immutable": true,
3260
+ "locationInModule": {
3261
+ "filename": "src/MicroAppsCF.ts",
3262
+ "line": 221
3263
+ },
3264
+ "name": "createNextDataPathRoute",
3265
+ "optional": true,
3266
+ "type": {
3267
+ "primitive": "boolean"
3268
+ }
3269
+ },
3032
3270
  {
3033
3271
  "abstract": true,
3034
3272
  "docs": {
@@ -3039,7 +3277,7 @@
3039
3277
  "immutable": true,
3040
3278
  "locationInModule": {
3041
3279
  "filename": "src/MicroAppsCF.ts",
3042
- "line": 169
3280
+ "line": 193
3043
3281
  },
3044
3282
  "name": "rootPathPrefix",
3045
3283
  "optional": true,
@@ -3061,7 +3299,7 @@
3061
3299
  "kind": "interface",
3062
3300
  "locationInModule": {
3063
3301
  "filename": "src/MicroAppsCF.ts",
3064
- "line": 115
3302
+ "line": 139
3065
3303
  },
3066
3304
  "name": "CreateAPIOriginPolicyOptions",
3067
3305
  "properties": [
@@ -3076,7 +3314,7 @@
3076
3314
  "immutable": true,
3077
3315
  "locationInModule": {
3078
3316
  "filename": "src/MicroAppsCF.ts",
3079
- "line": 122
3317
+ "line": 146
3080
3318
  },
3081
3319
  "name": "assetNameRoot",
3082
3320
  "optional": true,
@@ -3095,7 +3333,7 @@
3095
3333
  "immutable": true,
3096
3334
  "locationInModule": {
3097
3335
  "filename": "src/MicroAppsCF.ts",
3098
- "line": 130
3336
+ "line": 154
3099
3337
  },
3100
3338
  "name": "assetNameSuffix",
3101
3339
  "optional": true,
@@ -3112,7 +3350,7 @@
3112
3350
  "immutable": true,
3113
3351
  "locationInModule": {
3114
3352
  "filename": "src/MicroAppsCF.ts",
3115
- "line": 137
3353
+ "line": 161
3116
3354
  },
3117
3355
  "name": "domainNameEdge",
3118
3356
  "optional": true,
@@ -3123,6 +3361,83 @@
3123
3361
  ],
3124
3362
  "symbolId": "src/MicroAppsCF:CreateAPIOriginPolicyOptions"
3125
3363
  },
3364
+ "@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions": {
3365
+ "assembly": "@pwrdrvr/microapps-cdk",
3366
+ "datatype": true,
3367
+ "docs": {
3368
+ "stability": "experimental"
3369
+ },
3370
+ "fqn": "@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions",
3371
+ "kind": "interface",
3372
+ "locationInModule": {
3373
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3374
+ "line": 102
3375
+ },
3376
+ "name": "GenerateEdgeToOriginConfigOptions",
3377
+ "properties": [
3378
+ {
3379
+ "abstract": true,
3380
+ "docs": {
3381
+ "stability": "experimental"
3382
+ },
3383
+ "immutable": true,
3384
+ "locationInModule": {
3385
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3386
+ "line": 105
3387
+ },
3388
+ "name": "addXForwardedHostHeader",
3389
+ "type": {
3390
+ "primitive": "boolean"
3391
+ }
3392
+ },
3393
+ {
3394
+ "abstract": true,
3395
+ "docs": {
3396
+ "stability": "experimental"
3397
+ },
3398
+ "immutable": true,
3399
+ "locationInModule": {
3400
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3401
+ "line": 103
3402
+ },
3403
+ "name": "originRegion",
3404
+ "type": {
3405
+ "primitive": "string"
3406
+ }
3407
+ },
3408
+ {
3409
+ "abstract": true,
3410
+ "docs": {
3411
+ "stability": "experimental"
3412
+ },
3413
+ "immutable": true,
3414
+ "locationInModule": {
3415
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3416
+ "line": 106
3417
+ },
3418
+ "name": "replaceHostHeader",
3419
+ "type": {
3420
+ "primitive": "boolean"
3421
+ }
3422
+ },
3423
+ {
3424
+ "abstract": true,
3425
+ "docs": {
3426
+ "stability": "experimental"
3427
+ },
3428
+ "immutable": true,
3429
+ "locationInModule": {
3430
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3431
+ "line": 104
3432
+ },
3433
+ "name": "signingMode",
3434
+ "type": {
3435
+ "primitive": "string"
3436
+ }
3437
+ }
3438
+ ],
3439
+ "symbolId": "src/MicroAppsEdgeToOrigin:GenerateEdgeToOriginConfigOptions"
3440
+ },
3126
3441
  "@pwrdrvr/microapps-cdk.IMicroApps": {
3127
3442
  "assembly": "@pwrdrvr/microapps-cdk",
3128
3443
  "docs": {
@@ -3133,7 +3448,7 @@
3133
3448
  "kind": "interface",
3134
3449
  "locationInModule": {
3135
3450
  "filename": "src/MicroApps.ts",
3136
- "line": 195
3451
+ "line": 258
3137
3452
  },
3138
3453
  "name": "IMicroApps",
3139
3454
  "properties": [
@@ -3146,7 +3461,7 @@
3146
3461
  "immutable": true,
3147
3462
  "locationInModule": {
3148
3463
  "filename": "src/MicroApps.ts",
3149
- "line": 206
3464
+ "line": 272
3150
3465
  },
3151
3466
  "name": "apigwy",
3152
3467
  "type": {
@@ -3162,7 +3477,7 @@
3162
3477
  "immutable": true,
3163
3478
  "locationInModule": {
3164
3479
  "filename": "src/MicroApps.ts",
3165
- "line": 197
3480
+ "line": 260
3166
3481
  },
3167
3482
  "name": "cf",
3168
3483
  "type": {
@@ -3178,7 +3493,7 @@
3178
3493
  "immutable": true,
3179
3494
  "locationInModule": {
3180
3495
  "filename": "src/MicroApps.ts",
3181
- "line": 200
3496
+ "line": 266
3182
3497
  },
3183
3498
  "name": "s3",
3184
3499
  "type": {
@@ -3194,12 +3509,29 @@
3194
3509
  "immutable": true,
3195
3510
  "locationInModule": {
3196
3511
  "filename": "src/MicroApps.ts",
3197
- "line": 203
3512
+ "line": 269
3198
3513
  },
3199
3514
  "name": "svcs",
3200
3515
  "type": {
3201
3516
  "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsSvcs"
3202
3517
  }
3518
+ },
3519
+ {
3520
+ "abstract": true,
3521
+ "docs": {
3522
+ "stability": "experimental",
3523
+ "summary": "{@inheritdoc IMicroAppsEdgeToOrigin}."
3524
+ },
3525
+ "immutable": true,
3526
+ "locationInModule": {
3527
+ "filename": "src/MicroApps.ts",
3528
+ "line": 263
3529
+ },
3530
+ "name": "edgeToOrigin",
3531
+ "optional": true,
3532
+ "type": {
3533
+ "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin"
3534
+ }
3203
3535
  }
3204
3536
  ],
3205
3537
  "symbolId": "src/MicroApps:IMicroApps"
@@ -3214,7 +3546,7 @@
3214
3546
  "kind": "interface",
3215
3547
  "locationInModule": {
3216
3548
  "filename": "src/MicroAppsAPIGwy.ts",
3217
- "line": 81
3549
+ "line": 89
3218
3550
  },
3219
3551
  "name": "IMicroAppsAPIGwy",
3220
3552
  "properties": [
@@ -3227,7 +3559,7 @@
3227
3559
  "immutable": true,
3228
3560
  "locationInModule": {
3229
3561
  "filename": "src/MicroAppsAPIGwy.ts",
3230
- "line": 90
3562
+ "line": 98
3231
3563
  },
3232
3564
  "name": "httpApi",
3233
3565
  "type": {
@@ -3243,7 +3575,7 @@
3243
3575
  "immutable": true,
3244
3576
  "locationInModule": {
3245
3577
  "filename": "src/MicroAppsAPIGwy.ts",
3246
- "line": 85
3578
+ "line": 93
3247
3579
  },
3248
3580
  "name": "dnAppsOrigin",
3249
3581
  "optional": true,
@@ -3264,19 +3596,20 @@
3264
3596
  "kind": "interface",
3265
3597
  "locationInModule": {
3266
3598
  "filename": "src/MicroAppsCF.ts",
3267
- "line": 17
3599
+ "line": 16
3268
3600
  },
3269
3601
  "name": "IMicroAppsCF",
3270
3602
  "properties": [
3271
3603
  {
3272
3604
  "abstract": true,
3273
3605
  "docs": {
3274
- "stability": "experimental"
3606
+ "stability": "experimental",
3607
+ "summary": "The CloudFront distribution."
3275
3608
  },
3276
3609
  "immutable": true,
3277
3610
  "locationInModule": {
3278
3611
  "filename": "src/MicroAppsCF.ts",
3279
- "line": 18
3612
+ "line": 20
3280
3613
  },
3281
3614
  "name": "cloudFrontDistro",
3282
3615
  "type": {
@@ -3286,25 +3619,89 @@
3286
3619
  ],
3287
3620
  "symbolId": "src/MicroAppsCF:IMicroAppsCF"
3288
3621
  },
3289
- "@pwrdrvr/microapps-cdk.IMicroAppsS3": {
3622
+ "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin": {
3290
3623
  "assembly": "@pwrdrvr/microapps-cdk",
3291
3624
  "docs": {
3292
3625
  "stability": "experimental",
3293
- "summary": "Represents a MicroApps S3."
3626
+ "summary": "Represents a MicroApps Edge to Origin Function."
3294
3627
  },
3295
- "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
3628
+ "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin",
3296
3629
  "kind": "interface",
3297
3630
  "locationInModule": {
3298
- "filename": "src/MicroAppsS3.ts",
3299
- "line": 10
3631
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3632
+ "line": 15
3300
3633
  },
3301
- "name": "IMicroAppsS3",
3634
+ "name": "IMicroAppsEdgeToOrigin",
3302
3635
  "properties": [
3303
3636
  {
3304
3637
  "abstract": true,
3305
3638
  "docs": {
3639
+ "remarks": "The generated `config.yml` is included in the Lambda's code.",
3306
3640
  "stability": "experimental",
3307
- "summary": "S3 bucket for deployed applications."
3641
+ "summary": "The edge to origin function for API Gateway Request Origin Edge Lambda."
3642
+ },
3643
+ "immutable": true,
3644
+ "locationInModule": {
3645
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3646
+ "line": 21
3647
+ },
3648
+ "name": "edgeToOriginFunction",
3649
+ "type": {
3650
+ "union": {
3651
+ "types": [
3652
+ {
3653
+ "fqn": "aws-cdk-lib.aws_cloudfront.experimental.EdgeFunction"
3654
+ },
3655
+ {
3656
+ "fqn": "aws-cdk-lib.aws_lambda.Function"
3657
+ }
3658
+ ]
3659
+ }
3660
+ }
3661
+ },
3662
+ {
3663
+ "abstract": true,
3664
+ "docs": {
3665
+ "stability": "experimental",
3666
+ "summary": "Configuration of the edge to origin lambda functions."
3667
+ },
3668
+ "immutable": true,
3669
+ "locationInModule": {
3670
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
3671
+ "line": 26
3672
+ },
3673
+ "name": "edgeToOriginLambdas",
3674
+ "type": {
3675
+ "collection": {
3676
+ "elementtype": {
3677
+ "fqn": "aws-cdk-lib.aws_cloudfront.EdgeLambda"
3678
+ },
3679
+ "kind": "array"
3680
+ }
3681
+ }
3682
+ }
3683
+ ],
3684
+ "symbolId": "src/MicroAppsEdgeToOrigin:IMicroAppsEdgeToOrigin"
3685
+ },
3686
+ "@pwrdrvr/microapps-cdk.IMicroAppsS3": {
3687
+ "assembly": "@pwrdrvr/microapps-cdk",
3688
+ "docs": {
3689
+ "stability": "experimental",
3690
+ "summary": "Represents a MicroApps S3."
3691
+ },
3692
+ "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
3693
+ "kind": "interface",
3694
+ "locationInModule": {
3695
+ "filename": "src/MicroAppsS3.ts",
3696
+ "line": 10
3697
+ },
3698
+ "name": "IMicroAppsS3",
3699
+ "properties": [
3700
+ {
3701
+ "abstract": true,
3702
+ "docs": {
3703
+ "stability": "experimental",
3704
+ "summary": "S3 bucket for deployed applications."
3308
3705
  },
3309
3706
  "immutable": true,
3310
3707
  "locationInModule": {
@@ -3393,7 +3790,7 @@
3393
3790
  "kind": "interface",
3394
3791
  "locationInModule": {
3395
3792
  "filename": "src/MicroAppsSvcs.ts",
3396
- "line": 193
3793
+ "line": 177
3397
3794
  },
3398
3795
  "name": "IMicroAppsSvcs",
3399
3796
  "properties": [
@@ -3406,7 +3803,7 @@
3406
3803
  "immutable": true,
3407
3804
  "locationInModule": {
3408
3805
  "filename": "src/MicroAppsSvcs.ts",
3409
- "line": 202
3806
+ "line": 186
3410
3807
  },
3411
3808
  "name": "deployerFunc",
3412
3809
  "type": {
@@ -3422,7 +3819,7 @@
3422
3819
  "immutable": true,
3423
3820
  "locationInModule": {
3424
3821
  "filename": "src/MicroAppsSvcs.ts",
3425
- "line": 207
3822
+ "line": 191
3426
3823
  },
3427
3824
  "name": "routerFunc",
3428
3825
  "type": {
@@ -3438,7 +3835,7 @@
3438
3835
  "immutable": true,
3439
3836
  "locationInModule": {
3440
3837
  "filename": "src/MicroAppsSvcs.ts",
3441
- "line": 197
3838
+ "line": 181
3442
3839
  },
3443
3840
  "name": "table",
3444
3841
  "type": {
@@ -3448,11 +3845,47 @@
3448
3845
  ],
3449
3846
  "symbolId": "src/MicroAppsSvcs:IMicroAppsSvcs"
3450
3847
  },
3848
+ "@pwrdrvr/microapps-cdk.IMicroAppsTable": {
3849
+ "assembly": "@pwrdrvr/microapps-cdk",
3850
+ "docs": {
3851
+ "stability": "experimental",
3852
+ "summary": "Represents a MicroAppsTable."
3853
+ },
3854
+ "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsTable",
3855
+ "kind": "interface",
3856
+ "locationInModule": {
3857
+ "filename": "src/MicroAppsTable.ts",
3858
+ "line": 52
3859
+ },
3860
+ "name": "IMicroAppsTable",
3861
+ "properties": [
3862
+ {
3863
+ "abstract": true,
3864
+ "docs": {
3865
+ "stability": "experimental",
3866
+ "summary": "DynamoDB table used by Router, Deployer, and Release console app."
3867
+ },
3868
+ "immutable": true,
3869
+ "locationInModule": {
3870
+ "filename": "src/MicroAppsTable.ts",
3871
+ "line": 56
3872
+ },
3873
+ "name": "table",
3874
+ "type": {
3875
+ "fqn": "aws-cdk-lib.aws_dynamodb.Table"
3876
+ }
3877
+ }
3878
+ ],
3879
+ "symbolId": "src/MicroAppsTable:IMicroAppsTable"
3880
+ },
3451
3881
  "@pwrdrvr/microapps-cdk.MicroApps": {
3452
3882
  "assembly": "@pwrdrvr/microapps-cdk",
3453
3883
  "base": "constructs.Construct",
3454
3884
  "docs": {
3455
- "remarks": "Use this construct to create a working entire stack.\n\nDo not use this construct when adding MicroApps to an existing\nCloudFront, API Gateway, S3 Bucket, etc. or where access\nto all features of the AWS Resources are needed (e.g. to\nadd additional Behaviors to the CloudFront distribution, set authorizors\non API Gateway, etc.).",
3885
+ "custom": {
3886
+ "warning": "This construct is not intended for production use.\nIn a production stack the DynamoDB Table, API Gateway, S3 Buckets,\netc. should be created in a \"durable\" stack where the IDs will not\nchange and where changes to the MicroApps construct will not\ncause failures to deploy or data to be deleted."
3887
+ },
3888
+ "remarks": "Use this construct to create a PoC working entire stack.\n\nDo not use this construct when adding MicroApps to an existing\nCloudFront, API Gateway, S3 Bucket, etc. or where access\nto all features of the AWS Resources are needed (e.g. to\nadd additional Behaviors to the CloudFront distribution, set authorizors\non API Gateway, etc.).",
3456
3889
  "see": "{@link https://github.com/pwrdrvr/microapps-core/blob/main/packages/cdk/lib/MicroApps.ts | example usage in a CDK Stack }",
3457
3890
  "stability": "experimental",
3458
3891
  "summary": "Create a new MicroApps \"turnkey\" construct for simple deployments and for initial evaulation of the MicroApps framework."
@@ -3464,7 +3897,7 @@
3464
3897
  },
3465
3898
  "locationInModule": {
3466
3899
  "filename": "src/MicroApps.ts",
3467
- "line": 244
3900
+ "line": 321
3468
3901
  },
3469
3902
  "parameters": [
3470
3903
  {
@@ -3494,7 +3927,7 @@
3494
3927
  "kind": "class",
3495
3928
  "locationInModule": {
3496
3929
  "filename": "src/MicroApps.ts",
3497
- "line": 223
3930
+ "line": 295
3498
3931
  },
3499
3932
  "name": "MicroApps",
3500
3933
  "properties": [
@@ -3506,7 +3939,7 @@
3506
3939
  "immutable": true,
3507
3940
  "locationInModule": {
3508
3941
  "filename": "src/MicroApps.ts",
3509
- "line": 235
3942
+ "line": 312
3510
3943
  },
3511
3944
  "name": "apigwy",
3512
3945
  "overrides": "@pwrdrvr/microapps-cdk.IMicroApps",
@@ -3522,7 +3955,7 @@
3522
3955
  "immutable": true,
3523
3956
  "locationInModule": {
3524
3957
  "filename": "src/MicroApps.ts",
3525
- "line": 225
3958
+ "line": 297
3526
3959
  },
3527
3960
  "name": "cf",
3528
3961
  "overrides": "@pwrdrvr/microapps-cdk.IMicroApps",
@@ -3538,7 +3971,7 @@
3538
3971
  "immutable": true,
3539
3972
  "locationInModule": {
3540
3973
  "filename": "src/MicroApps.ts",
3541
- "line": 230
3974
+ "line": 307
3542
3975
  },
3543
3976
  "name": "s3",
3544
3977
  "overrides": "@pwrdrvr/microapps-cdk.IMicroApps",
@@ -3554,13 +3987,30 @@
3554
3987
  "immutable": true,
3555
3988
  "locationInModule": {
3556
3989
  "filename": "src/MicroApps.ts",
3557
- "line": 240
3990
+ "line": 317
3558
3991
  },
3559
3992
  "name": "svcs",
3560
3993
  "overrides": "@pwrdrvr/microapps-cdk.IMicroApps",
3561
3994
  "type": {
3562
3995
  "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsSvcs"
3563
3996
  }
3997
+ },
3998
+ {
3999
+ "docs": {
4000
+ "stability": "experimental",
4001
+ "summary": "{@inheritdoc IMicroAppsEdgeToOrigin}."
4002
+ },
4003
+ "immutable": true,
4004
+ "locationInModule": {
4005
+ "filename": "src/MicroApps.ts",
4006
+ "line": 302
4007
+ },
4008
+ "name": "edgeToOrigin",
4009
+ "optional": true,
4010
+ "overrides": "@pwrdrvr/microapps-cdk.IMicroApps",
4011
+ "type": {
4012
+ "fqn": "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin"
4013
+ }
3564
4014
  }
3565
4015
  ],
3566
4016
  "symbolId": "src/MicroApps:MicroApps"
@@ -3570,7 +4020,7 @@
3570
4020
  "base": "constructs.Construct",
3571
4021
  "docs": {
3572
4022
  "stability": "experimental",
3573
- "summary": "Create a new MicroApps API Gateway HTTP API endpoint."
4023
+ "summary": "Create a new MicroApps API Gateway HTTP API endpoint, optionally requiring IAM authorization."
3574
4024
  },
3575
4025
  "fqn": "@pwrdrvr/microapps-cdk.MicroAppsAPIGwy",
3576
4026
  "initializer": {
@@ -3579,7 +4029,7 @@
3579
4029
  },
3580
4030
  "locationInModule": {
3581
4031
  "filename": "src/MicroAppsAPIGwy.ts",
3582
- "line": 107
4032
+ "line": 116
3583
4033
  },
3584
4034
  "parameters": [
3585
4035
  {
@@ -3596,7 +4046,6 @@
3596
4046
  },
3597
4047
  {
3598
4048
  "name": "props",
3599
- "optional": true,
3600
4049
  "type": {
3601
4050
  "fqn": "@pwrdrvr/microapps-cdk.MicroAppsAPIGwyProps"
3602
4051
  }
@@ -3609,7 +4058,7 @@
3609
4058
  "kind": "class",
3610
4059
  "locationInModule": {
3611
4060
  "filename": "src/MicroAppsAPIGwy.ts",
3612
- "line": 96
4061
+ "line": 105
3613
4062
  },
3614
4063
  "name": "MicroAppsAPIGwy",
3615
4064
  "properties": [
@@ -3621,7 +4070,7 @@
3621
4070
  "immutable": true,
3622
4071
  "locationInModule": {
3623
4072
  "filename": "src/MicroAppsAPIGwy.ts",
3624
- "line": 103
4073
+ "line": 112
3625
4074
  },
3626
4075
  "name": "httpApi",
3627
4076
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsAPIGwy",
@@ -3637,7 +4086,7 @@
3637
4086
  "immutable": true,
3638
4087
  "locationInModule": {
3639
4088
  "filename": "src/MicroAppsAPIGwy.ts",
3640
- "line": 98
4089
+ "line": 107
3641
4090
  },
3642
4091
  "name": "dnAppsOrigin",
3643
4092
  "optional": true,
@@ -3660,7 +4109,7 @@
3660
4109
  "kind": "interface",
3661
4110
  "locationInModule": {
3662
4111
  "filename": "src/MicroAppsAPIGwy.ts",
3663
- "line": 14
4112
+ "line": 15
3664
4113
  },
3665
4114
  "name": "MicroAppsAPIGwyProps",
3666
4115
  "properties": [
@@ -3675,7 +4124,7 @@
3675
4124
  "immutable": true,
3676
4125
  "locationInModule": {
3677
4126
  "filename": "src/MicroAppsAPIGwy.ts",
3678
- "line": 46
4127
+ "line": 47
3679
4128
  },
3680
4129
  "name": "assetNameRoot",
3681
4130
  "optional": true,
@@ -3694,7 +4143,7 @@
3694
4143
  "immutable": true,
3695
4144
  "locationInModule": {
3696
4145
  "filename": "src/MicroAppsAPIGwy.ts",
3697
- "line": 54
4146
+ "line": 55
3698
4147
  },
3699
4148
  "name": "assetNameSuffix",
3700
4149
  "optional": true,
@@ -3712,7 +4161,7 @@
3712
4161
  "immutable": true,
3713
4162
  "locationInModule": {
3714
4163
  "filename": "src/MicroAppsAPIGwy.ts",
3715
- "line": 62
4164
+ "line": 63
3716
4165
  },
3717
4166
  "name": "certOrigin",
3718
4167
  "optional": true,
@@ -3731,7 +4180,7 @@
3731
4180
  "immutable": true,
3732
4181
  "locationInModule": {
3733
4182
  "filename": "src/MicroAppsAPIGwy.ts",
3734
- "line": 30
4183
+ "line": 31
3735
4184
  },
3736
4185
  "name": "domainNameEdge",
3737
4186
  "optional": true,
@@ -3750,7 +4199,7 @@
3750
4199
  "immutable": true,
3751
4200
  "locationInModule": {
3752
4201
  "filename": "src/MicroAppsAPIGwy.ts",
3753
- "line": 38
4202
+ "line": 39
3754
4203
  },
3755
4204
  "name": "domainNameOrigin",
3756
4205
  "optional": true,
@@ -3767,7 +4216,7 @@
3767
4216
  "immutable": true,
3768
4217
  "locationInModule": {
3769
4218
  "filename": "src/MicroAppsAPIGwy.ts",
3770
- "line": 67
4219
+ "line": 68
3771
4220
  },
3772
4221
  "name": "r53Zone",
3773
4222
  "optional": true,
@@ -3786,7 +4235,7 @@
3786
4235
  "immutable": true,
3787
4236
  "locationInModule": {
3788
4237
  "filename": "src/MicroAppsAPIGwy.ts",
3789
- "line": 22
4238
+ "line": 23
3790
4239
  },
3791
4240
  "name": "removalPolicy",
3792
4241
  "optional": true,
@@ -3794,6 +4243,24 @@
3794
4243
  "fqn": "aws-cdk-lib.RemovalPolicy"
3795
4244
  }
3796
4245
  },
4246
+ {
4247
+ "abstract": true,
4248
+ "docs": {
4249
+ "default": "true",
4250
+ "stability": "experimental",
4251
+ "summary": "Require IAM auth on API Gateway."
4252
+ },
4253
+ "immutable": true,
4254
+ "locationInModule": {
4255
+ "filename": "src/MicroAppsAPIGwy.ts",
4256
+ "line": 83
4257
+ },
4258
+ "name": "requireIAMAuthorization",
4259
+ "optional": true,
4260
+ "type": {
4261
+ "primitive": "boolean"
4262
+ }
4263
+ },
3797
4264
  {
3798
4265
  "abstract": true,
3799
4266
  "docs": {
@@ -3805,7 +4272,7 @@
3805
4272
  "immutable": true,
3806
4273
  "locationInModule": {
3807
4274
  "filename": "src/MicroAppsAPIGwy.ts",
3808
- "line": 75
4275
+ "line": 76
3809
4276
  },
3810
4277
  "name": "rootPathPrefix",
3811
4278
  "optional": true,
@@ -3830,7 +4297,7 @@
3830
4297
  },
3831
4298
  "locationInModule": {
3832
4299
  "filename": "src/MicroAppsCF.ts",
3833
- "line": 306
4300
+ "line": 370
3834
4301
  },
3835
4302
  "parameters": [
3836
4303
  {
@@ -3859,7 +4326,7 @@
3859
4326
  "kind": "class",
3860
4327
  "locationInModule": {
3861
4328
  "filename": "src/MicroAppsCF.ts",
3862
- "line": 188
4329
+ "line": 232
3863
4330
  },
3864
4331
  "methods": [
3865
4332
  {
@@ -3869,7 +4336,7 @@
3869
4336
  },
3870
4337
  "locationInModule": {
3871
4338
  "filename": "src/MicroAppsCF.ts",
3872
- "line": 242
4339
+ "line": 291
3873
4340
  },
3874
4341
  "name": "addRoutes",
3875
4342
  "parameters": [
@@ -3896,18 +4363,18 @@
3896
4363
  },
3897
4364
  "locationInModule": {
3898
4365
  "filename": "src/MicroAppsCF.ts",
3899
- "line": 202
4366
+ "line": 246
3900
4367
  },
3901
4368
  "name": "createAPIOriginPolicy",
3902
4369
  "parameters": [
3903
4370
  {
3904
- "name": "scope",
4371
+ "name": "_scope",
3905
4372
  "type": {
3906
4373
  "fqn": "constructs.Construct"
3907
4374
  }
3908
4375
  },
3909
4376
  {
3910
- "name": "props",
4377
+ "name": "_props",
3911
4378
  "type": {
3912
4379
  "fqn": "@pwrdrvr/microapps-cdk.CreateAPIOriginPolicyOptions"
3913
4380
  }
@@ -3925,12 +4392,13 @@
3925
4392
  "properties": [
3926
4393
  {
3927
4394
  "docs": {
3928
- "stability": "experimental"
4395
+ "stability": "experimental",
4396
+ "summary": "The CloudFront distribution."
3929
4397
  },
3930
4398
  "immutable": true,
3931
4399
  "locationInModule": {
3932
4400
  "filename": "src/MicroAppsCF.ts",
3933
- "line": 302
4401
+ "line": 366
3934
4402
  },
3935
4403
  "name": "cloudFrontDistro",
3936
4404
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsCF",
@@ -3952,7 +4420,7 @@
3952
4420
  "kind": "interface",
3953
4421
  "locationInModule": {
3954
4422
  "filename": "src/MicroAppsCF.ts",
3955
- "line": 24
4423
+ "line": 26
3956
4424
  },
3957
4425
  "name": "MicroAppsCFProps",
3958
4426
  "properties": [
@@ -3965,7 +4433,7 @@
3965
4433
  "immutable": true,
3966
4434
  "locationInModule": {
3967
4435
  "filename": "src/MicroAppsCF.ts",
3968
- "line": 37
4436
+ "line": 39
3969
4437
  },
3970
4438
  "name": "bucketAppsOrigin",
3971
4439
  "type": {
@@ -3981,7 +4449,7 @@
3981
4449
  "immutable": true,
3982
4450
  "locationInModule": {
3983
4451
  "filename": "src/MicroAppsCF.ts",
3984
- "line": 63
4452
+ "line": 65
3985
4453
  },
3986
4454
  "name": "httpApi",
3987
4455
  "type": {
@@ -3999,7 +4467,7 @@
3999
4467
  "immutable": true,
4000
4468
  "locationInModule": {
4001
4469
  "filename": "src/MicroAppsCF.ts",
4002
- "line": 71
4470
+ "line": 73
4003
4471
  },
4004
4472
  "name": "assetNameRoot",
4005
4473
  "optional": true,
@@ -4018,7 +4486,7 @@
4018
4486
  "immutable": true,
4019
4487
  "locationInModule": {
4020
4488
  "filename": "src/MicroAppsCF.ts",
4021
- "line": 79
4489
+ "line": 81
4022
4490
  },
4023
4491
  "name": "assetNameSuffix",
4024
4492
  "optional": true,
@@ -4035,7 +4503,7 @@
4035
4503
  "immutable": true,
4036
4504
  "locationInModule": {
4037
4505
  "filename": "src/MicroAppsCF.ts",
4038
- "line": 42
4506
+ "line": 44
4039
4507
  },
4040
4508
  "name": "bucketLogs",
4041
4509
  "optional": true,
@@ -4052,7 +4520,7 @@
4052
4520
  "immutable": true,
4053
4521
  "locationInModule": {
4054
4522
  "filename": "src/MicroAppsCF.ts",
4055
- "line": 84
4523
+ "line": 86
4056
4524
  },
4057
4525
  "name": "certEdge",
4058
4526
  "optional": true,
@@ -4071,7 +4539,7 @@
4071
4539
  "immutable": true,
4072
4540
  "locationInModule": {
4073
4541
  "filename": "src/MicroAppsCF.ts",
4074
- "line": 109
4542
+ "line": 111
4075
4543
  },
4076
4544
  "name": "createAPIPathRoute",
4077
4545
  "optional": true,
@@ -4079,6 +4547,25 @@
4079
4547
  "primitive": "boolean"
4080
4548
  }
4081
4549
  },
4550
+ {
4551
+ "abstract": true,
4552
+ "docs": {
4553
+ "default": "true",
4554
+ "remarks": "When false API routes with a period in the path will get routed to S3.\n\nWhen true API routes that contain /_next/data/ in the path will get routed to API Gateway\neven if they have a period in the path.",
4555
+ "stability": "experimental",
4556
+ "summary": "Create an extra Behavior (Route) for /_next/data/ This route is used by Next.js to load data from the API Gateway on `getServerSideProps` calls. The requests can end in `.json`, which would cause them to be routed to S3 if this route is not created."
4557
+ },
4558
+ "immutable": true,
4559
+ "locationInModule": {
4560
+ "filename": "src/MicroAppsCF.ts",
4561
+ "line": 126
4562
+ },
4563
+ "name": "createNextDataPathRoute",
4564
+ "optional": true,
4565
+ "type": {
4566
+ "primitive": "boolean"
4567
+ }
4568
+ },
4082
4569
  {
4083
4570
  "abstract": true,
4084
4571
  "docs": {
@@ -4090,7 +4577,7 @@
4090
4577
  "immutable": true,
4091
4578
  "locationInModule": {
4092
4579
  "filename": "src/MicroAppsCF.ts",
4093
- "line": 50
4580
+ "line": 52
4094
4581
  },
4095
4582
  "name": "domainNameEdge",
4096
4583
  "optional": true,
@@ -4109,7 +4596,7 @@
4109
4596
  "immutable": true,
4110
4597
  "locationInModule": {
4111
4598
  "filename": "src/MicroAppsCF.ts",
4112
- "line": 58
4599
+ "line": 60
4113
4600
  },
4114
4601
  "name": "domainNameOrigin",
4115
4602
  "optional": true,
@@ -4117,6 +4604,31 @@
4117
4604
  "primitive": "string"
4118
4605
  }
4119
4606
  },
4607
+ {
4608
+ "abstract": true,
4609
+ "docs": {
4610
+ "custom": {
4611
+ "defaunt": "- no edge to API Gateway origin functions added"
4612
+ },
4613
+ "stability": "experimental",
4614
+ "summary": "Configuration of the edge to origin lambda functions."
4615
+ },
4616
+ "immutable": true,
4617
+ "locationInModule": {
4618
+ "filename": "src/MicroAppsCF.ts",
4619
+ "line": 133
4620
+ },
4621
+ "name": "edgeToOriginLambdas",
4622
+ "optional": true,
4623
+ "type": {
4624
+ "collection": {
4625
+ "elementtype": {
4626
+ "fqn": "aws-cdk-lib.aws_cloudfront.EdgeLambda"
4627
+ },
4628
+ "kind": "array"
4629
+ }
4630
+ }
4631
+ },
4120
4632
  {
4121
4633
  "abstract": true,
4122
4634
  "docs": {
@@ -4126,7 +4638,7 @@
4126
4638
  "immutable": true,
4127
4639
  "locationInModule": {
4128
4640
  "filename": "src/MicroAppsCF.ts",
4129
- "line": 89
4641
+ "line": 91
4130
4642
  },
4131
4643
  "name": "r53Zone",
4132
4644
  "optional": true,
@@ -4145,7 +4657,7 @@
4145
4657
  "immutable": true,
4146
4658
  "locationInModule": {
4147
4659
  "filename": "src/MicroAppsCF.ts",
4148
- "line": 32
4660
+ "line": 34
4149
4661
  },
4150
4662
  "name": "removalPolicy",
4151
4663
  "optional": true,
@@ -4163,7 +4675,7 @@
4163
4675
  "immutable": true,
4164
4676
  "locationInModule": {
4165
4677
  "filename": "src/MicroAppsCF.ts",
4166
- "line": 96
4678
+ "line": 98
4167
4679
  },
4168
4680
  "name": "rootPathPrefix",
4169
4681
  "optional": true,
@@ -4174,87 +4686,380 @@
4174
4686
  ],
4175
4687
  "symbolId": "src/MicroAppsCF:MicroAppsCFProps"
4176
4688
  },
4177
- "@pwrdrvr/microapps-cdk.MicroAppsProps": {
4689
+ "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin": {
4178
4690
  "assembly": "@pwrdrvr/microapps-cdk",
4179
- "datatype": true,
4691
+ "base": "constructs.Construct",
4180
4692
  "docs": {
4181
4693
  "stability": "experimental",
4182
- "summary": "Properties to initialize an instance of `MicroApps`."
4694
+ "summary": "Create a new MicroApps Edge to Origin Function w/ `config.yml`."
4183
4695
  },
4184
- "fqn": "@pwrdrvr/microapps-cdk.MicroAppsProps",
4185
- "kind": "interface",
4696
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOrigin",
4697
+ "initializer": {
4698
+ "docs": {
4699
+ "stability": "experimental"
4700
+ },
4701
+ "locationInModule": {
4702
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4703
+ "line": 135
4704
+ },
4705
+ "parameters": [
4706
+ {
4707
+ "name": "scope",
4708
+ "type": {
4709
+ "fqn": "constructs.Construct"
4710
+ }
4711
+ },
4712
+ {
4713
+ "name": "id",
4714
+ "type": {
4715
+ "primitive": "string"
4716
+ }
4717
+ },
4718
+ {
4719
+ "name": "props",
4720
+ "type": {
4721
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps"
4722
+ }
4723
+ }
4724
+ ]
4725
+ },
4726
+ "interfaces": [
4727
+ "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin"
4728
+ ],
4729
+ "kind": "class",
4186
4730
  "locationInModule": {
4187
- "filename": "src/MicroApps.ts",
4188
- "line": 36
4731
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4732
+ "line": 112
4189
4733
  },
4190
- "name": "MicroAppsProps",
4191
- "properties": [
4734
+ "methods": [
4192
4735
  {
4193
- "abstract": true,
4194
4736
  "docs": {
4195
- "default": "dev",
4737
+ "returns": "",
4196
4738
  "stability": "experimental",
4197
- "summary": "Passed to NODE_ENV of Router and Deployer Lambda functions."
4739
+ "summary": "Generate the yaml config for the edge lambda."
4198
4740
  },
4199
- "immutable": true,
4200
4741
  "locationInModule": {
4201
- "filename": "src/MicroApps.ts",
4202
- "line": 51
4742
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4743
+ "line": 118
4203
4744
  },
4204
- "name": "appEnv",
4205
- "type": {
4206
- "primitive": "string"
4207
- }
4208
- },
4745
+ "name": "generateEdgeToOriginConfig",
4746
+ "parameters": [
4747
+ {
4748
+ "name": "props",
4749
+ "type": {
4750
+ "fqn": "@pwrdrvr/microapps-cdk.GenerateEdgeToOriginConfigOptions"
4751
+ }
4752
+ }
4753
+ ],
4754
+ "returns": {
4755
+ "type": {
4756
+ "primitive": "string"
4757
+ }
4758
+ },
4759
+ "static": true
4760
+ }
4761
+ ],
4762
+ "name": "MicroAppsEdgeToOrigin",
4763
+ "properties": [
4209
4764
  {
4210
- "abstract": true,
4211
4765
  "docs": {
4212
- "default": "- resource names auto assigned",
4213
- "example": "microapps",
4766
+ "remarks": "The generated `config.yml` is included in the Lambda's code.",
4214
4767
  "stability": "experimental",
4215
- "summary": "Optional asset name root."
4768
+ "summary": "The edge to origin function for API Gateway Request Origin Edge Lambda."
4216
4769
  },
4217
4770
  "immutable": true,
4218
4771
  "locationInModule": {
4219
- "filename": "src/MicroApps.ts",
4220
- "line": 59
4772
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4773
+ "line": 126
4221
4774
  },
4222
- "name": "assetNameRoot",
4223
- "optional": true,
4775
+ "name": "edgeToOriginFunction",
4776
+ "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin",
4224
4777
  "type": {
4225
- "primitive": "string"
4778
+ "union": {
4779
+ "types": [
4780
+ {
4781
+ "fqn": "aws-cdk-lib.aws_cloudfront.experimental.EdgeFunction"
4782
+ },
4783
+ {
4784
+ "fqn": "aws-cdk-lib.aws_lambda.Function"
4785
+ }
4786
+ ]
4787
+ }
4226
4788
  }
4227
4789
  },
4228
4790
  {
4229
- "abstract": true,
4230
4791
  "docs": {
4231
- "default": "none",
4232
- "example": "-dev-pr-12",
4233
4792
  "stability": "experimental",
4234
- "summary": "Optional asset name suffix."
4793
+ "summary": "Configuration of the edge to origin lambda functions."
4235
4794
  },
4236
4795
  "immutable": true,
4237
4796
  "locationInModule": {
4238
- "filename": "src/MicroApps.ts",
4239
- "line": 67
4797
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4798
+ "line": 131
4240
4799
  },
4241
- "name": "assetNameSuffix",
4242
- "optional": true,
4800
+ "name": "edgeToOriginLambdas",
4801
+ "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsEdgeToOrigin",
4243
4802
  "type": {
4244
- "primitive": "string"
4803
+ "collection": {
4804
+ "elementtype": {
4805
+ "fqn": "aws-cdk-lib.aws_cloudfront.EdgeLambda"
4806
+ },
4807
+ "kind": "array"
4808
+ }
4245
4809
  }
4246
- },
4247
- {
4248
- "abstract": true,
4249
- "docs": {
4250
- "stability": "experimental",
4251
- "summary": "Certificate in US-East-1 for the CloudFront distribution."
4810
+ }
4811
+ ],
4812
+ "symbolId": "src/MicroAppsEdgeToOrigin:MicroAppsEdgeToOrigin"
4813
+ },
4814
+ "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps": {
4815
+ "assembly": "@pwrdrvr/microapps-cdk",
4816
+ "datatype": true,
4817
+ "docs": {
4818
+ "stability": "experimental",
4819
+ "summary": "Properties to initialize an instance of `MicroAppsEdgeToOrigin`."
4820
+ },
4821
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsEdgeToOriginProps",
4822
+ "kind": "interface",
4823
+ "locationInModule": {
4824
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4825
+ "line": 32
4826
+ },
4827
+ "name": "MicroAppsEdgeToOriginProps",
4828
+ "properties": [
4829
+ {
4830
+ "abstract": true,
4831
+ "docs": {
4832
+ "default": "true",
4833
+ "remarks": "Can only be trusted if `signingMode` is enabled, which restricts\naccess to API Gateway to only IAM signed requests.\n\nNote: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin",
4834
+ "stability": "experimental",
4835
+ "summary": "Adds an X-Forwarded-Host-Header when calling API Gateway."
4252
4836
  },
4253
4837
  "immutable": true,
4254
4838
  "locationInModule": {
4255
- "filename": "src/MicroApps.ts",
4839
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4840
+ "line": 65
4841
+ },
4842
+ "name": "addXForwardedHostHeader",
4843
+ "optional": true,
4844
+ "type": {
4845
+ "primitive": "boolean"
4846
+ }
4847
+ },
4848
+ {
4849
+ "abstract": true,
4850
+ "docs": {
4851
+ "default": "- resource names auto assigned",
4852
+ "example": "microapps",
4853
+ "stability": "experimental",
4854
+ "summary": "Optional asset name root."
4855
+ },
4856
+ "immutable": true,
4857
+ "locationInModule": {
4858
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4859
+ "line": 46
4860
+ },
4861
+ "name": "assetNameRoot",
4862
+ "optional": true,
4863
+ "type": {
4864
+ "primitive": "string"
4865
+ }
4866
+ },
4867
+ {
4868
+ "abstract": true,
4869
+ "docs": {
4870
+ "default": "none",
4871
+ "example": "-dev-pr-12",
4872
+ "stability": "experimental",
4873
+ "summary": "Optional asset name suffix."
4874
+ },
4875
+ "immutable": true,
4876
+ "locationInModule": {
4877
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4878
+ "line": 54
4879
+ },
4880
+ "name": "assetNameSuffix",
4881
+ "optional": true,
4882
+ "type": {
4883
+ "primitive": "string"
4884
+ }
4885
+ },
4886
+ {
4887
+ "abstract": true,
4888
+ "docs": {
4889
+ "default": "undefined",
4890
+ "stability": "experimental",
4891
+ "summary": "Origin region that API Gateway will be deployed to, used for the config.yml on the Edge function to sign requests for the correct region."
4892
+ },
4893
+ "immutable": true,
4894
+ "locationInModule": {
4895
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4896
+ "line": 99
4897
+ },
4898
+ "name": "originRegion",
4899
+ "optional": true,
4900
+ "type": {
4901
+ "primitive": "string"
4902
+ }
4903
+ },
4904
+ {
4905
+ "abstract": true,
4906
+ "docs": {
4907
+ "default": "- per resource default",
4908
+ "stability": "experimental",
4909
+ "summary": "RemovalPolicy override for child resources."
4910
+ },
4911
+ "immutable": true,
4912
+ "locationInModule": {
4913
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4914
+ "line": 38
4915
+ },
4916
+ "name": "removalPolicy",
4917
+ "optional": true,
4918
+ "type": {
4919
+ "fqn": "aws-cdk-lib.RemovalPolicy"
4920
+ }
4921
+ },
4922
+ {
4923
+ "abstract": true,
4924
+ "docs": {
4925
+ "default": "true",
4926
+ "remarks": "This is necessary when API Gateway has not been configured\nwith a custom domain name that matches the exact domain name used by the CloudFront\nDistribution AND when the OriginRequestPolicy.HeadersBehavior is set\nto pass all headers to the origin.\n\nNote: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin",
4927
+ "stability": "experimental",
4928
+ "summary": "Replaces Host header (which will be the Edge domain name) with the Origin domain name when enabled."
4929
+ },
4930
+ "immutable": true,
4931
+ "locationInModule": {
4932
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4256
4933
  "line": 77
4257
4934
  },
4935
+ "name": "replaceHostHeader",
4936
+ "optional": true,
4937
+ "type": {
4938
+ "primitive": "boolean"
4939
+ }
4940
+ },
4941
+ {
4942
+ "abstract": true,
4943
+ "docs": {
4944
+ "default": "'sign'",
4945
+ "remarks": "'sign' - Uses request headers for auth.\n'presign' - Uses query string for auth.\n\nIf enabled,\n\nNote: if 'sign' or 'presign', creates OriginRequest Lambda @ Edge function for API Gateway Origin",
4946
+ "stability": "experimental",
4947
+ "summary": "Requires IAM auth on the API Gateway origin if not set to 'none'."
4948
+ },
4949
+ "immutable": true,
4950
+ "locationInModule": {
4951
+ "filename": "src/MicroAppsEdgeToOrigin.ts",
4952
+ "line": 90
4953
+ },
4954
+ "name": "signingMode",
4955
+ "optional": true,
4956
+ "type": {
4957
+ "primitive": "string"
4958
+ }
4959
+ }
4960
+ ],
4961
+ "symbolId": "src/MicroAppsEdgeToOrigin:MicroAppsEdgeToOriginProps"
4962
+ },
4963
+ "@pwrdrvr/microapps-cdk.MicroAppsProps": {
4964
+ "assembly": "@pwrdrvr/microapps-cdk",
4965
+ "datatype": true,
4966
+ "docs": {
4967
+ "stability": "experimental",
4968
+ "summary": "Properties to initialize an instance of `MicroApps`."
4969
+ },
4970
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsProps",
4971
+ "kind": "interface",
4972
+ "locationInModule": {
4973
+ "filename": "src/MicroApps.ts",
4974
+ "line": 38
4975
+ },
4976
+ "name": "MicroAppsProps",
4977
+ "properties": [
4978
+ {
4979
+ "abstract": true,
4980
+ "docs": {
4981
+ "default": "dev",
4982
+ "stability": "experimental",
4983
+ "summary": "Passed to NODE_ENV of Router and Deployer Lambda functions."
4984
+ },
4985
+ "immutable": true,
4986
+ "locationInModule": {
4987
+ "filename": "src/MicroApps.ts",
4988
+ "line": 53
4989
+ },
4990
+ "name": "appEnv",
4991
+ "type": {
4992
+ "primitive": "string"
4993
+ }
4994
+ },
4995
+ {
4996
+ "abstract": true,
4997
+ "docs": {
4998
+ "default": "true",
4999
+ "remarks": "Can only be trusted if `signingMode` is enabled, which restricts\naccess to API Gateway to only IAM signed requests.\n\nNote: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin",
5000
+ "stability": "experimental",
5001
+ "summary": "Adds an X-Forwarded-Host-Header when calling API Gateway."
5002
+ },
5003
+ "immutable": true,
5004
+ "locationInModule": {
5005
+ "filename": "src/MicroApps.ts",
5006
+ "line": 202
5007
+ },
5008
+ "name": "addXForwardedHostHeader",
5009
+ "optional": true,
5010
+ "type": {
5011
+ "primitive": "boolean"
5012
+ }
5013
+ },
5014
+ {
5015
+ "abstract": true,
5016
+ "docs": {
5017
+ "default": "- resource names auto assigned",
5018
+ "example": "microapps",
5019
+ "stability": "experimental",
5020
+ "summary": "Optional asset name root."
5021
+ },
5022
+ "immutable": true,
5023
+ "locationInModule": {
5024
+ "filename": "src/MicroApps.ts",
5025
+ "line": 61
5026
+ },
5027
+ "name": "assetNameRoot",
5028
+ "optional": true,
5029
+ "type": {
5030
+ "primitive": "string"
5031
+ }
5032
+ },
5033
+ {
5034
+ "abstract": true,
5035
+ "docs": {
5036
+ "default": "none",
5037
+ "example": "-dev-pr-12",
5038
+ "stability": "experimental",
5039
+ "summary": "Optional asset name suffix."
5040
+ },
5041
+ "immutable": true,
5042
+ "locationInModule": {
5043
+ "filename": "src/MicroApps.ts",
5044
+ "line": 69
5045
+ },
5046
+ "name": "assetNameSuffix",
5047
+ "optional": true,
5048
+ "type": {
5049
+ "primitive": "string"
5050
+ }
5051
+ },
5052
+ {
5053
+ "abstract": true,
5054
+ "docs": {
5055
+ "stability": "experimental",
5056
+ "summary": "Certificate in US-East-1 for the CloudFront distribution."
5057
+ },
5058
+ "immutable": true,
5059
+ "locationInModule": {
5060
+ "filename": "src/MicroApps.ts",
5061
+ "line": 79
5062
+ },
4258
5063
  "name": "certEdge",
4259
5064
  "optional": true,
4260
5065
  "type": {
@@ -4270,7 +5075,7 @@
4270
5075
  "immutable": true,
4271
5076
  "locationInModule": {
4272
5077
  "filename": "src/MicroApps.ts",
4273
- "line": 82
5078
+ "line": 84
4274
5079
  },
4275
5080
  "name": "certOrigin",
4276
5081
  "optional": true,
@@ -4289,7 +5094,7 @@
4289
5094
  "immutable": true,
4290
5095
  "locationInModule": {
4291
5096
  "filename": "src/MicroApps.ts",
4292
- "line": 189
5097
+ "line": 191
4293
5098
  },
4294
5099
  "name": "createAPIPathRoute",
4295
5100
  "optional": true,
@@ -4308,7 +5113,7 @@
4308
5113
  "immutable": true,
4309
5114
  "locationInModule": {
4310
5115
  "filename": "src/MicroApps.ts",
4311
- "line": 161
5116
+ "line": 163
4312
5117
  },
4313
5118
  "name": "domainNameEdge",
4314
5119
  "optional": true,
@@ -4327,7 +5132,7 @@
4327
5132
  "immutable": true,
4328
5133
  "locationInModule": {
4329
5134
  "filename": "src/MicroApps.ts",
4330
- "line": 169
5135
+ "line": 171
4331
5136
  },
4332
5137
  "name": "domainNameOrigin",
4333
5138
  "optional": true,
@@ -4335,6 +5140,24 @@
4335
5140
  "primitive": "string"
4336
5141
  }
4337
5142
  },
5143
+ {
5144
+ "abstract": true,
5145
+ "docs": {
5146
+ "default": "undefined",
5147
+ "stability": "experimental",
5148
+ "summary": "Origin region that API Gateway will be deployed to, used for the config.yml on the Edge function to sign requests for the correct region."
5149
+ },
5150
+ "immutable": true,
5151
+ "locationInModule": {
5152
+ "filename": "src/MicroApps.ts",
5153
+ "line": 236
5154
+ },
5155
+ "name": "originRegion",
5156
+ "optional": true,
5157
+ "type": {
5158
+ "primitive": "string"
5159
+ }
5160
+ },
4338
5161
  {
4339
5162
  "abstract": true,
4340
5163
  "docs": {
@@ -4344,7 +5167,7 @@
4344
5167
  "immutable": true,
4345
5168
  "locationInModule": {
4346
5169
  "filename": "src/MicroApps.ts",
4347
- "line": 72
5170
+ "line": 74
4348
5171
  },
4349
5172
  "name": "r53Zone",
4350
5173
  "optional": true,
@@ -4363,7 +5186,7 @@
4363
5186
  "immutable": true,
4364
5187
  "locationInModule": {
4365
5188
  "filename": "src/MicroApps.ts",
4366
- "line": 44
5189
+ "line": 46
4367
5190
  },
4368
5191
  "name": "removalPolicy",
4369
5192
  "optional": true,
@@ -4371,6 +5194,25 @@
4371
5194
  "fqn": "aws-cdk-lib.RemovalPolicy"
4372
5195
  }
4373
5196
  },
5197
+ {
5198
+ "abstract": true,
5199
+ "docs": {
5200
+ "default": "true",
5201
+ "remarks": "This is necessary when API Gateway has not been configured\nwith a custom domain name that matches the exact domain name used by the CloudFront\nDistribution AND when the OriginRequestPolicy.HeadersBehavior is set\nto pass all headers to the origin.\n\nNote: if true, creates OriginRequest Lambda @ Edge function for API Gateway Origin",
5202
+ "stability": "experimental",
5203
+ "summary": "Replaces Host header (which will be the Edge domain name) with the Origin domain name when enabled."
5204
+ },
5205
+ "immutable": true,
5206
+ "locationInModule": {
5207
+ "filename": "src/MicroApps.ts",
5208
+ "line": 214
5209
+ },
5210
+ "name": "replaceHostHeader",
5211
+ "optional": true,
5212
+ "type": {
5213
+ "primitive": "boolean"
5214
+ }
5215
+ },
4374
5216
  {
4375
5217
  "abstract": true,
4376
5218
  "docs": {
@@ -4381,7 +5223,7 @@
4381
5223
  "immutable": true,
4382
5224
  "locationInModule": {
4383
5225
  "filename": "src/MicroApps.ts",
4384
- "line": 176
5226
+ "line": 178
4385
5227
  },
4386
5228
  "name": "rootPathPrefix",
4387
5229
  "optional": true,
@@ -4401,7 +5243,7 @@
4401
5243
  "immutable": true,
4402
5244
  "locationInModule": {
4403
5245
  "filename": "src/MicroApps.ts",
4404
- "line": 153
5246
+ "line": 155
4405
5247
  },
4406
5248
  "name": "s3PolicyBypassAROAs",
4407
5249
  "optional": true,
@@ -4426,7 +5268,7 @@
4426
5268
  "immutable": true,
4427
5269
  "locationInModule": {
4428
5270
  "filename": "src/MicroApps.ts",
4429
- "line": 110
5271
+ "line": 112
4430
5272
  },
4431
5273
  "name": "s3PolicyBypassPrincipalARNs",
4432
5274
  "optional": true,
@@ -4450,13 +5292,53 @@
4450
5292
  "immutable": true,
4451
5293
  "locationInModule": {
4452
5294
  "filename": "src/MicroApps.ts",
4453
- "line": 94
5295
+ "line": 96
4454
5296
  },
4455
5297
  "name": "s3StrictBucketPolicy",
4456
5298
  "optional": true,
4457
5299
  "type": {
4458
5300
  "primitive": "boolean"
4459
5301
  }
5302
+ },
5303
+ {
5304
+ "abstract": true,
5305
+ "docs": {
5306
+ "default": "'sign'",
5307
+ "remarks": "'sign' - Uses request headers for auth.\n'presign' - Uses query string for auth.\n\nIf enabled,\n\nNote: if 'sign' or 'presign', creates OriginRequest Lambda @ Edge function for API Gateway Origin",
5308
+ "stability": "experimental",
5309
+ "summary": "Requires IAM auth on the API Gateway origin if not set to 'none'."
5310
+ },
5311
+ "immutable": true,
5312
+ "locationInModule": {
5313
+ "filename": "src/MicroApps.ts",
5314
+ "line": 227
5315
+ },
5316
+ "name": "signingMode",
5317
+ "optional": true,
5318
+ "type": {
5319
+ "primitive": "string"
5320
+ }
5321
+ },
5322
+ {
5323
+ "abstract": true,
5324
+ "docs": {
5325
+ "custom": {
5326
+ "warning": "- It is *strongly* suggested that production stacks create\ntheir own DynamoDB Table and pass it into this construct, for protection\nagainst data loss due to logical ID changes, the ability to configure\nProvisioned capacity with Auto Scaling, the ability to add additional indices, etc.\n\nRequirements:\n- Hash Key: `PK`\n- Sort Key: `SK`"
5327
+ },
5328
+ "default": "created by construct",
5329
+ "stability": "experimental",
5330
+ "summary": "Existing table for apps/versions/rules."
5331
+ },
5332
+ "immutable": true,
5333
+ "locationInModule": {
5334
+ "filename": "src/MicroApps.ts",
5335
+ "line": 252
5336
+ },
5337
+ "name": "table",
5338
+ "optional": true,
5339
+ "type": {
5340
+ "fqn": "aws-cdk-lib.aws_dynamodb.ITable"
5341
+ }
4460
5342
  }
4461
5343
  ],
4462
5344
  "symbolId": "src/MicroApps:MicroAppsProps"
@@ -4465,8 +5347,9 @@
4465
5347
  "assembly": "@pwrdrvr/microapps-cdk",
4466
5348
  "base": "constructs.Construct",
4467
5349
  "docs": {
5350
+ "remarks": "These should be created in a stack that will not be deleted if\nthere are breaking changes to MicroApps in the future.",
4468
5351
  "stability": "experimental",
4469
- "summary": "Create a new MicroApps S3 Bucket."
5352
+ "summary": "Create the durable MicroApps S3 Buckets."
4470
5353
  },
4471
5354
  "fqn": "@pwrdrvr/microapps-cdk.MicroAppsS3",
4472
5355
  "initializer": {
@@ -4475,7 +5358,7 @@
4475
5358
  },
4476
5359
  "locationInModule": {
4477
5360
  "filename": "src/MicroAppsS3.ts",
4478
- "line": 117
5361
+ "line": 120
4479
5362
  },
4480
5363
  "parameters": [
4481
5364
  {
@@ -4505,7 +5388,7 @@
4505
5388
  "kind": "class",
4506
5389
  "locationInModule": {
4507
5390
  "filename": "src/MicroAppsS3.ts",
4508
- "line": 91
5391
+ "line": 94
4509
5392
  },
4510
5393
  "name": "MicroAppsS3",
4511
5394
  "properties": [
@@ -4517,7 +5400,7 @@
4517
5400
  "immutable": true,
4518
5401
  "locationInModule": {
4519
5402
  "filename": "src/MicroAppsS3.ts",
4520
- "line": 93
5403
+ "line": 96
4521
5404
  },
4522
5405
  "name": "bucketApps",
4523
5406
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
@@ -4533,7 +5416,7 @@
4533
5416
  "immutable": true,
4534
5417
  "locationInModule": {
4535
5418
  "filename": "src/MicroAppsS3.ts",
4536
- "line": 98
5419
+ "line": 101
4537
5420
  },
4538
5421
  "name": "bucketAppsOAI",
4539
5422
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
@@ -4549,7 +5432,7 @@
4549
5432
  "immutable": true,
4550
5433
  "locationInModule": {
4551
5434
  "filename": "src/MicroAppsS3.ts",
4552
- "line": 103
5435
+ "line": 106
4553
5436
  },
4554
5437
  "name": "bucketAppsOrigin",
4555
5438
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
@@ -4565,7 +5448,7 @@
4565
5448
  "immutable": true,
4566
5449
  "locationInModule": {
4567
5450
  "filename": "src/MicroAppsS3.ts",
4568
- "line": 108
5451
+ "line": 111
4569
5452
  },
4570
5453
  "name": "bucketAppsStaging",
4571
5454
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
@@ -4581,7 +5464,7 @@
4581
5464
  "immutable": true,
4582
5465
  "locationInModule": {
4583
5466
  "filename": "src/MicroAppsS3.ts",
4584
- "line": 113
5467
+ "line": 116
4585
5468
  },
4586
5469
  "name": "bucketLogs",
4587
5470
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsS3",
@@ -4735,7 +5618,7 @@
4735
5618
  },
4736
5619
  "locationInModule": {
4737
5620
  "filename": "src/MicroAppsSvcs.ts",
4738
- "line": 230
5621
+ "line": 215
4739
5622
  },
4740
5623
  "parameters": [
4741
5624
  {
@@ -4765,7 +5648,7 @@
4765
5648
  "kind": "class",
4766
5649
  "locationInModule": {
4767
5650
  "filename": "src/MicroAppsSvcs.ts",
4768
- "line": 214
5651
+ "line": 198
4769
5652
  },
4770
5653
  "name": "MicroAppsSvcs",
4771
5654
  "properties": [
@@ -4777,7 +5660,7 @@
4777
5660
  "immutable": true,
4778
5661
  "locationInModule": {
4779
5662
  "filename": "src/MicroAppsSvcs.ts",
4780
- "line": 221
5663
+ "line": 206
4781
5664
  },
4782
5665
  "name": "deployerFunc",
4783
5666
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsSvcs",
@@ -4793,7 +5676,7 @@
4793
5676
  "immutable": true,
4794
5677
  "locationInModule": {
4795
5678
  "filename": "src/MicroAppsSvcs.ts",
4796
- "line": 226
5679
+ "line": 211
4797
5680
  },
4798
5681
  "name": "routerFunc",
4799
5682
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsSvcs",
@@ -4809,7 +5692,7 @@
4809
5692
  "immutable": true,
4810
5693
  "locationInModule": {
4811
5694
  "filename": "src/MicroAppsSvcs.ts",
4812
- "line": 216
5695
+ "line": 201
4813
5696
  },
4814
5697
  "name": "table",
4815
5698
  "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsSvcs",
@@ -4831,7 +5714,7 @@
4831
5714
  "kind": "interface",
4832
5715
  "locationInModule": {
4833
5716
  "filename": "src/MicroAppsSvcs.ts",
4834
- "line": 58
5717
+ "line": 19
4835
5718
  },
4836
5719
  "name": "MicroAppsSvcsProps",
4837
5720
  "properties": [
@@ -4844,7 +5727,7 @@
4844
5727
  "immutable": true,
4845
5728
  "locationInModule": {
4846
5729
  "filename": "src/MicroAppsSvcs.ts",
4847
- "line": 92
5730
+ "line": 53
4848
5731
  },
4849
5732
  "name": "appEnv",
4850
5733
  "type": {
@@ -4860,7 +5743,7 @@
4860
5743
  "immutable": true,
4861
5744
  "locationInModule": {
4862
5745
  "filename": "src/MicroAppsSvcs.ts",
4863
- "line": 71
5746
+ "line": 32
4864
5747
  },
4865
5748
  "name": "bucketApps",
4866
5749
  "type": {
@@ -4876,7 +5759,7 @@
4876
5759
  "immutable": true,
4877
5760
  "locationInModule": {
4878
5761
  "filename": "src/MicroAppsSvcs.ts",
4879
- "line": 76
5762
+ "line": 37
4880
5763
  },
4881
5764
  "name": "bucketAppsOAI",
4882
5765
  "type": {
@@ -4892,7 +5775,7 @@
4892
5775
  "immutable": true,
4893
5776
  "locationInModule": {
4894
5777
  "filename": "src/MicroAppsSvcs.ts",
4895
- "line": 81
5778
+ "line": 42
4896
5779
  },
4897
5780
  "name": "bucketAppsStaging",
4898
5781
  "type": {
@@ -4908,7 +5791,7 @@
4908
5791
  "immutable": true,
4909
5792
  "locationInModule": {
4910
5793
  "filename": "src/MicroAppsSvcs.ts",
4911
- "line": 86
5794
+ "line": 47
4912
5795
  },
4913
5796
  "name": "httpApi",
4914
5797
  "type": {
@@ -4926,7 +5809,7 @@
4926
5809
  "immutable": true,
4927
5810
  "locationInModule": {
4928
5811
  "filename": "src/MicroAppsSvcs.ts",
4929
- "line": 100
5812
+ "line": 61
4930
5813
  },
4931
5814
  "name": "assetNameRoot",
4932
5815
  "optional": true,
@@ -4945,7 +5828,7 @@
4945
5828
  "immutable": true,
4946
5829
  "locationInModule": {
4947
5830
  "filename": "src/MicroAppsSvcs.ts",
4948
- "line": 108
5831
+ "line": 69
4949
5832
  },
4950
5833
  "name": "assetNameSuffix",
4951
5834
  "optional": true,
@@ -4964,7 +5847,7 @@
4964
5847
  "immutable": true,
4965
5848
  "locationInModule": {
4966
5849
  "filename": "src/MicroAppsSvcs.ts",
4967
- "line": 66
5850
+ "line": 27
4968
5851
  },
4969
5852
  "name": "removalPolicy",
4970
5853
  "optional": true,
@@ -4972,6 +5855,24 @@
4972
5855
  "fqn": "aws-cdk-lib.RemovalPolicy"
4973
5856
  }
4974
5857
  },
5858
+ {
5859
+ "abstract": true,
5860
+ "docs": {
5861
+ "default": "true",
5862
+ "stability": "experimental",
5863
+ "summary": "Require IAM auth on API Gateway."
5864
+ },
5865
+ "immutable": true,
5866
+ "locationInModule": {
5867
+ "filename": "src/MicroAppsSvcs.ts",
5868
+ "line": 155
5869
+ },
5870
+ "name": "requireIAMAuthorization",
5871
+ "optional": true,
5872
+ "type": {
5873
+ "primitive": "boolean"
5874
+ }
5875
+ },
4975
5876
  {
4976
5877
  "abstract": true,
4977
5878
  "docs": {
@@ -4983,7 +5884,7 @@
4983
5884
  "immutable": true,
4984
5885
  "locationInModule": {
4985
5886
  "filename": "src/MicroAppsSvcs.ts",
4986
- "line": 187
5887
+ "line": 148
4987
5888
  },
4988
5889
  "name": "rootPathPrefix",
4989
5890
  "optional": true,
@@ -5003,7 +5904,7 @@
5003
5904
  "immutable": true,
5004
5905
  "locationInModule": {
5005
5906
  "filename": "src/MicroAppsSvcs.ts",
5006
- "line": 179
5907
+ "line": 140
5007
5908
  },
5008
5909
  "name": "s3PolicyBypassAROAs",
5009
5910
  "optional": true,
@@ -5028,7 +5929,7 @@
5028
5929
  "immutable": true,
5029
5930
  "locationInModule": {
5030
5931
  "filename": "src/MicroAppsSvcs.ts",
5031
- "line": 136
5932
+ "line": 97
5032
5933
  },
5033
5934
  "name": "s3PolicyBypassPrincipalARNs",
5034
5935
  "optional": true,
@@ -5052,18 +5953,216 @@
5052
5953
  "immutable": true,
5053
5954
  "locationInModule": {
5054
5955
  "filename": "src/MicroAppsSvcs.ts",
5055
- "line": 120
5956
+ "line": 81
5056
5957
  },
5057
5958
  "name": "s3StrictBucketPolicy",
5058
5959
  "optional": true,
5059
5960
  "type": {
5060
5961
  "primitive": "boolean"
5061
5962
  }
5963
+ },
5964
+ {
5965
+ "abstract": true,
5966
+ "docs": {
5967
+ "custom": {
5968
+ "warning": "- It is *strongly* suggested that production stacks create\ntheir own DynamoDB Table and pass it into this construct, for protection\nagainst data loss due to logical ID changes, the ability to configure\nProvisioned capacity with Auto Scaling, the ability to add additional indices, etc.\n\nRequirements:\n- Hash Key: `PK`\n- Sort Key: `SK`"
5969
+ },
5970
+ "default": "created by construct",
5971
+ "stability": "experimental",
5972
+ "summary": "Existing table for apps/versions/rules."
5973
+ },
5974
+ "immutable": true,
5975
+ "locationInModule": {
5976
+ "filename": "src/MicroAppsSvcs.ts",
5977
+ "line": 171
5978
+ },
5979
+ "name": "table",
5980
+ "optional": true,
5981
+ "type": {
5982
+ "fqn": "aws-cdk-lib.aws_dynamodb.ITable"
5983
+ }
5062
5984
  }
5063
5985
  ],
5064
5986
  "symbolId": "src/MicroAppsSvcs:MicroAppsSvcsProps"
5987
+ },
5988
+ "@pwrdrvr/microapps-cdk.MicroAppsTable": {
5989
+ "assembly": "@pwrdrvr/microapps-cdk",
5990
+ "base": "constructs.Construct",
5991
+ "docs": {
5992
+ "stability": "experimental",
5993
+ "summary": "Create a new MicroApps Table for apps / versions / rules."
5994
+ },
5995
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsTable",
5996
+ "initializer": {
5997
+ "docs": {
5998
+ "stability": "experimental"
5999
+ },
6000
+ "locationInModule": {
6001
+ "filename": "src/MicroAppsTable.ts",
6002
+ "line": 68
6003
+ },
6004
+ "parameters": [
6005
+ {
6006
+ "name": "scope",
6007
+ "type": {
6008
+ "fqn": "constructs.Construct"
6009
+ }
6010
+ },
6011
+ {
6012
+ "name": "id",
6013
+ "type": {
6014
+ "primitive": "string"
6015
+ }
6016
+ },
6017
+ {
6018
+ "name": "props",
6019
+ "optional": true,
6020
+ "type": {
6021
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsTableProps"
6022
+ }
6023
+ }
6024
+ ]
6025
+ },
6026
+ "interfaces": [
6027
+ "@pwrdrvr/microapps-cdk.IMicroAppsTable"
6028
+ ],
6029
+ "kind": "class",
6030
+ "locationInModule": {
6031
+ "filename": "src/MicroAppsTable.ts",
6032
+ "line": 62
6033
+ },
6034
+ "name": "MicroAppsTable",
6035
+ "properties": [
6036
+ {
6037
+ "docs": {
6038
+ "stability": "experimental",
6039
+ "summary": "DynamoDB table used by Router, Deployer, and Release console app."
6040
+ },
6041
+ "immutable": true,
6042
+ "locationInModule": {
6043
+ "filename": "src/MicroAppsTable.ts",
6044
+ "line": 64
6045
+ },
6046
+ "name": "table",
6047
+ "overrides": "@pwrdrvr/microapps-cdk.IMicroAppsTable",
6048
+ "type": {
6049
+ "fqn": "aws-cdk-lib.aws_dynamodb.Table"
6050
+ }
6051
+ }
6052
+ ],
6053
+ "symbolId": "src/MicroAppsTable:MicroAppsTable"
6054
+ },
6055
+ "@pwrdrvr/microapps-cdk.MicroAppsTableProps": {
6056
+ "assembly": "@pwrdrvr/microapps-cdk",
6057
+ "datatype": true,
6058
+ "docs": {
6059
+ "stability": "experimental",
6060
+ "summary": "Properties to initialize an instance of `MicroAppsTable`."
6061
+ },
6062
+ "fqn": "@pwrdrvr/microapps-cdk.MicroAppsTableProps",
6063
+ "kind": "interface",
6064
+ "locationInModule": {
6065
+ "filename": "src/MicroAppsTable.ts",
6066
+ "line": 8
6067
+ },
6068
+ "name": "MicroAppsTableProps",
6069
+ "properties": [
6070
+ {
6071
+ "abstract": true,
6072
+ "docs": {
6073
+ "stability": "experimental",
6074
+ "summary": "Application environment, passed as `NODE_ENV` to the Router and Deployer Lambda functions."
6075
+ },
6076
+ "immutable": true,
6077
+ "locationInModule": {
6078
+ "filename": "src/MicroAppsTable.ts",
6079
+ "line": 22
6080
+ },
6081
+ "name": "appEnv",
6082
+ "type": {
6083
+ "primitive": "string"
6084
+ }
6085
+ },
6086
+ {
6087
+ "abstract": true,
6088
+ "docs": {
6089
+ "default": "- resource names auto assigned",
6090
+ "example": "microapps",
6091
+ "stability": "experimental",
6092
+ "summary": "Optional asset name root."
6093
+ },
6094
+ "immutable": true,
6095
+ "locationInModule": {
6096
+ "filename": "src/MicroAppsTable.ts",
6097
+ "line": 30
6098
+ },
6099
+ "name": "assetNameRoot",
6100
+ "optional": true,
6101
+ "type": {
6102
+ "primitive": "string"
6103
+ }
6104
+ },
6105
+ {
6106
+ "abstract": true,
6107
+ "docs": {
6108
+ "default": "none",
6109
+ "example": "-dev-pr-12",
6110
+ "stability": "experimental",
6111
+ "summary": "Optional asset name suffix."
6112
+ },
6113
+ "immutable": true,
6114
+ "locationInModule": {
6115
+ "filename": "src/MicroAppsTable.ts",
6116
+ "line": 38
6117
+ },
6118
+ "name": "assetNameSuffix",
6119
+ "optional": true,
6120
+ "type": {
6121
+ "primitive": "string"
6122
+ }
6123
+ },
6124
+ {
6125
+ "abstract": true,
6126
+ "docs": {
6127
+ "default": "- per resource default",
6128
+ "remarks": "Note: if set to DESTROY the S3 buckes will have `autoDeleteObjects` set to `true`",
6129
+ "stability": "experimental",
6130
+ "summary": "RemovalPolicy override for child resources."
6131
+ },
6132
+ "immutable": true,
6133
+ "locationInModule": {
6134
+ "filename": "src/MicroAppsTable.ts",
6135
+ "line": 16
6136
+ },
6137
+ "name": "removalPolicy",
6138
+ "optional": true,
6139
+ "type": {
6140
+ "fqn": "aws-cdk-lib.RemovalPolicy"
6141
+ }
6142
+ },
6143
+ {
6144
+ "abstract": true,
6145
+ "docs": {
6146
+ "default": "none",
6147
+ "example": "dev/",
6148
+ "stability": "experimental",
6149
+ "summary": "Path prefix on the root of the deployment."
6150
+ },
6151
+ "immutable": true,
6152
+ "locationInModule": {
6153
+ "filename": "src/MicroAppsTable.ts",
6154
+ "line": 46
6155
+ },
6156
+ "name": "rootPathPrefix",
6157
+ "optional": true,
6158
+ "type": {
6159
+ "primitive": "string"
6160
+ }
6161
+ }
6162
+ ],
6163
+ "symbolId": "src/MicroAppsTable:MicroAppsTableProps"
5065
6164
  }
5066
6165
  },
5067
- "version": "0.2.9",
5068
- "fingerprint": "zngGwgDD1XlxxxHYPeX5ofe7Ybe7YoT0T2w8RK+Fg48="
6166
+ "version": "0.2.12",
6167
+ "fingerprint": "e/SGzClAEVnA05j9b8maqC+wYjffg5sOd16is2KSWIM="
5069
6168
  }