def write_ip_config(self, ip_address):
    try:
        s3_client = self.get_client()
        data = {'IP': ip_address}
        json_blob = json.dumps(data)
        file_handle = io.BytesIO(json_blob.encode())
        file_handle_done = io.BytesIO(b'done')
        s3_client.upload_fileobj(file_handle, self.bucket, self.config_key)
        s3_client.upload_fileobj(file_handle_done, self.bucket, self.done_file_key)
    except botocore.exceptions.ClientError:
        log_and_exit('Write ip config failed to upload', SIMAPP_S3_DATA_STORE_EXCEPTION, SIMAPP_EVENT_ERROR_CODE_400)
    except Exception:
        log_and_exit('Write ip config failed to upload', SIMAPP_S3_DATA_STORE_EXCEPTION, SIMAPP_EVENT_ERROR_CODE_500)
def write_ip_config(self, ip_address):
    try:
        s3_client = self.get_client()
        data = {'IP': ip_address}
        json_blob = json.dumps(data)
        file_handle = io.BytesIO(json_blob.encode())
        file_handle_done = io.BytesIO(b'done')
        s3_client.upload_fileobj(file_handle, self.bucket, self.config_key)
        s3_client.upload_fileobj(file_handle_done, self.bucket, self.done_file_key)
    except botocore.exceptions.ClientError:
        log_and_exit('Write ip config failed to upload', SIMAPP_S3_DATA_STORE_EXCEPTION, SIMAPP_EVENT_ERROR_CODE_400)
    except Exception:
        log_and_exit('Write ip config failed to upload', SIMAPP_S3_DATA_STORE_EXCEPTION, SIMAPP_EVENT_ERROR_CODE_500)