Skip to content

Instantly share code, notes, and snippets.

@ivanobulo
Created June 21, 2019 18:40
Show Gist options
  • Save ivanobulo/4484e923c1ab7bbcf196867224356022 to your computer and use it in GitHub Desktop.
Save ivanobulo/4484e923c1ab7bbcf196867224356022 to your computer and use it in GitHub Desktop.
import scala.sys.process._
lazy val ecrCallerId = settingKey[String]("AWS caller ID")
ecrCallerId in ThisBuild := {
val os = new java.io.ByteArrayOutputStream
("aws sts get-caller-identity --output text" #> os).!
os.close()
val output = os.toString.trim
output.takeWhile(_ != '\t')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment