@awsless/awsless 0.0.212 → 0.0.214

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 (2) hide show
  1. package/dist/bin.js +8 -3
  2. package/package.json +10 -10
package/dist/bin.js CHANGED
@@ -2122,11 +2122,12 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
2122
2122
  if ("stackConfig" in ctx) {
2123
2123
  lambda.addEnvironment("STACK", ctx.stackConfig.name);
2124
2124
  }
2125
- new aws2.lambda.EventInvokeConfig(group, "async", {
2125
+ const invokeConfig = new aws2.lambda.EventInvokeConfig(group, "async", {
2126
2126
  functionArn: lambda.arn,
2127
2127
  retryAttempts: props.retryAttempts,
2128
2128
  onFailure: getGlobalOnFailure(ctx)
2129
2129
  });
2130
+ invokeConfig.dependsOn(policy);
2130
2131
  if (hasOnFailure(ctx.stackConfigs)) {
2131
2132
  policy.addStatement({
2132
2133
  actions: ["sqs:SendMessage", "sqs:GetQueueUrl"],
@@ -2182,8 +2183,8 @@ var createLambdaFunction = (group, ctx, ns, id, local2) => {
2182
2183
  lambda.setVpc({
2183
2184
  securityGroupIds: [ctx.shared.get(`vpc-security-group-id`)],
2184
2185
  subnetIds: [
2185
- ctx.shared.get(`vpc-public-subnet-1`),
2186
- ctx.shared.get(`vpc-public-subnet-2`)
2186
+ ctx.shared.get(`vpc-public-subnet-id-1`),
2187
+ ctx.shared.get(`vpc-public-subnet-id-2`)
2187
2188
  ]
2188
2189
  });
2189
2190
  policy.addStatement({
@@ -2211,6 +2212,7 @@ var cronFeature = defineFeature({
2211
2212
  for (const [id, props] of Object.entries(ctx.stackConfig.crons ?? {})) {
2212
2213
  const group = new Node3(ctx.stack, "cron", id);
2213
2214
  const { lambda } = createLambdaFunction(group, ctx, this.name, id, props.consumer);
2215
+ lambda.addEnvironment("LOG_VIEWABLE_ERROR", "1");
2214
2216
  const rule = new aws3.events.Rule(group, "rule", {
2215
2217
  name: formatLocalResourceName(ctx.app.name, ctx.stack.name, this.name, id),
2216
2218
  schedule: props.schedule,
@@ -3104,6 +3106,7 @@ var queueFeature = defineFeature({
3104
3106
  ...props
3105
3107
  });
3106
3108
  const { lambda, policy } = createLambdaFunction(group, ctx, `queue`, id, props.consumer);
3109
+ lambda.addEnvironment("LOG_VIEWABLE_ERROR", "1");
3107
3110
  new aws9.lambda.EventSourceMapping(group, "event", {
3108
3111
  functionArn: lambda.arn,
3109
3112
  sourceArn: queue2.arn,
@@ -3203,6 +3206,7 @@ var tableFeature = defineFeature({
3203
3206
  });
3204
3207
  if (props.stream) {
3205
3208
  const { lambda, policy } = createLambdaFunction(group, ctx, "table", id, props.stream.consumer);
3209
+ lambda.addEnvironment("LOG_VIEWABLE_ERROR", "1");
3206
3210
  const onFailure = getGlobalOnFailure(ctx);
3207
3211
  const source = new aws11.lambda.EventSourceMapping(group, id, {
3208
3212
  functionArn: lambda.arn,
@@ -3306,6 +3310,7 @@ var topicFeature = defineFeature({
3306
3310
  });
3307
3311
  } else if (typeof props === "object") {
3308
3312
  const { lambda } = createLambdaFunction(group, ctx, `topic`, id, props);
3313
+ lambda.addEnvironment("LOG_VIEWABLE_ERROR", "1");
3309
3314
  new aws12.sns.Subscription(group, id, {
3310
3315
  topicArn,
3311
3316
  protocol: "lambda",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awsless/awsless",
3
- "version": "0.0.212",
3
+ "version": "0.0.214",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -29,14 +29,14 @@
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@awsless/lambda": "^0.0.18",
32
- "@awsless/redis": "^0.0.12",
33
32
  "@awsless/s3": "^0.0.10",
34
- "@awsless/open-search": "^0.0.12",
33
+ "@awsless/redis": "^0.0.12",
35
34
  "@awsless/sqs": "^0.0.7",
36
- "@awsless/ssm": "^0.0.7",
37
35
  "@awsless/sns": "^0.0.7",
38
- "@awsless/validate": "^0.0.13",
39
- "@awsless/weak-cache": "^0.0.1"
36
+ "@awsless/open-search": "^0.0.12",
37
+ "@awsless/ssm": "^0.0.7",
38
+ "@awsless/weak-cache": "^0.0.1",
39
+ "@awsless/validate": "^0.0.13"
40
40
  },
41
41
  "dependencies": {
42
42
  "@aws-appsync/utils": "^1.5.0",
@@ -97,12 +97,12 @@
97
97
  "wrap-ansi": "^8.1.0",
98
98
  "zod": "^3.21.4",
99
99
  "zod-to-json-schema": "^3.22.3",
100
- "@awsless/graphql": "^0.0.9",
100
+ "@awsless/code": "^0.0.10",
101
101
  "@awsless/duration": "^0.0.1",
102
- "@awsless/validate": "^0.0.13",
103
- "@awsless/formation": "^0.0.21",
104
102
  "@awsless/size": "^0.0.1",
105
- "@awsless/code": "^0.0.10"
103
+ "@awsless/formation": "^0.0.21",
104
+ "@awsless/validate": "^0.0.13",
105
+ "@awsless/graphql": "^0.0.9"
106
106
  },
107
107
  "scripts": {
108
108
  "test": "pnpm code test",