The AMP framework does not allow iframes from the same subdomain where the AMP page itself exists. Due to this restriction, your iframe page must be hosted on a separate subdomain.
Example
For example, if your AMP framework is hosted on amp.example.com, make sure you host your iframe page on a separate subdomain such as ampmetrics.example.com or similar.