Skip to content

Commit

Permalink
issue #32018 add integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanbarlog committed Nov 17, 2024
1 parent 28629c8 commit fe4ac96
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,25 @@ const fnUrl = fn.addFunctionUrl({
authType: lambda.FunctionUrlAuthType.NONE,
});

const oac = new cloudfront.CfnOriginAccessControl(
stack,
'HandlerOriginAccessControl',
{
originAccessControlConfig: {
name: 'sample',
originAccessControlOriginType: 'lambda',
signingBehavior: 'always',
signingProtocol: 'sigv4',
},
},
);

new cloudfront.Distribution(stack, 'Distribution', {
defaultBehavior: { origin: new origins.FunctionUrlOrigin(fnUrl) },
defaultBehavior: {
origin: new origins.FunctionUrlOrigin(fnUrl, {
originAccessControlId: oac.attrId,
}),
},
});

new IntegTest(app, 'rest-api-origin', {
Expand Down

0 comments on commit fe4ac96

Please sign in to comment.