diff --git a/monkey/monkey_island/cc/resources/remote_run.py b/monkey/monkey_island/cc/resources/remote_run.py index 101200868..b1b2d5f7b 100644 --- a/monkey/monkey_island/cc/resources/remote_run.py +++ b/monkey/monkey_island/cc/resources/remote_run.py @@ -1,6 +1,6 @@ import json -from botocore.exceptions import NoCredentialsError +from botocore.exceptions import NoCredentialsError, ClientError from flask import request, jsonify, make_response import flask_restful @@ -32,6 +32,10 @@ class RemoteRun(flask_restful.Resource): # Probably, role hasn't been defined. resp['error'] = e.message return jsonify(resp) + except ClientError as e: + # Probably, role doesn't allow SSM. + resp['error'] = e.message + return jsonify(resp) return jsonify(resp) return {} diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js index e9b2744a4..1fd721f43 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage.js @@ -473,10 +473,10 @@ class RunMonkeyPageComponent extends AuthComponent { { this.state.isErrorWhileCollectingAwsMachines ?
-

- Error while collecting AWS machine data. Error message: {this.state.awsMachineCollectionErrorMsg} - - Are you sure you've set the correct role? Not sure what this is? Not seeing your AWS EC2 instances? Read the documentation! +

+ Error while collecting AWS machine data. Error message: {this.state.awsMachineCollectionErrorMsg}
+ Are you sure you've set the correct role on your Island AWS machine?
+ Not sure what this is? Read the documentation!

: