The volume of a rectangular prism is given by the formula:
\[ V_{\text{prism}} = \text{length} \times \text{width} \times \text{height} \]
For a rectangular pyramid, the volume is calculated using the formula:
\[ V_{\text{pyramid}} = \frac{1}{3} \times \text{base area} \times \text{height} \]
Since the base of the pyramid is congruent to the base of the prism and the height is the same for both shapes, we have:
\[ V_{\text{pyramid}} = \frac{1}{3} \times \text{length} \times \text{width} \times \text{height} \]
We know from the problem that the volume of the prism is 27 in³. Therefore, we can substitute this into the formula for the pyramid:
\[ V_{\text{pyramid}} = \frac{1}{3} \times V_{\text{prism}} \] \[ V_{\text{pyramid}} = \frac{1}{3} \times 27 \text{ in}^3 \] \[ V_{\text{pyramid}} = 9 \text{ in}^3 \]
Thus, the volume of the pyramid is \( \boxed{9} \) in³.