Copilot has a setting for this, and they announced attribution a while ago:
https://github.blog/2022-11-01-preview-referencing-public-co...
It would be interesting if AWS actually does their attribution - how do they know which open source code was published in any public repo?