In this video, you’ll see how you can publish API products on AWS Data Exchange.
With this solution, you can make your API products discoverable in the AWS
Data Exchange catalog, leverage automated subscription and entitlement
capabilities, and offer contract- based and/or metered cost pricing.
For this example, we’ll publish a Lambda function as an Amazon API Gateway
API product on AWS Data Exchange.
Let’s take a look.
The function can return the current time in either Eastern Standard Time
or Pacific Standard Time.
Here you can see the function’s runtime settings.
Let’s look at the corresponding API.
In the Amazon API Gateway console, we’ll view our “Resources.”
We have a “data” resource that runs the GET method.
The method execution requests AWS Identity and Access Management (IAM)
authentication, then calls the Lambda function and returns a result.
Let’s test the method execution.
We’ll enter the parameters for Pacific Standard Time.
The Response Body reveals the appropriate time.
Let’s confirm that the API response data is accurate for Eastern Standard Time, as well.
The response data is correct.
Now that we’re satisfied with the Lambda function’s performance,
we’ll build a product for this API that subscribers can use.
Let’s go to the AWS Data Exchange Console.
For our purposes, we’re already logged in as a data provider.
Let’s go to our “Owned data sets” page.
Here, we’ll create a new data set.
Our data set type is an Amazon API Gateway API.
Next, we’ll name and describe it.
Let’s create the data set.
Next, we’ll create a revision, which is a container for assets in the data set.
We can include a brief comment about the data it contains.
Let’s create the revision.
Next, we’ll add an API stage, which is how we’ll call for the
Gateway API from the Lambda function.
Let’s search for the API name.
We’ll select the production stage.
Here we can specify the information subscribers see once
they’ve subscribed to the product.
We’ll keep the API name as it is.
Let’s import the OpenAPI 3.0 specification.
If needed, we can add more documentation.
Let’s add the API stage.
Once we see that the import job has been created and our API stage has
been added, we can finalize the revision.
In the revision overview, the status has updated from “not finalized” to “unpublished.”
The page also shows the API asset we added,
which is the API stage; as well as any jobs that were run and tags used.
Let’s view the asset.
Here we can see more overview information, including the Amazon API Gateway details.
There are also integration notes.
Before we publish the API product, let’s test it.
We’ll copy all the information we’ll need, beginning with the
code structure for calling the API.
We’ll also copy the data set ID, revision ID, and asset ID.
Now let’s go to AWS CloudShell.
We’ll supply the code to call for the API with the information we just copied.
In this instance, we’ll call for Pacific Standard Time.
We can see and confirm the API Response Data.
Let’s also test for Eastern Standard Time.
We’re ready to publish the data set.
Back in AWS Data Exchange, let’s go to our published products.
We’ll publish a new product.
We’ll retain the public visibility setting and confirm that the product
contains no personal or sensitive data.
Next, we’ll add the data set we want to publish.
If needed, we can adjust the revision access rules. Let’s move on.
Here we’ll define the product.
This is what customers will see when reviewing our product in the
AWS Data Exchange catalog.
Let’s start by naming it.
We can add a product logo.
The product also needs a support contact.
We can optionally choose product categories.
Including data dictionaries is optional, as well.
Next, we’ll add a short product description for the product catalog page.
We’ll also add descriptive text for the product’s detail page.
For our purposes, we’ll add just a few words, but this can be a long description.
Next, we’ll define the public offer.
We can choose to offer only contract- based pricing, only metered-cost pricing,
or a combination of metered and contract pricing.
For instance, we can offer a 12-month contract for a fixed cost.
We could add another contract cost for a different duration, such as six months.
For now, we’ll offer just one contract price.
Metered-cost pricing is optional.
There are many ways to formulate costs.
First let’s add a per-request cost.
We’ll define the cost per unit.
Let’s describe and add the price model.
If we wanted to offer subscribers only metered cost pricing, we would define
the total price of a contract as zero.
In this case, we’re going to combine the contract and metering pricing options.
We can add multiple metered costs.
This time we’ll build a customized offer.
We’ll base the cost on compute-units.
Let’s define the key and price per unit.
Now we’ll describe and add the cost option.
Next, we can make any necessary selections for adjusting the tax settings
or data subscription agreement.
We can also include a refund policy for subscribers.
Finally, we’ll establish the product’s subscription verification
and auto-renewal rules.
Let’s move on.
Here we can review our selections and publish the product.
As indicated by its status, our product is now awaiting approval from the AWS
Data Exchange team before it is available in the catalog.
If we ever need to remove the product, we can simply unpublish it.
You’ve just seen how you can publish-and unpublish--API products on AWS Data Exchange.
You can learn more about this topic in the description and links for this video.
Thanks for watching. Now it's your turn to try.