# Define domain for Lambda / API Gateway in serverless.yml, without addtl plugins

**URL:** <https://forum.serverless.com/t/define-domain-for-lambda-api-gateway-in-serverless-yml-without-addtl-plugins/12881>\
**Category:** Serverless Framework\
**Tags:** lambda, api-gateway\
**Created:** [October 16, 2020, 3:06pm UTC](https://forum.serverless.com/t/define-domain-for-lambda-api-gateway-in-serverless-yml-without-addtl-plugins/12881 "2020-10-16T15:06:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie-s](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/charlie-s/32/4626_2.png) [@charlie-s](https://forum.serverless.com/u/charlie-s)\
**Post date:** [October 16, 2020, 3:06pm UTC](https://forum.serverless.com/t/define-domain-for-lambda-api-gateway-in-serverless-yml-without-addtl-plugins/12881/1 "2020-10-16T15:06:42Z")

</div>

I’m used to pure Cloudformation templates, where I could configure a domain/ACM and attach it to a Lambda like so:

```auto
Parameters:
  DomainName:
    Type: String
Resources:
  DomainACM:
    Type: AWS::CertificateManager::Certificate
    Properties:
      DomainName: !Ref DomainName
      ValidationMethod: DNS
  Lambda:
    ...
  CloudFrontDistribution:
    ...cloudfront config, including domain and lambda ref...

```

In Serverless, I can easily create the domain in ACM and thus reference it elsewhere:

```auto
resources:
  Resources:
    domain:
      Type: AWS::CertificateManager::Certificate
      Properties:
        DomainName: ${env:DOMAIN}
        ValidationMethod: DNS

```

but how can I define the few properties on the Lambda function that I would need to in order to tie it all together? Adding another plugin (serverless-domain-manager) seems unnecessary, as the configuration is normally just a few YAML properties. Is there a way I can specify the API Gateway properties for my Lambda right in serverless.yml?
