# Template replaces all instances of Service

**URL:** <https://forum.serverless.com/t/template-replaces-all-instances-of-service/8247>\
**Category:** Serverless Framework\
**Created:** [May 13, 2019, 5:03pm UTC](https://forum.serverless.com/t/template-replaces-all-instances-of-service/8247 "2019-05-13T17:03:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shunyun-bp](https://avatars.discourse-cdn.com/v4/letter/s/b3f665/32.png) [@shunyun-bp](https://forum.serverless.com/u/shunyun-bp)\
**Post date:** [May 13, 2019, 5:03pm UTC](https://forum.serverless.com/t/template-replaces-all-instances-of-service/8247/1 "2019-05-13T17:03:49Z")

</div>

When I create a new service using a template, Serverless uses the service name to name the service but it also replaces every instance of “service” in the serverless.yml.

So if I create a new service named test12345, I get this (good):  
service: test12345

But I’m using a template which includes an S3 bucket policy,  
which includes  
PolicyDocument:  
Statement:  
- Principal:  
Service: “[ses.amazonaws.com](http://ses.amazonaws.com)”  
Problem is, the template replaces this with  
PolicyDocument:  
Statement:  
- Principal:  
service: test12345

So this seems to be a bug in the template function. Or not? Is there any way for me to get around this?
