sst 2.8.6 → 2.8.7
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/constructs/SsrSite.js +3 -2
- package/package.json +1 -1
package/constructs/SsrSite.js
CHANGED
|
@@ -8,7 +8,7 @@ import { execSync } from "child_process";
|
|
|
8
8
|
import { Construct } from "constructs";
|
|
9
9
|
import { Fn, Token, Duration as CdkDuration, RemovalPolicy, CustomResource, } from "aws-cdk-lib";
|
|
10
10
|
import { BlockPublicAccess, Bucket, } from "aws-cdk-lib/aws-s3";
|
|
11
|
-
import { Role, Effect, Policy, PolicyStatement,
|
|
11
|
+
import { Role, Effect, Policy, PolicyStatement, AccountPrincipal, } from "aws-cdk-lib/aws-iam";
|
|
12
12
|
import { Function as CdkFunction, Code, Runtime, FunctionUrlAuthType, } from "aws-cdk-lib/aws-lambda";
|
|
13
13
|
import { HostedZone, ARecord, AaaaRecord, RecordTarget, } from "aws-cdk-lib/aws-route53";
|
|
14
14
|
import { Asset } from "aws-cdk-lib/aws-s3-assets";
|
|
@@ -430,8 +430,9 @@ export class SsrSite extends Construct {
|
|
|
430
430
|
}
|
|
431
431
|
createFunctionForDev() {
|
|
432
432
|
const { runtime, timeout, memorySize, permissions, environment, bind } = this.props;
|
|
433
|
+
const app = this.node.root;
|
|
433
434
|
const role = new Role(this, "ServerFunctionRole", {
|
|
434
|
-
assumedBy: new
|
|
435
|
+
assumedBy: new AccountPrincipal(app.account),
|
|
435
436
|
maxSessionDuration: CdkDuration.hours(12),
|
|
436
437
|
});
|
|
437
438
|
const ssrFn = new SsrFunction(this, `ServerFunction`, {
|