There are a few steps you'll need to take in order to configure an AWS role on an on-premise server.
First, you'll need to create an IAM role in the AWS console. To do this, go to the IAM dashboard and click on "Roles" in the left sidebar. Then, click the "Create role" button.
Next, you'll need to select a role type. For this example, we'll choose "EC2".
Now, you'll need to attach a policy to the role. This policy will grant the role the necessary permissions to access AWS resources. For this example, we'll attach the "AmazonEC2FullAccess" policy.
Next, you'll need to configure your on-premise server to assume the IAM role. To do this, you'll need to install the AWS CLI and configure the AWS credentials file on your server.
Once the AWS CLI is installed, you can run the following command to assume the IAM role:
aws sts assume-role --role-arn arn:aws:iam::123456789012:role/ExampleRole --role-session-name ExampleSession
Replace the role ARN and role session name with the values from your IAM role.
You should now be able to access AWS resources from your on-premise server using the IAM role.