Due to web push and AMP restrictions, subscribing to web push notifications directly on an AMP page is not possible at this time.
This is because AMP web pages are served from https://google.com/amp/yoursite.com/…, and push subscription subscribe the user to the site’s domain, which is google.com, and not your site.
We’ve reached out to Google to push for an integration between web push and AMP pages. However, at this time, due to various browser restrictions, a direct integration support is not possible.
We recommend placing a button or link on your AMP page redirecting users to your non-AMP site, which will allow your users to be prompted for web push notifications.