numerous-battery-89069
04/17/2024, 4:16 AMlambda
has been added to the OriginAccessControlOriginType
in CloudFormation, as well as in the Cloud Control API. However, when I try to create an aws.cloudfront.OriginAccessControl
with originAccessControlOriginType
of lambda
I get this error:
error: aws:cloudfront/originAccessControl:OriginAccessControl resource 'functionOac' has a problem: expected origin_access_control_origin_type to be one of ["s3" "mediastore"], got lambda. Examine values at 'functionOac.originAccessControlOriginType'.
Is this a known thing? I'll post more of my setup in the thread.numerous-battery-89069
04/17/2024, 4:16 AMconst originAccessControl = new aws.cloudfront.OriginAccessControl("functionOac", {
name: "functionOac",
description: "OAC for Function URL",
signingBehavior: "always",
signingProtocol: "sigv4",
originAccessControlOriginType: "lambda"
});
numerous-battery-89069
04/17/2024, 4:19 AMconst distribution = new aws.cloudfront.Distribution("SnapStartDistribution", {
enabled: true,
defaultCacheBehavior: {
allowedMethods: ["GET", "HEAD"],
cachedMethods: ["GET", "HEAD"],
targetOriginId: funcUrl.id,
viewerProtocolPolicy: "redirect-to-https",
defaultTtl: 600,
maxTtl: 86400,
minTtl: 0,
forwardedValues: {
queryString: false,
cookies: { forward: "none" },
},
},
origins: [{
domainName: funcUrl.functionUrl,
originAccessControlId: originAccessControl.id,
originId: funcUrl.id,
}],
restrictions: {
geoRestriction: {
restrictionType: "whitelist",
locations: [
"US",
"CA",
"GB",
"DE",
],
},
},
viewerCertificate: {
cloudfrontDefaultCertificate: true,
}
});
I have a feeling the distribution
above is probably wrong, but I'm getting the error on the OriginAccessControl
.rhythmic-accountant-71070
04/17/2024, 6:35 AMgreat-sunset-355
04/17/2024, 11:30 AMaws-native
client ... aws-native client is at least 20% slower than classic aws provider due to cloudformation slownessnumerous-battery-89069
04/17/2024, 1:08 PMnumerous-battery-89069
04/17/2024, 1:47 PMlambda
and mediapackagev2
as valid values for origin_access_control_origin_type