@exabugs/dynamodb-client 0.7.0 → 0.7.2
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.
- package/CHANGELOG.md +17 -0
- package/dist/server/handler.cjs +2 -2
- package/package.json +1 -1
- package/terraform/main.tf +1 -1
- package/terraform/modules/parameter-store/main.tf +30 -24
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.2] - 2024-12-28
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Parameter Store**: Added overwrite=true to all SSM parameters to handle existing parameters
|
|
15
|
+
- Prevents ParameterAlreadyExists errors during Terraform apply
|
|
16
|
+
- Allows updating existing Parameter Store values without manual deletion
|
|
17
|
+
|
|
18
|
+
## [0.7.1] - 2024-12-28
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **CORS**: Removed OPTIONS method from allowMethods to comply with AWS Lambda Function URL constraints
|
|
23
|
+
- AWS Lambda Function URL has a 6-character limit per method name
|
|
24
|
+
- OPTIONS (7 characters) exceeded this limit causing ValidationException
|
|
25
|
+
- Preflight OPTIONS requests are handled automatically by Lambda Function URL
|
|
26
|
+
|
|
10
27
|
## [0.7.0] - 2024-12-28
|
|
11
28
|
|
|
12
29
|
### Added
|
package/dist/server/handler.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exabugs/dynamodb-client",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "DynamoDB Single-Table Client SDK with MongoDB-like API, Shadow Records, and Lambda implementation for serverless applications",
|
|
5
5
|
"author": "exabugs",
|
|
6
6
|
"license": "MIT",
|
package/terraform/main.tf
CHANGED
|
@@ -169,7 +169,7 @@ resource "aws_lambda_function_url" "records" {
|
|
|
169
169
|
# CORS設定
|
|
170
170
|
cors {
|
|
171
171
|
allow_origins = ["*"]
|
|
172
|
-
allow_methods = ["GET", "POST", "PUT", "DELETE"
|
|
172
|
+
allow_methods = ["GET", "POST", "PUT", "DELETE"]
|
|
173
173
|
allow_headers = ["content-type", "authorization", "x-amz-date", "x-api-key", "x-amz-security-token"]
|
|
174
174
|
expose_headers = ["content-type", "x-amzn-requestid"]
|
|
175
175
|
allow_credentials = false
|
|
@@ -10,10 +10,11 @@ locals {
|
|
|
10
10
|
|
|
11
11
|
# Records Lambda Function URL (外部参照用)
|
|
12
12
|
resource "aws_ssm_parameter" "app_records_api_url" {
|
|
13
|
-
name
|
|
14
|
-
type
|
|
15
|
-
tier
|
|
16
|
-
value
|
|
13
|
+
name = "/${var.project_name}/${var.environment}/app/records-api-url"
|
|
14
|
+
type = local.parameter_type
|
|
15
|
+
tier = local.parameter_tier
|
|
16
|
+
value = var.records_function_url
|
|
17
|
+
overwrite = true
|
|
17
18
|
|
|
18
19
|
description = "Records Lambda Function URL"
|
|
19
20
|
|
|
@@ -26,10 +27,11 @@ resource "aws_ssm_parameter" "app_records_api_url" {
|
|
|
26
27
|
|
|
27
28
|
# Records Lambda Function ARN (外部参照用)
|
|
28
29
|
resource "aws_ssm_parameter" "lambda_records_function_arn" {
|
|
29
|
-
name
|
|
30
|
-
type
|
|
31
|
-
tier
|
|
32
|
-
value
|
|
30
|
+
name = "/${var.project_name}/${var.environment}/lambda/records-function-arn"
|
|
31
|
+
type = local.parameter_type
|
|
32
|
+
tier = local.parameter_tier
|
|
33
|
+
value = var.records_function_arn
|
|
34
|
+
overwrite = true
|
|
33
35
|
|
|
34
36
|
description = "Records Lambda Function ARN"
|
|
35
37
|
|
|
@@ -45,10 +47,11 @@ resource "aws_ssm_parameter" "lambda_records_function_arn" {
|
|
|
45
47
|
|
|
46
48
|
# Cognito User Pool ID (Admin UI参照用)
|
|
47
49
|
resource "aws_ssm_parameter" "app_admin_ui_cognito_user_pool_id" {
|
|
48
|
-
name
|
|
49
|
-
type
|
|
50
|
-
tier
|
|
51
|
-
value
|
|
50
|
+
name = "/${var.project_name}/${var.environment}/app/admin-ui/cognito-user-pool-id"
|
|
51
|
+
type = local.parameter_type
|
|
52
|
+
tier = local.parameter_tier
|
|
53
|
+
value = var.cognito_user_pool_id
|
|
54
|
+
overwrite = true
|
|
52
55
|
|
|
53
56
|
description = "Cognito User Pool ID for Admin UI"
|
|
54
57
|
|
|
@@ -61,10 +64,11 @@ resource "aws_ssm_parameter" "app_admin_ui_cognito_user_pool_id" {
|
|
|
61
64
|
|
|
62
65
|
# Cognito Client ID (Admin UI参照用)
|
|
63
66
|
resource "aws_ssm_parameter" "app_admin_ui_cognito_client_id" {
|
|
64
|
-
name
|
|
65
|
-
type
|
|
66
|
-
tier
|
|
67
|
-
value
|
|
67
|
+
name = "/${var.project_name}/${var.environment}/app/admin-ui/cognito-client-id"
|
|
68
|
+
type = local.parameter_type
|
|
69
|
+
tier = local.parameter_tier
|
|
70
|
+
value = var.cognito_admin_ui_client_id
|
|
71
|
+
overwrite = true
|
|
68
72
|
|
|
69
73
|
description = "Cognito Client ID for Admin UI"
|
|
70
74
|
|
|
@@ -77,10 +81,11 @@ resource "aws_ssm_parameter" "app_admin_ui_cognito_client_id" {
|
|
|
77
81
|
|
|
78
82
|
# Cognito Domain (Admin UI参照用)
|
|
79
83
|
resource "aws_ssm_parameter" "app_admin_ui_cognito_domain" {
|
|
80
|
-
name
|
|
81
|
-
type
|
|
82
|
-
tier
|
|
83
|
-
value
|
|
84
|
+
name = "/${var.project_name}/${var.environment}/app/admin-ui/cognito-domain"
|
|
85
|
+
type = local.parameter_type
|
|
86
|
+
tier = local.parameter_tier
|
|
87
|
+
value = "${var.cognito_user_pool_domain}.auth.${var.region}.amazoncognito.com"
|
|
88
|
+
overwrite = true
|
|
84
89
|
|
|
85
90
|
description = "Cognito Domain for Admin UI"
|
|
86
91
|
|
|
@@ -93,10 +98,11 @@ resource "aws_ssm_parameter" "app_admin_ui_cognito_domain" {
|
|
|
93
98
|
|
|
94
99
|
# DynamoDB Table Name (外部参照用)
|
|
95
100
|
resource "aws_ssm_parameter" "infra_dynamodb_table_name" {
|
|
96
|
-
name
|
|
97
|
-
type
|
|
98
|
-
tier
|
|
99
|
-
value
|
|
101
|
+
name = "/${var.project_name}/${var.environment}/infra/dynamodb-table-name"
|
|
102
|
+
type = local.parameter_type
|
|
103
|
+
tier = local.parameter_tier
|
|
104
|
+
value = var.dynamodb_table_name
|
|
105
|
+
overwrite = true
|
|
100
106
|
|
|
101
107
|
description = "DynamoDB Table Name"
|
|
102
108
|
|