eoapi-cdk 5.0.0

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 (67) hide show
  1. package/.devcontainer/devcontainer.json +4 -0
  2. package/.github/workflows/build.yaml +73 -0
  3. package/.github/workflows/conventional-pr.yaml +26 -0
  4. package/.github/workflows/distribute.yaml +45 -0
  5. package/.github/workflows/docs.yaml +26 -0
  6. package/.github/workflows/test.yaml +13 -0
  7. package/.github/workflows/tox.yaml +24 -0
  8. package/.jsii +5058 -0
  9. package/.nvmrc +1 -0
  10. package/CHANGELOG.md +195 -0
  11. package/README.md +50 -0
  12. package/diagrams/bastion_diagram.excalidraw +1416 -0
  13. package/diagrams/bastion_diagram.png +0 -0
  14. package/diagrams/ingestor_diagram.excalidraw +2274 -0
  15. package/diagrams/ingestor_diagram.png +0 -0
  16. package/lib/bastion-host/index.d.ts +117 -0
  17. package/lib/bastion-host/index.js +162 -0
  18. package/lib/bootstrapper/index.d.ts +57 -0
  19. package/lib/bootstrapper/index.js +73 -0
  20. package/lib/bootstrapper/runtime/Dockerfile +18 -0
  21. package/lib/bootstrapper/runtime/handler.py +235 -0
  22. package/lib/database/index.d.ts +60 -0
  23. package/lib/database/index.js +84 -0
  24. package/lib/database/instance-memory.json +525 -0
  25. package/lib/index.d.ts +6 -0
  26. package/lib/index.js +19 -0
  27. package/lib/ingestor-api/index.d.ts +54 -0
  28. package/lib/ingestor-api/index.js +147 -0
  29. package/lib/ingestor-api/runtime/dev_requirements.txt +2 -0
  30. package/lib/ingestor-api/runtime/requirements.txt +12 -0
  31. package/lib/ingestor-api/runtime/src/__init__.py +0 -0
  32. package/lib/ingestor-api/runtime/src/collection.py +36 -0
  33. package/lib/ingestor-api/runtime/src/config.py +46 -0
  34. package/lib/ingestor-api/runtime/src/dependencies.py +94 -0
  35. package/lib/ingestor-api/runtime/src/handler.py +9 -0
  36. package/lib/ingestor-api/runtime/src/ingestor.py +82 -0
  37. package/lib/ingestor-api/runtime/src/loader.py +21 -0
  38. package/lib/ingestor-api/runtime/src/main.py +125 -0
  39. package/lib/ingestor-api/runtime/src/schemas.py +148 -0
  40. package/lib/ingestor-api/runtime/src/services.py +44 -0
  41. package/lib/ingestor-api/runtime/src/utils.py +52 -0
  42. package/lib/ingestor-api/runtime/src/validators.py +72 -0
  43. package/lib/ingestor-api/runtime/tests/__init__.py +0 -0
  44. package/lib/ingestor-api/runtime/tests/conftest.py +271 -0
  45. package/lib/ingestor-api/runtime/tests/test_collection.py +35 -0
  46. package/lib/ingestor-api/runtime/tests/test_collection_endpoint.py +41 -0
  47. package/lib/ingestor-api/runtime/tests/test_ingestor.py +60 -0
  48. package/lib/ingestor-api/runtime/tests/test_registration.py +198 -0
  49. package/lib/ingestor-api/runtime/tests/test_utils.py +35 -0
  50. package/lib/stac-api/index.d.ts +50 -0
  51. package/lib/stac-api/index.js +60 -0
  52. package/lib/stac-api/runtime/requirements.txt +8 -0
  53. package/lib/stac-api/runtime/src/__init__.py +0 -0
  54. package/lib/stac-api/runtime/src/app.py +58 -0
  55. package/lib/stac-api/runtime/src/config.py +96 -0
  56. package/lib/stac-api/runtime/src/handler.py +9 -0
  57. package/lib/titiler-pgstac-api/index.d.ts +33 -0
  58. package/lib/titiler-pgstac-api/index.js +67 -0
  59. package/lib/titiler-pgstac-api/runtime/Dockerfile +20 -0
  60. package/lib/titiler-pgstac-api/runtime/dev_requirements.txt +1 -0
  61. package/lib/titiler-pgstac-api/runtime/requirements.txt +3 -0
  62. package/lib/titiler-pgstac-api/runtime/src/__init__.py +3 -0
  63. package/lib/titiler-pgstac-api/runtime/src/handler.py +23 -0
  64. package/lib/titiler-pgstac-api/runtime/src/utils.py +26 -0
  65. package/package.json +81 -0
  66. package/tox.ini +52 -0
  67. package/tsconfig.tsbuildinfo +18116 -0
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 18
package/CHANGELOG.md ADDED
@@ -0,0 +1,195 @@
1
+ # [5.0.0](https://github.com/developmentseed/eoapi-cdk/compare/v4.2.3...v5.0.0) (2023-07-12)
2
+
3
+
4
+ ### Features
5
+
6
+ * rename repository to eoapi-cdk ([#59](https://github.com/developmentseed/eoapi-cdk/issues/59)) ([1ed2bb3](https://github.com/developmentseed/eoapi-cdk/commit/1ed2bb3d00328327ada96ce9daaadd940b534285))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * rename repository to eoapi-cdk
12
+
13
+ ## [4.2.3](https://github.com/developmentseed/cdk-pgstac/compare/v4.2.2...v4.2.3) (2023-06-30)
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * **ingestor-api:** add stack name to ingestor-api apigateway export name ([#48](https://github.com/developmentseed/cdk-pgstac/issues/48)) ([2fdd1e8](https://github.com/developmentseed/cdk-pgstac/commit/2fdd1e8fe4b3b7e82657bcf95bf628eecdb9aa22))
19
+
20
+ ## [4.2.2](https://github.com/developmentseed/cdk-pgstac/compare/v4.2.1...v4.2.2) (2023-06-16)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **titiler-pgstac-api:** fix destination path in titiler pgstac Dockerfile COPY command ([#46](https://github.com/developmentseed/cdk-pgstac/issues/46)) ([302bd22](https://github.com/developmentseed/cdk-pgstac/commit/302bd22fd3ff5af7335bb9285be798fb550cf19b))
26
+
27
+ ## [4.2.1](https://github.com/developmentseed/cdk-pgstac/compare/v4.2.0...v4.2.1) (2023-06-12)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **bootstrapper:** bootstrapper should use httpx ([#45](https://github.com/developmentseed/cdk-pgstac/issues/45)) ([36bb361](https://github.com/developmentseed/cdk-pgstac/commit/36bb361cf65caa1ae9a633eb8e39066106f02258))
33
+
34
+ # [4.2.0](https://github.com/developmentseed/cdk-pgstac/compare/v4.1.0...v4.2.0) (2023-06-09)
35
+
36
+
37
+ ### Features
38
+
39
+ * **titiler-pgstac-api:** add titiler-pgstac endpoint ([#42](https://github.com/developmentseed/cdk-pgstac/issues/42)) ([a02acef](https://github.com/developmentseed/cdk-pgstac/commit/a02acef3ed78049dd55c242a5b04bfc627c53661))
40
+
41
+ # [4.1.0](https://github.com/developmentseed/cdk-pgstac/compare/v4.0.0...v4.1.0) (2023-05-30)
42
+
43
+
44
+ ### Features
45
+
46
+ * **stac-api:** add stac api lambda function field ([#43](https://github.com/developmentseed/cdk-pgstac/issues/43)) ([3a91a37](https://github.com/developmentseed/cdk-pgstac/commit/3a91a37ec329c09a66c85c23adfb1afb1345ba16))
47
+
48
+ # [4.0.0](https://github.com/developmentseed/cdk-pgstac/compare/v3.0.1...v4.0.0) (2023-04-25)
49
+
50
+
51
+ ### Features
52
+
53
+ * **ingestor-api:** expose ingestor handler role ([#39](https://github.com/developmentseed/cdk-pgstac/issues/39)) ([559f3a9](https://github.com/developmentseed/cdk-pgstac/commit/559f3a91d4d712302aa5661539d495b2ee299f83))
54
+
55
+
56
+ ### BREAKING CHANGES
57
+
58
+ * **ingestor-api:** the role name is automatically generated by AWS and thus users can not use the name that
59
+ was specified before, but should directly interact with the new property we are adding.
60
+
61
+ * change name of variable to comply with formatting rules, remove readonly statement
62
+
63
+ ## [3.0.1](https://github.com/developmentseed/cdk-pgstac/compare/v3.0.0...v3.0.1) (2023-04-14)
64
+
65
+
66
+ ### Bug Fixes
67
+
68
+ * **bootstraper:** fix version inconsistencies and [#19](https://github.com/developmentseed/cdk-pgstac/issues/19) regressions ([#34](https://github.com/developmentseed/cdk-pgstac/issues/34)) ([ebeac2a](https://github.com/developmentseed/cdk-pgstac/commit/ebeac2a1b36ff5825157bea8e76392a14d613b91))
69
+
70
+ # [3.0.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.6.3...v3.0.0) (2023-04-04)
71
+
72
+
73
+ ### Code Refactoring
74
+
75
+ * **bootstrapper:** remove VEDA logic ([#29](https://github.com/developmentseed/cdk-pgstac/issues/29)) ([e98039e](https://github.com/developmentseed/cdk-pgstac/commit/e98039ef4ace023faa205f0b0d1ad0efec38a69f))
76
+
77
+
78
+ ### BREAKING CHANGES
79
+
80
+ * **bootstrapper:** remove dashboard schema and functions from the database bootstrapper and remove automatic collection summary udpate from ingestor.
81
+
82
+ ## [2.6.3](https://github.com/developmentseed/cdk-pgstac/compare/v2.6.2...v2.6.3) (2023-03-28)
83
+
84
+
85
+ ### Bug Fixes
86
+
87
+ * **ingestor-api:** store STAC item as string in DynamoDB ([#26](https://github.com/developmentseed/cdk-pgstac/issues/26)) ([bd7a1fa](https://github.com/developmentseed/cdk-pgstac/commit/bd7a1fa799cc9765df2939a444593205efa6bf4d))
88
+
89
+ ## [2.6.2](https://github.com/developmentseed/cdk-pgstac/compare/v2.6.1...v2.6.2) (2023-03-16)
90
+
91
+
92
+ ### Bug Fixes
93
+
94
+ * **ingestor-api:** queries require sequences ([#23](https://github.com/developmentseed/cdk-pgstac/issues/23)) ([00d71cc](https://github.com/developmentseed/cdk-pgstac/commit/00d71cc1d253e77f1cd11afe9e4b513a577a67a2))
95
+
96
+ ## [2.6.1](https://github.com/developmentseed/cdk-pgstac/compare/v2.6.0...v2.6.1) (2023-03-16)
97
+
98
+
99
+ ### Reverts
100
+
101
+ * Revert "Release 2.7.0. (#21)" (#22) ([f08e8e8](https://github.com/developmentseed/cdk-pgstac/commit/f08e8e8140c15ed608ab16a053641e20603bf7c5)), closes [#21](https://github.com/developmentseed/cdk-pgstac/issues/21) [#22](https://github.com/developmentseed/cdk-pgstac/issues/22)
102
+
103
+ # [2.6.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.5.1...v2.6.0) (2023-03-10)
104
+
105
+
106
+ ### Features
107
+
108
+ * collection endpoint ([#18](https://github.com/developmentseed/cdk-pgstac/issues/18)) ([d3e9911](https://github.com/developmentseed/cdk-pgstac/commit/d3e991155644d9da08ff7293976a284c252a383b))
109
+
110
+ ## [2.5.1](https://github.com/developmentseed/cdk-pgstac/compare/v2.5.0...v2.5.1) (2022-12-06)
111
+
112
+
113
+ ### Bug Fixes
114
+
115
+ * **ingestor-api:** Correct import path for settings ([be40af7](https://github.com/developmentseed/cdk-pgstac/commit/be40af70326f04d7ed9583569ad49f12da416d6f))
116
+
117
+ # [2.5.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.4.0...v2.5.0) (2022-12-01)
118
+
119
+
120
+ ### Features
121
+
122
+ * **ingestor-api:** Add flag to enable requester pays ([efc160d](https://github.com/developmentseed/cdk-pgstac/commit/efc160d3530a70d1fc8f88ef9dce4a4d48456834))
123
+
124
+ # [2.4.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.3.1...v2.4.0) (2022-11-08)
125
+
126
+
127
+ ### Features
128
+
129
+ * **bastion-host:** Append ec2 instance with 'bastion host' ([4ee8599](https://github.com/developmentseed/cdk-pgstac/commit/4ee8599b5e03799152e07df935be047821554a32))
130
+
131
+ ## [2.3.1](https://github.com/developmentseed/cdk-pgstac/compare/v2.3.0...v2.3.1) (2022-11-08)
132
+
133
+
134
+ ### Bug Fixes
135
+
136
+ * **bastion-host:** `createElasticIp` default to true ([ec99fad](https://github.com/developmentseed/cdk-pgstac/commit/ec99fad9d3606f4ca572229e82d992f3295f9045))
137
+
138
+ # [2.3.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.2.1...v2.3.0) (2022-11-08)
139
+
140
+
141
+ ### Features
142
+
143
+ * **bastion-host:** Make elastic IP optional ([d77b578](https://github.com/developmentseed/cdk-pgstac/commit/d77b578df0a713a993bfa81709485df7fbc423c3))
144
+
145
+ ## [2.2.1](https://github.com/developmentseed/cdk-pgstac/compare/v2.2.0...v2.2.1) (2022-11-04)
146
+
147
+
148
+ ### Bug Fixes
149
+
150
+ * **stac-db:** Report shared buffers in 8kb units ([d34f2cd](https://github.com/developmentseed/cdk-pgstac/commit/d34f2cd1a833438ffa4e24f062cf16901f8d5584))
151
+
152
+ # [2.2.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.1.0...v2.2.0) (2022-11-03)
153
+
154
+
155
+ ### Features
156
+
157
+ * **stac-db:** Provide sensible defaults for pgSTAC db parameters ([#1](https://github.com/developmentseed/cdk-pgstac/issues/1)) ([11eb89e](https://github.com/developmentseed/cdk-pgstac/commit/11eb89e45c8a6d4a5b07134b8957a1298f9305c8))
158
+
159
+ # [2.1.0](https://github.com/developmentseed/cdk-pgstac/compare/v2.0.0...v2.1.0) (2022-11-01)
160
+
161
+
162
+ ### Features
163
+
164
+ * **ingestor-api:** Make apiEnv optional ([5841734](https://github.com/developmentseed/cdk-pgstac/commit/584173458e35a69cd7bc398acd3482dd21c58228))
165
+
166
+ # [2.0.0](https://github.com/developmentseed/cdk-pgstac/compare/v1.3.0...v2.0.0) (2022-11-01)
167
+
168
+
169
+ ### chore
170
+
171
+ * **ci:** bump version ([d10c5b2](https://github.com/developmentseed/cdk-pgstac/commit/d10c5b2afcd7e38effedb5181a1ed7595b03495f))
172
+
173
+
174
+ ### BREAKING CHANGES
175
+
176
+ * **ci:** Experiencing issues publishing GitHub releases
177
+ due to past deleted release. Bumping codebase to 2.0.0 to avoid
178
+ future issues.
179
+
180
+ # [1.3.0](https://github.com/developmentseed/cdk-pgstac/compare/v1.2.0...v1.3.0) (2022-11-01)
181
+
182
+
183
+ ### Features
184
+
185
+ * **ingestor-api:** add StacIngestor construct ([d34c6cd](https://github.com/developmentseed/cdk-pgstac/commit/d34c6cdd2c0df838467289a19c2b96adf1c0777e))
186
+ * **stac-api:** export API url from pgStacApi construct ([261dbd2](https://github.com/developmentseed/cdk-pgstac/commit/261dbd2bb85ad895f61922740d211fa8b96c3761))
187
+
188
+ # [1.2.0](https://github.com/developmentseed/cdk-pgstac/compare/v1.1.0...v1.2.0) (2022-10-26)
189
+
190
+
191
+ ### Features
192
+
193
+ * add bastion host ([de52ad7](https://github.com/developmentseed/cdk-pgstac/commit/de52ad76a2098c85cb4eef6aa0445fcbbea2e618))
194
+ * add PgStacApiLambda ([a092a7a](https://github.com/developmentseed/cdk-pgstac/commit/a092a7aee26ac39210fb7ce7023a09905823500c))
195
+ * Support customizing bootstrap args ([a23356f](https://github.com/developmentseed/cdk-pgstac/commit/a23356f195db8353f08ac0e1fa278e68b5876817))
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # eoAPI CDK Constructs
2
+
3
+ eoapi-cdk is a package of [AWS CDK constructs](https://docs.aws.amazon.com/prescriptive-guidance/latest/best-practices-cdk-typescript-iac/constructs-best-practices.html) designed to encapsulate eoAPI services and best practices as simple reusable components.
4
+
5
+
6
+ For more background on the included services see [The Earth Observation API](https://eoapi.dev/)
7
+
8
+ ## Included constructs
9
+ Detailed API docs for the constructs can be found [here](https://developmentseed.org/eoapi-cdk/).
10
+
11
+ ### [pgSTAC Database](https://developmentseed.org/eoapi-cdk/#pgstacdatabase-)
12
+ An [RDS](https://aws.amazon.com/rds/) instance with [pgSTAC](https://github.com/stac-utils/pgstac) installed and the Postgres parameters optimized for the selected instance type.
13
+
14
+ ### [STAC API](https://developmentseed.org/eoapi-cdk/#pgstacapilambda-)
15
+ A STAC API implementation using [stac-fastapi](https://github.com/stac-utils/stac-fastapi) with a [pgSTAC backend](https://github.com/stac-utils/stac-fastapi-pgstac). Packaged as a complete runtime for deployment with API Gateway and Lambda.
16
+
17
+ ### [pgSTAC Titiler API](https://developmentseed.org/eoapi-cdk/#titilerpgstacapilambda-)
18
+ A complete dynamic tiling API using [titiler-pgstac](https://github.com/stac-utils/titiler-pgstac) to create dynamic mosaics of assets based on [STAC Search queries](https://github.com/radiantearth/stac-api-spec/tree/master/item-search). Packaged as a complete runtime for deployment with API Gateway and Lambda and fully integrated with the pgSTAC Database construct.
19
+
20
+ ### [STAC Ingestor](https://developmentseed.org/eoapi-cdk/#stacingestor-)
21
+ An API for large scale STAC data ingestion and validation into a pgSTAC instance.
22
+
23
+ ![ingestor](/diagrams/ingestor_diagram.png)
24
+
25
+ Authentication for the STAC Ingestor API can be configured with JWTs authenticated by JWKS. To learn more about securing FastAPI applications with this approach see [Securing FastAPI with JWKS (AWS Cognito, Auth0)](https://alukach.com/posts/fastapi-rs256-jwt/).
26
+
27
+ A sample Cognito-based authentication system is available at [aws-asdi-auth](https://github.com/developmentseed/aws-asdi-auth).
28
+
29
+ ### [Bastion Host](https://developmentseed.org/eoapi-cdk/#bastionhost-)
30
+ A bastion host is a secure gateway that provides access to resources in a private subnet. In this case it provides the ability to make administrative connections to eoAPI's pgSTAC instance.
31
+
32
+ ![Alt text](/diagrams/bastion_diagram.png)
33
+
34
+ For more background on bastion hosts in AWS see [this article](https://dev.to/aws-builders/bastion-host-in-aws-vpc-2i63).
35
+
36
+ And for configuration instructions for this construct see [the docs](https://developmentseed.org/eoapi-cdk/#bastionhost-).
37
+
38
+
39
+ ## Published Packages
40
+
41
+ - https://pypi.org/project/eoapi-cdk/
42
+ - https://www.npmjs.com/package/eoapi-cdk/
43
+
44
+ ## Release
45
+
46
+ Versioning is automatically handled via [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [Semantic Release](https://semantic-release.gitbook.io/semantic-release/).
47
+
48
+ _Warning_: If you rebase `main`, you must ensure that the commits referenced by tags point to commits that are within the `main` branch. If a commit references a commit that is no longer on the `main` branch, Semantic Release will fail to detect the correct version of the project. [More information](https://github.com/semantic-release/semantic-release/issues/1121#issuecomment-517945233).
49
+
50
+