/** * Return the latest available DB snapshot for a given RDS DB instance * identifier. * * @param string $instanceIdentifier Identifier of the DB instance to get * the snapshot identifier for. * @return string Latest snapshot identifier of the specified DB instance. */ public function getLatestRdsSnapshot($instanceIdentifier) { if (!strlen($instanceIdentifier)) { throw new InvalidArgumentException(sprintf('Instance identifier passed to "%s" must be a non-zero length string', __FUNCTION__)); } $response = $this->rds->describeDBSnapshots(['DBInstanceIdentifier' => $instanceIdentifier]); return $this->getLatestRdsSnapshotFromResponse($response); }