in core/src/main/scala/com/gu/AppIdentity.scala [119:130]
def whoAmI(
defaultAppName: String,
credentials: => AwsCredentialsProvider
): Try[AppIdentity] = {
val result = fromTeamcityEnvVariables(defaultAppName)
.orElse(fromLambdaEnvVariables()) match {
case Some(who) => Success(who)
case None => fromASGTags(credentials)
}
result.foreach(result => logger.info(s"Detected the following AppIdentity: $result"))
result
}