  The Atiyah-Patodi-Singer(APS) index theorem attracts attention for
understanding physics on the surface of materials in topological phases. The
mathematical set-up for this theorem is, however, not directly related to the
physical fermion system, as it imposes on the fermion fields a non-local
boundary condition known as the "APS boundary condition" by hand, which is
unlikely to be realized in the materials. In this work, we attempt to
reformulate the APS index in a "physicist-friendly" way for a simple set-up
with $U(1)$ or $SU(N)$ gauge group on a flat four-dimensional Euclidean space.
We find that the same index as APS is obtained from the domain-wall fermion
Dirac operator with a local boundary condition, which is naturally given by the
kink structure in the mass term. As the boundary condition does not depend on
the gauge fields, our new definition of the index is easy to compute with the
standard Fujikawa method.
