# Associating aws web acl with cloudfront

**URL:** <https://forum.serverless.com/t/associating-aws-web-acl-with-cloudfront/16245>\
**Category:** Serverless Framework\
**Created:** [November 12, 2021, 8:30am UTC](https://forum.serverless.com/t/associating-aws-web-acl-with-cloudfront/16245 "2021-11-12T08:30:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranav](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@pranav](https://forum.serverless.com/u/pranav)\
**Post date:** [November 12, 2021, 8:30am UTC](https://forum.serverless.com/t/associating-aws-web-acl-with-cloudfront/16245/1 "2021-11-12T08:30:33Z")

</div>

I want to associate web acl with cloudfront. for that i have added this code to cloufront distribution -

```auto
DistributionConfig:
              WebACLId:  
                Ref: MyWaf

```

Unfortunately this isnt working and i am getting this error at Cloudformation -

> Resource handler returned message: "Invalid request provided: Invalid webACL identifier provided

how exactly can i associate aws waf with cloudfront ?
