

# Generate the Java SDK of an API in API Gateway
<a name="generate-java-sdk-of-an-api"></a>

The following procedure shows how to generate the Java SDK of an API in API Gateway.

**To generate the Java SDK of an API in API Gateway**

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

1. Choose a REST API.

1. Choose **Stages**. 

1. In the **Stages** pane, select the name of the stage.

1. Open the **Stage actions** menu, and then choose **Generate SDK**.

1. For **Platform**, choose the **Java** platform and do the following:

   1.  For **Service Name**, specify the name of your SDK. For example, **SimpleCalcSdk**. This becomes the name of your SDK client class. The name corresponds to the `<name>` tag under `<project>` in the pom.xml file, which is in the SDK's project folder. Do not include hyphens.

   1.  For **Java Package Name**, specify a package name for your SDK. For example, **examples.aws.apig.simpleCalc.sdk**. This package name is used as the namespace of your SDK library. Do not include hyphens.

   1.  For **Java Build System**, enter **maven** or **gradle** to specify the build system.

   1.  For **Java Group Id**, enter a group identifier for your SDK project. For example, enter **my-apig-api-examples**. This identifier corresponds to the `<groupId>` tag under `<project>` in the `pom.xml` file, which is in the SDK's project folder.

   1.  For **Java Artifact Id**, enter an artifact identifier for your SDK project. For example, enter **simple-calc-sdk**. This identifier corresponds to the `<artifactId>` tag under `<project>` in the `pom.xml` file, which is in the SDK's project folder.

   1.  For **Java Artifact Version**, enter a version identifier string. For example, **1.0.0**. This version identifier corresponds to the `<version>` tag under `<project>` in the `pom.xml` file, which is in the SDK's project folder.

   1. For **Source Code License Text**, enter the license text of your source code, if any.

1. Choose **Generate SDK**, and then follow the on-screen directions to download the SDK generated by API Gateway.

Follow the instructions in [Use a Java SDK generated by API Gateway for a REST API](how-to-call-apigateway-generated-java-sdk.md) to use the generated SDK.

 Every time you update an API, you must redeploy the API and regenerate the SDK to have the updates included. 