Supplement
"S" in S layer stands for "surface", thus S layer is essentially the surface layer surrounding the cells of different bacterial and archaean species.
The various functions of S layer are:
mechanical stabilization
resistance to low pH
protection from bacteriophages and phagocytic cells
adhesion site for exoproteins