Practice Test

True/False: API Gateway stages are snapshots of the configuration and are treated as separate environments.

  • True
  • False

Answer: True

Explanation: API Gateway stages represent different environments like DEV, TEST, or PROD. They are snapshots of the configuration of an API Gateway.

Which of the following are important attributes of an API Gateway stage? (Multiple Select)

  • A) Stage name
  • B) Deployment ID
  • C) Stage description
  • D) All of the above

Answer: D) All of the above

Explanation: All of these are important attributes of an API Gateway stage. The stage name is the identifier of the stage, the deployment ID is the identifier of the deployment, and the stage description gives detailed information about the stage.

True/False: You can route traffic to specific versions of your API through API Gateway stages.

  • True
  • False

Answer: True

Explanation: This is a key feature of API Gateway stages. You can route traffic to specific versions of your API depending on the stage.

True/False: You cannot attach a custom domain name to an API Gateway.

  • True
  • False

Answer: False

Explanation: API Gateway supports custom domain names. You can route traffic from your domain to your APIs using custom domain names in API Gateway.

API Gateway custom domain names cannot support which type of certificate issued by AWS Certificate Manager?

  • A) Regional
  • B) Edge optimized
  • C) Regional and Edge optimized
  • D) None of the above

Answer: D) None of the above

Explanation: API Gateway custom domain names can support either a Regional or an Edge optimized certificate issued by the AWS Certificate Manager.

What is the correct term for the path after the endpoint of a custom domain name in API Gateway?

  • A) Base path
  • B) Endpoint path
  • C) Root path
  • D) Resource path

Answer: A) Base path

Explanation: The path after the endpoint in a custom domain name is known as the base path.

True/False: API Gateway stages are always CORS enabled.

  • True
  • False

Answer: False

Explanation: CORS is not automatically enabled in API gateway stages. It has to be manually configured based on the requirements.

Which of the following are key features of API Gateway stages? (Multiple Select)

  • A) Version management
  • B) Traffic management
  • C) Monitoring
  • D) All of the above

Answer: D) All of the above

Explanation: API Gateway stages support version management, traffic management and it also provides monitoring tools like CloudWatch.

In API Gateway, a stage variable is a(n) _____.

  • A) Immutable variable
  • B) Name-value pair linked to a stage
  • C) Configuration Snapshot
  • D) None of the above

Answer: B) Name-value pair linked to a stage

Explanation: Stage variables are name-value pairs associated with a stage, enabling you to dynamically adjust the behavior of your APIs according to the stage.

True/False: A custom domain name in API Gateway can be associated with multiple base path mappings.

  • True
  • False

Answer: True

Explanation: A custom domain name is not restricted to just one base path mapping. It can be associated with multiple base path mappings.

True/False: Custom domain names can only be associated with REST APIs, not HTTP APIs in API Gateway.

  • True
  • False

Answer: False

Explanation: Custom domain names in API Gateway can be associated with both REST APIs and HTTP APIs.

True/False: Stage descriptions in API Gateway can be updated after initial setup.

  • True
  • False

Answer: True

Explanation: The stage description is mutable. It means you can update it after the initial setup.

True/False: Deployment IDs are unique for each API Gateway stage.

  • True
  • False

Answer: True

Explanation: Each deployment ID is unique to a stage as it represents a snapshot of the API’s configuration at a given point in time.

What is not included in the API Gateway stage setting?

  • A) Access logs
  • B) Default method throttling
  • C) Client certificate
  • D) Base path mapping

Answer: D) Base path mapping

Explanation: Base path mapping is not part of a stage setting; rather, it is associated with a custom domain name in API Gateway.

True/False: You cannot use both regional and edge-optimized custom domain names at the same time in API Gateway.

  • True
  • False

Answer: False

Explanation: These two types of custom domain names are not mutually exclusive. You can use both regional and edge-optimized custom domain names at the same time in API Gateway.

Interview Questions

What is an API Gateway stage in AWS?

An API Gateway stage in AWS is a logical reference to a lifecycle state of an API (such as beta or production). When you deploy an API, you deploy it to a specific stage.

What is the function of custom domains in AWS API Gateway?

Custom domains in AWS API Gateway allow you to map specific domains of your web service’s API calls to a specific stage in your REST or HTTP APIs.

What information do you need to set up a custom domain name for API Gateway?

To set up a custom domain name for API Gateway, you need the following: a domain name purchased from a domain name provider, a certificate to validate your ownership of the domain, and a hosted zone ID for the record set that you want to route traffic to.

How can you manage application lifecycle with stages in AWS API Gateway?

In AWS API Gateway, you can use stages to manage your application lifecycle by designating different stages for different environments, such as development, testing, and production. You can then deploy your APIs to these specific stages.

Is it possible to use the same custom domain name across multiple stages in AWS API Gateway?

No, a custom domain name must be unique across all stages within a region in AWS API Gateway.

Can we use wildcard custom domain names in AWS API Gateway?

Yes, wildcard custom domain names can be used in API Gateway. However, they need to be validated with an ACM certificate.

What can you configure using the API Gateway console when you create a new API stage?

When creating a new API stage in API Gateway, you can configure a variety of settings such as stage name, deployment description, access logs/tracing settings, canary release settings, and stage variables.

What are stage variables in AWS API Gateway and what is their function?

Stage variables are name-value pairs that you can define as configuration attributes associated with a deployment stage of a REST API in AWS API Gateway. They act like environment variables and can be used to change the behavior of the API Gateway for each deployment stage.

How does the Base Path Mapping work in AWS API Gateway?

Base Path Mapping in AWS API Gateway helps you to route requests to the appropriate APIs and stages in the API Gateway based on the base path in the request URL. For example, you can configure your API to route requests with “/v1” in the URL to the “v1” deployment stage of your API.

What are some of the benefits of using an API Gateway custom domain name?

Some of the benefits of using an API Gateway custom domain name include: easy route configuration, cleaner API URLs, seamless integration with AWS services like Route53 and ACM, and it eliminates the need to manage the API stage in your client applications.

What does the Canary Release deployment method do in API Gateway?

The Canary Release method in API Gateway allows you to test a new API version in the production environment with a small portion of the traffic, before fully deploying it. This reduces the risk of deploying an API that may cause issues.

Can we use AWS Certificate Manager (ACM) to manage our custom domain certificates in API Gateway?

Yes, we can use AWS Certificate Manager (ACM) to create and manage the SSL/TLS certificates required for custom domain names in API Gateway.

How can we control access to API Gateway stages?

We can control access to API Gateway stages using a variety of means such as IAM roles and policies, Cognito user pools, AWS Organizations, resource policies, and custom authorizers.

What happens when you delete an API Gateway stage?

When you delete a stage in API Gateway, the stage and all of its settings are removed from the API Gateway service. The API resources and methods are not affected, but the API is no longer accessible at the stage’s API Gateway service endpoint.

Can we roll back an API Deployment to a previous stage in AWS API Gateway?

Yes, we can roll back an API Deployment to a previous stage in AWS API gateway by creating a new deployment pointing to the older stage.

Leave a Reply

Your email address will not be published. Required fields are marked *