Please Ensure that the Trusted entity is set up correctly.
The steps to verify or correct the trusted entities are:
1.Go to Service sin the AWS Console and select IAM Identity and Access Management
3. Select the Role associated with the CPM instance. and double click it,
4. Please click on the Trusts Tab. Click on Edit Trust Relationship.
5. The reason that the issue occured is the "The identity provider(s) ec2.amazonaws.com", trusted entity was missing, To correct the issue please add it the JSON file as shown below, then click on Update Trust relationship.
6. After adding the service as a trusted entity the screen sound the below screenshot.
7. For the best results stop and terminate the CPM instance and launch a new AMI and the installation should not get the above error.