@pattform/api-kit 2.6.5 → 2.6.6
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/dist/FormComponent.js +17 -1
- package/package.json +1 -1
package/dist/FormComponent.js
CHANGED
|
@@ -126,6 +126,22 @@ class FormComponent extends pulumi.ComponentResource {
|
|
|
126
126
|
provider: awsProvider,
|
|
127
127
|
parent: this,
|
|
128
128
|
});
|
|
129
|
+
// Since October 2025, public NONE function URLs require BOTH
|
|
130
|
+
// lambda:InvokeFunctionUrl and lambda:InvokeFunction in the resource
|
|
131
|
+
// policy — with only the former, every invoke returns 403 Forbidden
|
|
132
|
+
// (AccessDeniedException) despite AuthType NONE. AWS's default policy
|
|
133
|
+
// scopes this with a lambda:InvokedViaFunctionUrl=true condition, which
|
|
134
|
+
// aws.lambda.Permission can't express; omitting it is safe here because
|
|
135
|
+
// anonymous callers can't reach the Invoke API and the handler validates
|
|
136
|
+
// every request (Turnstile + schema) regardless of invocation path.
|
|
137
|
+
const invokePermission = new aws.lambda.Permission(`${baseName}-invoke-public-${env}`, {
|
|
138
|
+
action: "lambda:InvokeFunction",
|
|
139
|
+
function: this.lambda.name,
|
|
140
|
+
principal: "*",
|
|
141
|
+
}, {
|
|
142
|
+
provider: awsProvider,
|
|
143
|
+
parent: this,
|
|
144
|
+
});
|
|
129
145
|
// Preflight OPTIONS requests are answered by the Function URL itself;
|
|
130
146
|
// only same-configured origins can read responses from the browser.
|
|
131
147
|
// deleteBeforeReplace: a function may have only one URL config, so a
|
|
@@ -142,7 +158,7 @@ class FormComponent extends pulumi.ComponentResource {
|
|
|
142
158
|
}, {
|
|
143
159
|
provider: awsProvider,
|
|
144
160
|
parent: this,
|
|
145
|
-
dependsOn: [urlPermission],
|
|
161
|
+
dependsOn: [urlPermission, invokePermission],
|
|
146
162
|
deleteBeforeReplace: true,
|
|
147
163
|
});
|
|
148
164
|
this.endpoint = this.functionUrl.functionUrl;
|