How to connect Grafana JSON datasource to AWS API Gateway - oauth-2.0

How can I configure the JSON datasource and Grafana to access an AWS API Gateway? I can secure the API and access it outside of Grafana, using either IAM or Cognito, but cannot figure out how to do the same from within the datasource. I've tried modifying grafana.ini with values from, for example, here, but I cannot get it to work. If I can do it without spinning up a lambda authorizer that would be great.

Related

call to oauth to get token in apache camel

I am new to Apache Camel. I wanted to call Oauth service from my existing route and get the access token value to call another rest service. I could not find anything on web. I wanted to implement it using Spring XML.

Data Virtualization connection to Azure Data Lake Store Gen1 - WebHDFS/v1/ endpoint

I'm trying to configure Azure Data Lake Store Gen1 (ADLS) as a Data Source in a Data Virtualization software (Tibco's).
Reading through the Azure documentation, I got to the webhdfs/v1/ endpoint associated with ADLS and managed to simulate the (non-standard, since it requieres an additional "resource" parameter) OAuth2 authentication needed within Postman. All good so far.
I am guessing that the connection should be configured as an OData service, since the OData connector within TDV (Tibco DV) has an "Azure AD resource" parameter that should be used only if you are trying to authenticate through azure's active directory (the non-standard part from before). However I am failing to configure this connection.
This must be because of one of these reasons:
The /webhdfs/v1/ endpoint is NOT an OData service.
I am wrongly configuring the OData connector in TDV.
In any case, how can I connect to this repository and introspect everything behind it? list folders, files, and all that within TDV?
Some suggestions I have stumbled upon are using the Hive connectors or the REST connector, but after trying I still feel closer to success with OData.

connecting to Dynamodb from iOS (Swift) using AWS Amplify

I used to directly connect to access to Dynamodb table from iOS using AWS mobile SDK. Now AWS encourages to migrate to Amplify. in the documentation there is no guideline for Dynamodb read/write operations. Should we use API to access to Dynamodb or can we use AWSDynamoDBObjectMapper (see https://docs.aws.amazon.com/aws-mobile/latest/developerguide/mobile-hub-add-aws-mobile-nosql-database.html)
Unless I'm mistaken, because I'm new at this, I believe we have to use the REST API in order to make our calls to various AWS services in an Amplify context. So a Lambda function would perform your DynamoDB accesses.
UPDATE
When you add the REST API you will be asked what kind of function template you want to use. The first option is:
CRUD function for Amazon DynamoDB table (Integration with Amazon API Gateway and Amazon DynamoDB)

AWS Amplify database options

I am considering using AWS Amplify to create a backend for my app(s). I was hoping to use OrientDB which I have set up on an EC2, but all the examples and tutorials for Amplify only mention DynamoDB. Before I spend a lot of time learning how to use Amplify, is it possible to connect to any type of DB that can be installed on an EC2, or is DynamoDB all that is available?
Yes, you can.
After amplify init and amplify add host
Run amplify add api
Choose REST
Choose Create a new Lambda function
Don't choose CRUD function for Amazon DynamoDB table
Choose Serverless express function (Integration with Amazon API Gateway)
At your project ./amplify/backend/function, you’ll see your lambda express. And then you can connect to any database you want.
Just need to input the connecting DB code.
Amplify is at the moment tied to dynamoDB in a very strong way. But you can use graphQL queries sent to AppSync (the backend layer of amplify) to trigger lambda functions. From there you can target any type of database you want

Does using ios-aws-sdk pass everything over SSL

I use AWS Lambda as a backend service to authenticate users from my ios app. When learning about Lambda I was pointed to use the Amazon API Gateway to make the data over the network go over HTTPS:// and NOT HTTP://.
Someone recently pointed out that all calls to AWS Lambda, DynamoDB, S3, and Cognito directly from my app automatically go over HTTPS://. Is this true or not?
Unfortunately the docs are not explicit on the matter, that I could find, but inspecting the source on github:
AWSService, one of the base services used by the sdk, uses https by default, and will only switch to http if the AWSServiceConfiguration particular configuration is established with the parameter useUnsafeUrl set to true.
And AWSLambdaService, even if initialised with a configuration object, appears to set the useUnsafeUrl option to NO.
So - inspection of the source suggests that all access to the service is by default https.
This is consistent with AWS SDK defaults in other languages/frameworks as well.
-- Edited to note --
I had a thought after posting this - it's possible that the advice to use API Gateway for https was based on the common practice of exposing Lambda functions as API endpoints. If you want to do that, then API Gateway gives you a way, and if you are using API Gateway, then you do need to ensure it is configured to use https.
What is not clear from your question is - from your app, are you invoking the lambda functions via the API Gateway endpoint? Or directly via the AWS SDK? If invoking directly via the AWS SDK then there is no need to use API Gateway at all.
If you are already using the API Gateway, and issuing HTTPS web requests to invoke your lambda functions, I wouldn't necessarily stop, because it gives you a nice point of abstraction and decoupling - you could completely change your backend implementation and as long as you keep the API Gateway endpoint configuration the same, your clients will still work. Alternatively, you could start to implement other clients or expose your API to 3rd party clients who aren't in a position to use AWS SDK and they will still be able to interract with your backend via standard HTTP protocols.

Resources