Lambda@Edge using existing CloudFront Distribuition

Hi, how can I deploy an AWS Lambda to an existing CloudFront Distribution using Serverless? Any way I can reference that distribution with its ID in serverless.yml?


Have you found anything related to this? I’m facing this issue too :confused:

Nope, nothing. I’m thinking of doing the deploy to the CFD using AWS CLI.

Hi, take a look at here Lambda@Edge with an existing cloudfront distirbution

Can we do this without using any plugin?
Like I can provide my existing distribution ID and domain name in the serverless.yml file and after successful deployment of lambda edge function, serverless will automatically update the cloud front with latest version of lambda edge?

I have checked that plugin.
We can’t use the existing cloud front distribution. It only works with the new distribution.

This plugin does what is needed:

1 Like