Last active
April 4, 2021 14:56
-
-
Save oshri-humanz/886b0c826ff7e383603fe5e0e83c8b2a to your computer and use it in GitHub Desktop.
AWS copy environment variables using js console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy from lambda | |
let str="";document.getElementsByClassName("awsui-table-row").forEach(e=>{str+=e.innerText.split("\t").join("=")+";"}); | |
let dummy=document.createElement("textarea"); | |
document.body.appendChild(dummy),dummy.value=str,dummy.select(),document.execCommand("copy"),document.body.removeChild(dummy); | |
// Copy from EBS | |
let str="";document.querySelectorAll('.properties-table tbody tr').forEach(e=>{ | |
let row = e.querySelectorAll('td input'); | |
if(row && row.length===2 && row[0].value!=='' && row[1].value!==''){ | |
str+=row[0].value +"=" + row[1].value + ";"}}); | |
let dummy=document.createElement("textarea"); | |
document.body.appendChild(dummy),dummy.value=str,dummy.select(),document.execCommand("copy"),document.body.removeChild(dummy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment