A two-dimensional array of sub-micrometer silver cavities was fabricated by templating of the periodicallyassembled polystyrene particles via chemical deposition of silver metal. The Raman scattering of the moleculesadsorbed inside the cavities can be greatly enhanced, probably due to the effective coupling of the light withthe cavity array structure. The cavities were employed as a host for the controllable assembly of the silvernanoparticles. The assembly of the silver nanoparticles inside the cavities resulted in further enhancement ofthe Raman scattering of the adsorbed molecules.