By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS Amplify

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Removed wrong IAM roles

I destroyed some IAM roles since they did not display a "last active" attribute. Now I cannot access my data properly. When I try to reset my auth settings, I cannot: ``` NoSuchEntity - An error occurred while processing your request: The role with name us-east-1_g9F10WnFw_Manage-only cannot be found. ``` I'm struggling to figure out what Roles to recreate what access to give them to access my amplify environment Not sure if this helps but here is my aws-export.js: ``` /* eslint-disable */ // WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten. const awsmobile = { "aws_project_region": "us-east-1", "aws_appsync_graphqlEndpoint": "https://iai3fj7vd5hgjc22z4m7kj5tn4.appsync-api.us-east-1.amazonaws.com/graphql", "aws_appsync_region": "us-east-1", "aws_appsync_authenticationType": "API_KEY", "aws_appsync_apiKey": "da2-****", "aws_cognito_identity_pool_id": "us-east-1:0afc5fb7-9bb5-45a0-ad98-50a9a38491c0", "aws_cognito_region": "us-east-1", "aws_user_pools_id": "us-east-1_eW3yGAOvZ", "aws_user_pools_web_client_id": "7al4qgvvsu8qkicdsqtl9n4stv", "oauth": {}, "aws_cognito_username_attributes": [ "EMAIL" ], "aws_cognito_social_providers": [], "aws_cognito_signup_attributes": [], "aws_cognito_mfa_configuration": "OFF", "aws_cognito_mfa_types": [ "SMS" ], "aws_cognito_password_protection_settings": { "passwordPolicyMinLength": 8, "passwordPolicyCharacters": [ "REQUIRES_LOWERCASE", "REQUIRES_NUMBERS", "REQUIRES_SYMBOLS", "REQUIRES_UPPERCASE" ] }, "aws_cognito_verification_mechanisms": [ "EMAIL" ], "aws_user_files_s3_bucket": "gr-movement-storage-e48b8b36191308-staging", "aws_user_files_s3_bucket_region": "us-east-1" }; export default awsmobile; ```
1
answers
0
votes
19
views
asked 3 days ago

Limitations of dynamoDB & GraphQL

**1.** Paginating a query: When I'm using ```ModelQuery.list(Todo.class,Todo.DESCRIPTION.contains("hi"), ModelPagination.limit(10)``` it is returning less than 10 items. It seems like it is returning ```Todo``` those ```DESCRIPTION``` contains ```hi``` from first 10 itmes in DynamoDB Todo table(It is filtering the itmes form the 10 itmes). If there is no items with ```DESCRIPTION``` contains ```hi``` in first 10 items of table it will return null. **My table have 25 items with description=hi** **My expectation:** It should return exactly 10 items which should have ```description=hi``` whether it is in the first 10 items of table or not. **2.** Getting the highest like comments & total comment count: For example we can take a YouTube video. When we open YouTube video comment section it will show us the comments with highest likes. We can't do that with graphQL and DynamoDB with **an easy way**. We have to do lot more to get highest liked comments. **There is no way to count the comments:** Look at the schema below: ``` type Post @model { id: ID! title: String! comments: [Comment] @hasMany } type Comment @model { id: ID! content: String! post: Post @belongsTo } ``` We can't count the total number of comments on the post. **Lets say we have to make a query for get post : we can directly retrieve the comments with post as we have created a relationship. Look at my YouTube video example like that how can we retrieve the comments with highest likes. **DynamoDB query max size is 1mb lets say a post has 1 million comments if we will query get post with 1 million comments, the response data may reach 1mb and the latency of response also become very high. For that pagination is provided I know, then after getting the nextToken we have to make a separate comment query for that post. **3.** NextToken issue: If I'm querying items with pagination( limit=10) it is returning a next token. For the next query we can use next token to get next 10 items. If I I'm creating a new items in the table . It is creating in between the items that are present before next Token. I have descrribed it here in a better way: https://stackoverflow.com/questions/73669620/how-to-code-a-simple-algorithm-to-fetch-list-of-data-through-pagination-in-a-fre
0
answers
0
votes
27
views
asked 17 days ago