Aws api gateway Domain name

Posted 沧海一滴

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Aws api gateway Domain name相关的知识,希望对你有一定的参考价值。

 

技术分享

Set Up a Custom Domain Name for an API Gateway API

The following procedure describes how to set up a custom domain name.

To set up a custom domain name for an API Gateway API

  1. Sign in to the API Gateway console at https://console.aws.amazon.com/apigateway.

  2. Choose Custom Domain Names from the main navigation pane.

  3. Choose Create in the secondary navigation pane.

  4. In Create Custom Domain Name, specify the following:

    1. For Domain name, type your domain name (for example, api.example.com).

    2. For Certificate name, type a name for future reference (for example, my-example-certificate).

    3. For Certificate body, type or paste the body of the PEM-formatted server certificate from your certificate authority. The following shows an abbreviated example of such a certificate.

      -----BEGIN CERTIFICATE-----
      EXAMPLECA+KgAwIBAgIQJ1XxJ8Pl++gOfQtj0IBoqDANBgkqhkiG9w0BAQUFADBB
      ...
      az8Cg1aicxLBQ7EaWIhhgEXAMPLE
      -----END CERTIFICATE-----
    4. For Certificate private key, type or paste your PEM-formatted certificate‘s private key. The following shows an abbreviated example of such a key.

      -----BEGIN RSA PRIVATE KEY-----
      EXAMPLEBAAKCAQEA2Qb3LDHD7StY7Wj6U2/opV6Xu37qUCCkeDWhwpZMYJ9/nETO
      ...
      1qGvJ3u04vdnzaYN5WoyN5LFckrlA71+CszD1CGSqbVDWEXAMPLE
      -----END RSA PRIVATE KEY-----
      
    5. For Certificate chain, type or paste the PEM-formatted intermediate certificates and, optionally, the root certificate, one after the other without any blank lines. If you include the root certificate, your certificate chain must start with intermediate certificates and end with the root certificate. Use the intermediate certificates provided by your certificate authority. Do not include any intermediaries that are not in the chain of trust path. The following shows an abbreviated example.

      -----BEGIN CERTIFICATE-----
      EXAMPLECA4ugAwIBAgIQWrYdrB5NogYUx1U9Pamy3DANBgkqhkiG9w0BAQUFADCB
      ...
      8/ifBlIK3se2e4/hEfcEejX/arxbx1BJCHBvlEPNnsdw8EXAMPLE
      -----END CERTIFICATE-----

      Here is another example.

      -----BEGIN CERTIFICATE-----
      Intermediate certificate 2
      -----END CERTIFICATE-----
      -----BEGIN CERTIFICATE-----
      Intermediate certificate 1
      -----END CERTIFICATE-----
      -----BEGIN CERTIFICATE-----
      Optional: Root certificate
      -----END CERTIFICATE-----
  5. Choose Save.

  6. While the new custom domain name is being created, the console displays the following information to have an alias resource record created in your DNS provider to map your custom domain name (api.example.com) to the API‘s CloudFront distribution domain name (distribution-id.cloudfront.net).

以上是关于Aws api gateway Domain name的主要内容,如果未能解决你的问题,请参考以下文章

添加自定义标头并使用 AWS API Gateway 将其发送到后端服务

如果在 Terraform 模块中创建了 aws_api_gateway_integration,如何在 aws_api_gateway_deployment 资源上填充depends_on?

从AWS API-Gateway中找出lambda名称

响应未定义 - aws-api-gateway-client

AWS API Gateway:用户匿名无权执行 API

AWS API Gateway 默认响应和触发 AWS Lambda