Source:
<code>public AnalystWorker(Properties config, TransportNetworkCache cache) { LOG.info("Analyst worker starting at {}", machineId, LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME)); workOffline = Boolean.parseBoolean(config.getProperty("work-offline", "false")); if (workOffline) { LOG.info("Working offline. Avoiding internet connections and hosted services."); } String statsQueue = config.getProperty("statistics-queue"); if (workOffline || statsQueue == null) { this.taskStatisticsStore = s -> { }; } else { this.taskStatisticsStore = new SQSTaskStatisticsStore(statsQueue); } String addr = config.getProperty("broker-address"); String port = config.getProperty("broker-port"); if (addr != null) { if (port != null) { this.BROKER_BASE_URL = String.format("http://%s:%s", addr, port); } else { this.BROKER_BASE_URL = String.format("http://%s", addr); } } this.networkId = config.getProperty("initial-graph-id"); this.gridCache = new GridCache(config.getProperty("pointsets-bucket")); this.pointSetDatastore = new PointSetDatastore(10, null, false, config.getProperty("pointsets-bucket")); this.transportNetworkCache = cache; Boolean autoShutdown = Boolean.parseBoolean(config.getProperty("auto-shutdown")); this.autoShutdown = autoShutdown == null ? false : autoShutdown; startupTime = System.currentTimeMillis(); nextShutdownCheckTime = startupTime + 55 * 60 * 1000; ec2info = new EC2Info(); if (workOffline) { ec2info.region = Regions.EU_WEST_1.getName(); } else { ec2info.fetchMetadata(); } <START> s3 = new AmazonS3Client(); <END> }</code><technical_language>I added code set region s3 object modified default is set, default set running EC2 running offline (though need running offline)</technical_language>

Target:
public AnalystWorker(Properties config, TransportNetworkCache cache) { LOG.info("Analyst worker starting at {}", machineId, LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME)); workOffline = Boolean.parseBoolean(config.getProperty("work-offline", "false")); if (workOffline) { LOG.info("Working offline. Avoiding internet connections and hosted services."); } String statsQueue = config.getProperty("statistics-queue"); if (workOffline || statsQueue == null) { this.taskStatisticsStore = s -> { }; } else { this.taskStatisticsStore = new SQSTaskStatisticsStore(statsQueue); } String addr = config.getProperty("broker-address"); String port = config.getProperty("broker-port"); if (addr != null) { if (port != null) { this.BROKER_BASE_URL = String.format("http://%s:%s", addr, port); } else { this.BROKER_BASE_URL = String.format("http://%s", addr); } } this.networkId = config.getProperty("initial-graph-id"); this.gridCache = new GridCache(config.getProperty("pointsets-bucket")); this.pointSetDatastore = new PointSetDatastore(10, null, false, config.getProperty("pointsets-bucket")); this.transportNetworkCache = cache; Boolean autoShutdown = Boolean.parseBoolean(config.getProperty("auto-shutdown")); this.autoShutdown = autoShutdown == null ? false : autoShutdown; startupTime = System.currentTimeMillis(); nextShutdownCheckTime = startupTime + 55 * 60 * 1000; ec2info = new EC2Info(); if (!workOffline) { ec2info.fetchMetadata(); } if (ec2info.region == null) { ec2info.region = Regions.EU_WEST_1.getName(); } s3 = new AmazonS3Client(); s3.setRegion(Region.getRegion(Regions.fromName(ec2info.region))); }