aws-appsync

How to store certificate as a secret in AWS secret manager ? How to pass that secret in https call using AWS appSync resolver?

一个人想着一个人 提交于 2020-07-22 21:38:38
问题 I need to get elements from AWS dynamoDB and thrid party https service and merge those results in AWS appSyn and send back the result as graphQL response Third party service which I am using, expects client side certificate. I am not finding proper AWS documents on how to pass agent using AWS appSync resolver. I am also not finding documents to store certificate as secret in AWS secret manager. Is there anyone faced similar problem? Or do you guys have any solution to it? 回答1: It depends on

How to store certificate as a secret in AWS secret manager ? How to pass that secret in https call using AWS appSync resolver?

梦想与她 提交于 2020-07-22 21:38:28
问题 I need to get elements from AWS dynamoDB and thrid party https service and merge those results in AWS appSyn and send back the result as graphQL response Third party service which I am using, expects client side certificate. I am not finding proper AWS documents on how to pass agent using AWS appSync resolver. I am also not finding documents to store certificate as secret in AWS secret manager. Is there anyone faced similar problem? Or do you guys have any solution to it? 回答1: It depends on

How to do filteration in AWS Amplify GraphQL Client

故事扮演 提交于 2020-06-27 09:07:12
问题 I'm trying to implement GraphQL filter using Amplify GraphQL Client. I got a list of todos and wanted to retrieve list of todos that has status complete. The Documentation only show how to get all items and single item const allTodos = await API.graphql(graphqlOperation(queries.listTodos)); console.log(allTodos); Could someone please point me how to apply filter to the listTodos so that it return todos with status complete only. I tried to do the following but it is wrong. API.graphql

Inaccessible DynamoDB host when running amplify mock

我是研究僧i 提交于 2020-06-26 06:32:09
问题 I am using AWS Amplify to set up an AppSync GraphQL API. I have a schema with an @model annotation and I am trying to write a lambda resolver that will read/write to the DynamoDB table that @model generates. However, when I attempt to test locally using amplify mock my JS function throws error { UnknownEndpoint: Inaccessible host: `dynamodb.us-east-1-fake.amazonaws.com'. This service may not be available in the `us-east-1-fake' region. I can't seem to find much documentation around this use

How to check permissions of an entity on create in appsync

旧街凉风 提交于 2020-04-30 16:32:12
问题 Sorry for the unspecific title. However, I am having a hard time to describe it. I am using aws-appsync with aws cognito for authentication. I've followed the amplify docs about the @auth annotation to handle permissions for mutations and queries. Here is an example of my schema. A user can create an entry and share it with others. However, they should only read the entry and should not have permissions to edit it. An entry also has multiple notes. (And some more fields) type Entry @model

AppSync/Amplify Query using a Parameter Error “”Validation error of type FieldUndefined:"

微笑、不失礼 提交于 2020-04-18 05:36:51
问题 I currently have a AppSync schema where I created a separate query within the AppSync console in order retain certain parameter (assetId) and get a list of the results in my DynamoDB table. I have tested the query already within the AppSync console and it works fine, I am now just having troubles using Amplify in my React App in order to call the query. I get the following error when running my App: DisplayCard.js:34 Uncaught (in promise) {data: null, errors: Array(1)} "Validation error of

How do i use a Global Secondary Index in DynamoDB to get the 'id' of a user in my table?

可紊 提交于 2020-04-07 08:45:06
问题 I'm using AWS Amplify on my react native app I want to do something seemingly so simple, but i am a bit lost as to how to do it: I have a table with user information already in it. Here's the Schema: type Users @model { id: ID! userName: String firstname: String weblink: String email: String mobileNum: String . . . } //**Here's my current Query.js** export const getUsers = `query GetUsers($id: ID!) { getUsers(id: $id) { id userName firstname weblink email . . . } } `; This table is populated

How to send a GraphQL query to AppSync from python?

半城伤御伤魂 提交于 2020-03-20 12:37:09
问题 How do we post a GraphQL request through AWS AppSync using boto? Ultimately I'm trying to mimic a mobile app accessing our stackless/cloudformation stack on AWS, but with python. Not javascript or amplify. The primary pain point is authentication; I've tried a dozen different ways already. This the current one, which generates a "401" response with "UnauthorizedException" and "Permission denied", which is actually pretty good considering some of the other messages I've had. I'm now using the

Unable to serialise AWSDate from RDS in AppSync response mapping template

天大地大妈咪最大 提交于 2020-02-04 04:35:28
问题 I'm building an AppSync project using serverless Aurora as my db, and stumbled across this strange error: "Can't serialize value (/getUsers/created_at) : Unable to serialize `2019-09-28 07:36:13` as a valid DateTime Object." This happens when I get a User object which looks like this: type Users { id: String! name: String! description: String created_at: AWSDateTime updated_at: AWSDateTime logged_in: AWSDateTime } The error seems to be happening because $utils.rds.toJsonObject($ctx.result)[0]

Manually sign AppSync URL to use in Lambda gives bad signature error

一个人想着一个人 提交于 2020-01-10 20:17:29
问题 In a Lambda, I would like to sign my AppSync endpoint with aws-signature-v4 in order to use it for a mutation. The URL generated seems to be ok but it gives me the following error when I try it : { "errors" : [ { "errorType" : "InvalidSignatureException", "message" : "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. etc... } ] } Here is my lambda function import {