in src/main/scala/com/gu/ssm/aws/SSM.scala [38:47]
def getCommandInvocation(instance: InstanceId, commandId: String, client: AWSSimpleSystemsManagementAsync)(implicit ec: ExecutionContext): Attempt[Either[CommandStatus, CommandResult]] = {
val request = new GetCommandInvocationRequest()
.withCommandId(commandId)
.withInstanceId(instance.id)
handleAWSErrs(
awsToScala(client.getCommandInvocationAsync)(request)
.map(extractCommandResult)
.recover { case _:InvocationDoesNotExistException => Left(InvocationDoesNotExist) }
)
}