Red*_*ter 5 aws-cloudformation aws-api-gateway
我正在尝试使用CloudFormation为API网关定义自定义域(实际上是子域)。根据所有文档,我已经能够找到以下内容,但是在部署它时,我得到Invalid domain name identifier specified
了BasePathMapping
aws cloudformation deploy --template-file packaged-prompt.yaml --capabilities CAPABILITY_IAM --stack-name prompt-stack
Run Code Online (Sandbox Code Playgroud)
提示
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Resources:
...
Certificate:
Type: 'AWS::CertificateManager::Certificate'
Properties:
DomainName: example.mydomain.com
DomainName:
Type: 'AWS::ApiGateway::DomainName'
Properties:
CertificateArn: !Ref Certificate
DomainName: example.mydomain.com
Mapping:
Type: 'AWS::ApiGateway::BasePathMapping'
Properties:
DomainName: !Ref DomainName
RestApiId: !Ref Api
Api:
Type: AWS::Serverless::Api
Properties:
StageName: prod
DefinitionBody:
swagger: 2.0
info:
title:
Ref: AWS::StackName
paths:
....
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3508 次 |
最近记录: |