Alternatively however, you could create a bulk upload, pull a
report of every keyword in the account (with campaign ID, ad group ID, and keyword ID as columns), iterate through each row, and one by one use the ids to look up the bid in your map and replace the bid in the row, pushing each into the bulk upload. At the end the script would push the bulk upload all at once.
In more detail, you'd create the upload with
newCsvUpload() (setting the column headers as appropriate), then set up a row iterator for the keyword report, and for each row:
var upload = AdWordsApp.bulkUploads().newCsvUpload(---column headers set up here---)
var report = AdWordsApp.report("SELECT CampaignId, AdGroupId, Id, CpcBid FROM KEYWORD_PERFORMANCE_REPORT"); // Something like this, I haven't tested this query
var reportIterator = report.rows();
while (reportIterator.hasNext()) {
row = rows.next();
row['CpcBid'] = map[row['CampaignId']][row['AdGroupId'][row['Id']["bid"];
upload.append(row.formatForUpload());
}
upload.apply; // or preview
The above code is psuedo-esque code (untested) but hopefully the concept makes sense.