diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js index e6c2290b2..a91da1c36 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RunMonkeyPage/RunOnAWS/AWSRunOptions.js @@ -32,11 +32,11 @@ const getContents = (props) => { }, []); function getIps() { - authComponent.authFetch('/api') + authComponent.authFetch('/api/island/ip-addresses') .then(res => res.json()) - .then(res => { - setAllIPs(res['ip_addresses']); - setSelectedIp(res['ip_addresses'][0]); + .then(ip_addresses => { + setAllIPs(ip_addresses); + setSelectedIp(ip_addresses[0]); }); }