Chili powder is not the same as cayenne pepper, but can be used as an adequate substitute since it is made from ground dried chili peppers. The composition of chili peppers is quite different from cayenne pepper so it might give a slightly different flavor. Additionally, chili powder is not as hot as cayenne so you might need to add a little more to achieve the appropriate heat level.