0Pricing
Serverless Backend with AWS Lambda & API Gateway · 강의

사용자 지정 도메인 이름과 에지 최적화

API에 사용자 지정 도메인 이름을 구성하고 에지 최적화 엔드포인트를 활용하여 전 세계 성능을 향상합니다.

사용자 지정 도메인 이름과 에지 최적화은(는) CoddyKit의 무료 Serverless Backend with AWS Lambda & API Gateway 강의입니다. 이것은 4개 중 3번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Serverless Backend with AWS Lambda & API Gateway 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Serverless Backend with AWS Lambda & API Gateway 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Your API's Own Address

When you deploy an API Gateway API, AWS provides a default URL. It looks something like https://abcdef123.execute-api.us-east-1.amazonaws.com/prod.

While functional, this URL isn't very user-friendly or brandable. This lesson shows how to use your own domain name!

The Default API Address

Every API Gateway API automatically gets a unique endpoint URL. This URL includes a random ID, the AWS region, and amazonaws.com.

  • Example: https://{restapi_id}.execute-api.{region}.amazonaws.com/{stage_name}
  • It works immediately after deployment.
  • Great for testing, but not ideal for public-facing APIs.

Benefits of Custom Domains

Using a custom domain name for your API offers several advantages:

  • Branding: Use your company's domain (e.g., api.yourcompany.com).
  • Memorability: Easier for users and developers to remember and type.
  • Flexibility: You can change your backend API without changing the public URL.
  • SEO (for web APIs): Helps with search engine optimization.

Securing Your Custom Domain

Before you can use a custom domain, you need an SSL/TLS certificate. This certificate encrypts communication and proves your API's identity.

  • AWS Certificate Manager (ACM) can provision free public SSL certificates.
  • You can also import your own certificate.
  • The certificate must be in the US East (N. Virginia) region for edge-optimized APIs.

Configuring Your Custom Domain

Once you have an SSL certificate, you can configure your custom domain in the API Gateway console.

You'll specify your domain name (e.g., api.example.com) and associate it with the ACM certificate. API Gateway will then create a domain name and provide a DNS target (a CloudFront distribution domain name).

Connecting to Your API

A custom domain needs to know which API Gateway API to route requests to. This is done using base path mappings.

You define a base path (e.g., /v1 or /) and map it to a specific API Gateway API and stage (e.g., prod).

  • api.example.com/v1 -> my-api/prod
  • api.example.com/users -> users-api/prod

Pointing Your Domain

The final step is to update your domain's DNS records. You need to create a CNAME record (or A record if using Route 53 alias) that points your custom domain to the DNS target provided by API Gateway.

This tells the internet that requests for api.example.com should go to the API Gateway's CloudFront distribution.

Global Performance with Edge Optimization

API Gateway offers different endpoint types. Edge-optimized endpoints are the default for REST APIs and are designed for global clients.

They use Amazon CloudFront, AWS's content delivery network (CDN), to route requests through the nearest edge location to your users.

This reduces latency and improves performance for geographically dispersed clients.

CloudFront in Action

When you use an edge-optimized endpoint:

  1. A user's request hits the nearest CloudFront edge location.
  2. CloudFront forwards the request to your API Gateway in the AWS region.
  3. The response is cached at the edge location (if configured) and returned to the user.

This caching and proximity routing significantly speeds up API calls for global users.

Choosing the Right Endpoint Type

API Gateway also supports Regional endpoints. These are best when all your API consumers are in the same AWS region as your API.

  • Edge-Optimized: Default for REST APIs, uses CloudFront, best for global users.
  • Regional: Best for clients in the same region, can be fronted by your own CloudFront distribution for more control.

HTTP APIs only support Regional endpoints by default, but you can add CloudFront yourself.

Custom Domain Check

You want to use api.mydomain.com for your API Gateway API, which will be accessed by users worldwide. Which of the following statements is TRUE?

Recap: Custom Domains & Edge

In this lesson, we learned how to give your API Gateway APIs a professional, branded look using custom domain names. We covered the steps from SSL certificates to DNS configuration.

We also explored edge-optimized endpoints, understanding how they leverage CloudFront to deliver your API with low latency to users across the globe. You now know when to choose between edge-optimized and regional endpoints.

자주 묻는 질문

“사용자 지정 도메인 이름과 에지 최적화” 강의는 무료인가요?

네 — “사용자 지정 도메인 이름과 에지 최적화” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Serverless Backend with AWS Lambda & API Gateway 강의 전체를 잠금 해제할 수 있습니다. Serverless Backend with AWS Lambda & API Gateway 강의에는 총 4개의 강의가 포함되어 있습니다.

“사용자 지정 도메인 이름과 에지 최적화”에서 뭘 배우나요?

API에 사용자 지정 도메인 이름을 구성하고 에지 최적화 엔드포인트를 활용하여 전 세계 성능을 향상합니다. 브라우저에서 직접 실행하는 실습 코드로 Serverless Backend with AWS Lambda & API Gateway을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Serverless Backend with AWS Lambda & API Gateway을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Serverless Backend with AWS Lambda & API Gateway은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 3번째 강의입니다.

“사용자 지정 도메인 이름과 에지 최적화” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Serverless Backend with AWS Lambda & API Gateway 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Serverless Backend with AWS Lambda & API Gateway 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 캐싱과 속도 제한
  2. 요청 및 응답 변환
  3. 사용자 지정 도메인 이름과 에지 최적화
  4. 실시간 통신을 위한 WebSocket API
← Serverless Backend with AWS Lambda & API Gateway(으)로 돌아가기