Rob L. • over 3 years ago
Having an issue setting up and calling the Rearc-DBnomics API using the official examples?
Hi,
I just joined the hackathon, and am trying to figure out how to make API calls using the Rearc-DBnomics API.
Using the example given below, I created a CloudShell terminal instance and then ran the aws command ( of course given my appropriate configuration parameters):
https://aws.amazon.com/marketplace/pp/prodview-3i7zym3vhesou#offers
```aws dataexchange send-api-asset --XXX --revision-id XXX --asset-id XXX --method POST --method POST --path "/series/ECB/RTD/A.S0.N.F_CEC_CGG_D0.F" --request-headers 'header=header_value' --body "{\"body_param\":\"body_param_value\"}"```
However, the error I get when I run this is: "An error occurred (InternalServerErrorException) when calling the SendApiAsset operation"
I then tried to set up the API call as an AWS Lambda function (I have experience using AWS Lambda functions before). Setting it up using the official example given, I have the following:
"import json
import urllib
import boto3
adx = boto3.client('dataexchange')
def lambda_handler(event,context):
adx_response=adx.send_api_asset(
DataSetId="XXX",
RevisionId="XXX",
AssetId="XXX",
Method="POST",
Path="/series/ECB/RTD/A.S0.N.F_CEC_CGG_D0.F",
QueryStringParameters=event
)
adx_body = json.loads(adx_response["Body"])
return adx_body"
However, after trying to run it, I get the same "Internal server error" as above.
Any idea why this might be happening, and/or how to address it? I guess the work-around would be to just use the DBnomics API directly, but then what would be the point of even using the AWS DataExchange API in the first place?
Thanks and sorry for the long question,
Rob L.
Comments are closed.

1 comment
Jawn • over 3 years ago
We have mentioned the best 24-inch monitor for MacBook pro that is easy to connect, smooth to use, and durable to last long. All the monitors are one of a kind, from the build material to the built-in functions. They offer IPS display to enhance the viewing visuals, an adjustable stand for comfortable use, and patented eye care technology to keep you safe and healthy. https://macbookpromonitor.com/best-24-inch-monitor-for-macbook-pro/