@pattform/api-kit 2.6.2 → 2.6.4

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.
@@ -46,6 +46,5 @@ export interface FormComponentArgs {
46
46
  brevoApiKey?: pulumi.Input<string>;
47
47
  turnstileSiteKey?: pulumi.Input<string>;
48
48
  turnstileSecret?: pulumi.Input<string>;
49
- alarmEmail?: string;
50
49
  reservedConcurrency?: number;
51
50
  }
@@ -127,31 +127,15 @@ class FormComponent extends pulumi.ComponentResource {
127
127
  provider: awsProvider,
128
128
  parent: this,
129
129
  });
130
- const alarmTopic = new aws.sns.Topic(`${baseName}-alarms-${env}`, {}, {
131
- provider: awsProvider,
132
- parent: this,
133
- });
134
- // The email subscription must be confirmed once from the inbox.
135
- new aws.sns.TopicSubscription(`${baseName}-alarm-email-${env}`, {
136
- topic: alarmTopic.arn,
137
- protocol: "email",
138
- endpoint: args.alarmEmail || "contact@pattform.io",
139
- }, {
140
- provider: awsProvider,
141
- parent: this,
142
- });
143
- new aws.cloudwatch.MetricAlarm(`${baseName}-errors-${env}`, {
144
- namespace: "AWS/Lambda",
145
- metricName: "Errors",
146
- dimensions: { FunctionName: this.lambda.name },
147
- statistic: "Sum",
148
- period: 300,
149
- evaluationPeriods: 1,
150
- comparisonOperator: "GreaterThanOrEqualToThreshold",
151
- threshold: 1,
152
- treatMissingData: "notBreaching",
153
- alarmDescription: `Form endpoint ${baseName} is returning errors`,
154
- alarmActions: [alarmTopic.arn],
130
+ // A Function URL with AuthType NONE is still private until a
131
+ // resource-based policy grants public invoke. The AWS Console adds this
132
+ // automatically; created via IaC it must be declared explicitly, or
133
+ // every browser POST is rejected with 403 Forbidden.
134
+ new aws.lambda.Permission(`${baseName}-url-public-${env}`, {
135
+ action: "lambda:InvokeFunctionUrl",
136
+ function: this.lambda.name,
137
+ principal: "*",
138
+ functionUrlAuthType: "NONE",
155
139
  }, {
156
140
  provider: awsProvider,
157
141
  parent: this,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pattform/api-kit",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "Pulumi infra library for building and deploying an API",
5
5
  "author": "Pattform <contact@pattform.io>",
6
6
  "license": "SEE LICENSE IN LICENSE",