Associating aws web acl with cloudfront

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

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 ?