thousands-window-76079
04/10/2024, 8:02 PMpublish:true
- everything is deploying just fine, but I am not seeing any Lambda TRigger created for CloudFront, and it seems my lambdas are not being deployed to Lamda@Edge
Is this really all that is required?
In my CF distribution
defaultCacheBehavior: {
targetOriginId: contentBucket.arn,
allowedMethods: ['GET', 'HEAD', 'OPTIONS'],
cachedMethods: ['GET', 'HEAD', 'OPTIONS'],
viewerProtocolPolicy: 'https-only',
forwardedValues: {
cookies: { forward: 'none' },
queryString: false,
},
lambdaFunctionAssociations: [
{
eventType: 'origin-request',
lambdaArn: blueGreenLambdaOriginArn,
},
],
minTtl: 0,
defaultTtl: tenMinutes,
maxTtl: tenMinutes,
},
And I am creating my lambdas as follows (leaving out a lambda for brevity)
const origin = archive.getFile({
type: 'zip',
sourceFile: 'blue-green-lambda-origin.js',
outputPath: 'blue-green-lambda-origin.zip',
});
const blueGreenOriginLambda = new aws.lambda.Function(
'blue-green-lambda-origin',
{
code: new pulumi.asset.FileArchive('blue-green-lambda-origin.zip'),
name: 'cloudfront-blue-green-lambda-origin',
publish: true,
role: iamForLambda.arn,
handler: 'blue-green-lambda-origin.handler',
sourceCodeHash: origin.then((lambda) => lambda.outputBase64sha256),
runtime: aws.lambda.Runtime.NodeJS18dX,
},
{
provider: eastRegion,
}
);
I can see my lambdas exist
As do the appropriate lambda associations on CF
But the "Triggers" section in my lambdas is empty, and from what I understand this is required to actually deploy the lambda to edge??
Thanks in advance for any suggestions/ helpthousands-window-76079
04/10/2024, 8:30 PM