Why does OpenShift 4.x IPI installation fails on AWS with IMDSv2 SCP enforcement: "UnauthorizedOperation: ec2:RunInstances"?
Issue
-
When attempting to install an
OpenShift 4.xcluster onAWSusing theIPImethod, the installation fails with the followingerror:failed to create AWSMachine instance: failed to run instance: UnauthorizedOperation: You are not authorized to perform this operation. is not authorized to perform: ec2:RunInstances on resource: arn:aws:ec2:*:*:instance /* with an explicit deny in a service control policy. - How to
enforce IMDSv2in AWS while installing anOpenShift 4.xcluster onAWSusing theinstaller-provisioned infrastructure (IPI)method? - When deploying an
OpenShift 4.xcluster onAWSusing theIPImethod, the installation fails due to aService Control Policy (SCP)that enforcesIMDSv2 (Instance Metadata Service v2); how to fix this? - How can we
configuretheinstallationor themanifests YAMLfile so that the installer creates EC2control plane,bootstrap, andworkers nodeswith the parameterIMDSv2 = required? - Why does
openshift-install create clusterfail with"UnauthorizedOperation"andec2:RunInstanceswhenIMDSv2 is enforced via SCP?
Environment
- Red Hat® OpenShift Container Platform 4.x
- Installer-provisioned infrastructure (IPI)
- AWS Cloud Platform
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.