aws-amplify

Error in AWS CLI (Amplify) when executing the “amplify init” command in windows environment (for an android studio project)

纵饮孤独 提交于 2020-07-07 11:13:16
问题 I'am new to the AWS SDK and I'am trying to create a new android studio project with AWS SDK for mobile. My ultimate goal is to get AWS SDK working on my Android studio project, I tried adding dependencies on Gradle, but it does not all all packages I need and it's not helping me, and thus I followed the official AWS documentation which lead me to Amplify CLI. As suggested by the official AWS documentation (this is the link to the documentation page I'm talking about), I was following along

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

Amplify React Native - Duplicate Error using amplify add api

牧云@^-^@ 提交于 2020-05-29 07:36:09
问题 I'm using this Amplify guide https://aws-amplify.github.io/docs/js/tutorials/building-react-native-apps/#connect-to-your-backend-1 and when I create an API using "aplify add api" the app fails. I'm using "expo" and I'm using IphoneX for test phase. My app code is import React, { Component } from 'react'; import { StyleSheet, Text, Button, View, Alert } from 'react-native'; import Amplify, { API } from 'aws-amplify'; import amplify from './aws-exports'; import awsmobile from './aws-exports';

Amplify React Native - Duplicate Error using amplify add api

烂漫一生 提交于 2020-05-29 07:35:13
问题 I'm using this Amplify guide https://aws-amplify.github.io/docs/js/tutorials/building-react-native-apps/#connect-to-your-backend-1 and when I create an API using "aplify add api" the app fails. I'm using "expo" and I'm using IphoneX for test phase. My app code is import React, { Component } from 'react'; import { StyleSheet, Text, Button, View, Alert } from 'react-native'; import Amplify, { API } from 'aws-amplify'; import amplify from './aws-exports'; import awsmobile from './aws-exports';

AWS-amplify Including the cognito Authorization header in the request

这一生的挚爱 提交于 2020-05-25 04:54:21
问题 I have create an AWS mobile hub project including the Cognito and Cloud logic. In my API gateway, I set the Cognito user pool for the Authorizers. I use React native as my client side app. How can I add the Authorization header to my API request. const request = { body: { attr: value } }; API.post(apiName, path, request) .then(response => { // Add your code here console.log(response); }) .catch(error => { console.log(error); }); }; 回答1: By default, the API module of aws-amplify will attempt

AWS Amplify: onStatusChange then render main page

≯℡__Kan透↙ 提交于 2020-05-17 06:16:04
问题 I am trying to render the main entry point of my application when an auth status change occurs but when I do try to go to the main entry point of my application I get a blank screen. I'm assuming I can't go to a main page if it isn't being called within the render function itself? If so, how do I render the main Page of my app when I established signIn? index.js class App extends Component { /* constructor(props) { super(props); this.state = { authState: null, authData: null } } */

Can not connect to AWS Amplify PubSub -> Socket error:undefined

青春壹個敷衍的年華 提交于 2020-05-15 21:23:07
问题 I've been trying out all ways to get the Amplify/PubSub working without any luck. It seems all the documentation are rather outdated. Here is what I have done so far. Please note all hashes are made up ;-) Created a fresh React Native app Installed amplify packages Installed Amplify CLI Invoked $ amplify configure Invoked $ amplify init Invoked $ amplify add auth Invoked $ amplify push , which created the aws-exports.js object Created a super simple component import React from 'react'; import

Can not connect to AWS Amplify PubSub -> Socket error:undefined

南笙酒味 提交于 2020-05-15 21:21:50
问题 I've been trying out all ways to get the Amplify/PubSub working without any luck. It seems all the documentation are rather outdated. Here is what I have done so far. Please note all hashes are made up ;-) Created a fresh React Native app Installed amplify packages Installed Amplify CLI Invoked $ amplify configure Invoked $ amplify init Invoked $ amplify add auth Invoked $ amplify push , which created the aws-exports.js object Created a super simple component import React from 'react'; import

AWS IoT - AMQJS0008I Socket closed - AUTHORIZATION_FAILURE

こ雲淡風輕ζ 提交于 2020-05-01 09:46:27
问题 I am trying to configure AWS IoT to use with AWS Amplify. I always see error as " AMQJS0008I Socket closed. ” and CloudWatch says “ AUTHORIZATION_FAILURE ”. This is what I configured I AM policy for authenticated Cognito Identity Pool { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", "Action": [ "cognito-identity:*", "mobileanalytics:PutEvents", "cognito-sync:*", "iot:Connect", "iot:Publish", "iot:Subscribe", "iot:Receive", "iot:GetThingShadow", "iot