question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CloudFront Functions definition from file

See original GitHub issue

CF2 definition from a file instead from inline code

Use Case

It allows to have a cleaner code instead of mixing everything in a single cdk file. It is also easier to read.

Proposed Solution

Could be something similair with what we have for Lambda:

const vreq_function = new cloudfront.Function(this, 'Function', {
      code: cloudfront.Function.Code.fromAsset('resources/my_function_code.js'),
 });

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
njlynchcommented, Jun 3, 2021

Thanks for continuing this work, @hoegertn ! I’m assigning the issue to you for tracking purposes.

1reaction
hoegertncommented, Jun 3, 2021

Yes, that is already planned and I am working on it. I just wanted to get the feature out asap.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customizing at the edge with CloudFront Functions
CloudFront Functions is a native feature of CloudFront, which means you can build, test, and deploy your code entirely within CloudFront.
Read more >
An Introduction To AWS CloudFront Functions
CloudFront Functions allow you to deploy serverless JavaScript functions to AWS' network of edge locations to be executed as close as ...
Read more >
Serverless Framework - AWS Lambda Events - CloudFront
Amazon CloudFront is a content delivery network (CDN) service that allows Lambda functions to be executed at edge locations. Distribution configuration contains ...
Read more >
AWS CloudFront Edge Functions
CloudFront Functions · is a CloudFront native feature (code is managed entirely within CloudFront) and visible only on the CloudFront dashboard.
Read more >
Writing function code (CloudFront Functions programming ...
When you create a function that generates an HTTP response, make sure to choose the viewer request event type. This means that the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found