# {Viewer,Origin} {Request,Response} events on CloudFront

**URL:** <https://forum.serverless.com/t/viewer-origin-request-response-events-on-cloudfront/1163>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 24, 2017, 6:30am UTC](https://forum.serverless.com/t/viewer-origin-request-response-events-on-cloudfront/1163 "2017-01-24T06:30:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendry](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/hendry/32/343_2.png) [@hendry](https://forum.serverless.com/u/hendry)\
**Post date:** [January 24, 2017, 6:30am UTC](https://forum.serverless.com/t/viewer-origin-request-response-events-on-cloudfront/1163/1 "2017-01-24T06:30:29Z")

</div>

Hi there,

I’ve noticed Lambda Function Associations in my Cloudfront’s console under Edit Behavior.

Are there any serverless examples of what can be done with this? I am wondering if I can for e.g. redirect [www.example.com](http://www.example.com) to [example.com](http://example.com). “www to naked domain” without going the S3 Website and another CF distribution rigamarole.

Thanks!
