I’m used to pure Cloudformation templates, where I could configure a domain/ACM and attach it to a Lambda like so:
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:
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?