amplify-cli | The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development | AWS library
kandi X-RAY | amplify-cli Summary
kandi X-RAY | amplify-cli Summary
The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of amplify-cli
amplify-cli Key Features
amplify-cli Examples and Code Snippets
npm install -g @aws-amplify/cli
amplify configure
npm install -g @aws-amplify/cli
$ amplify --version
Scanning for plugins...
Plugin scan successful
Amplify CLI uses Lambda backed custom resources with CloudFormation to manage part of your backend resources.
In r
npm install -g @aws-amplify/cli
$ amplify configure
amplify init
amplify add api #this will create your API as AWS Lambda functions exposed through Amazon API Gateway)
amplify push #to create all this on your AWS
$ sudo npm install -g @aws-amplify/cli
Community Discussions
Trending Discussions on amplify-cli
QUESTION
I have an amplify project with a an appsync graphql api set up through amplify-cli. The project has cognito user pools integration. My goal is to have a nodeJS script on an external server perform queries on my graphql api. My question is related to correct way to set up authentication for the schema...
An excerpt of a particular model my schema I would like to access:
...ANSWER
Answered 2022-Mar-09 at 23:32I ended up finding a solution by authenticating via cognito user pools.
- The tables that needed to be accessed by this user, I had to limited by a user group, in this case "extConnection". So I added this group to the user account. I then used the guide written by this individual here to reach my solution: https://www.fullsapps.com/2019/02/calling-aws-appsync-or-any-graphql-api_14.html .
- I then used the npm packages 'amazon-cognito-identity-js' and 'graphql-request' to build the cognito auth handshake headers and return the access token.
- I used the access token to make a gql request, and that returned the needed data.
Sample code:
QUESTION
I'm starting a project with Amplify S3 storage. I have followed many tutorials and example projects.
I downloaded this sample project: https://github.com/aws-amplify/amplify-flutter/tree/main/example
But I get the following error, when caled Amplify.configue(amplifyconfig):
E/flutter ( 5798): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: AnalyticsException(message: Unable to read appId or region from the amplify configuration json., recoverySuggestion: Make sure amplifyconfiguration.json is a valid json object in expected format. Please take a look at the documentation for expected format of amplifyconfiguration.json., underlyingException: org.json.JSONException: No value for pinpointAnalytics) E/flutter ( 5798): #0 AmplifyClass.configure (package:amplify_flutter/amplify.dart:171:9) E/flutter ( 5798): E/flutter ( 5798): #1 _MyAppState._initAmplifyFlutter (package:sample_app/main.dart:65:7) E/flutter ( 5798): E/flutter ( 5798):
This is some of the code:
...ANSWER
Answered 2021-Nov-11 at 06:19You never added analytics to your project. You did
QUESTION
We have AWS Amplify project with CI/CD enabled and AppSync as API enabled for my backend. CI/CD was working fine till the API_KEY of AppSync app was not expired, now it has been expired and pipelines are failing. I have tried manually updating the API_KEY expiration, but the pipeline still fails. There are solutions described to sort out manually or upgrade Amplify CLI version, but it seems I don't have both options in my case.
Do we have any third option?
Below are logs from the build pipeline.
...ANSWER
Answered 2021-Oct-04 at 13:42After adding "CreateAPIKey": 0
to parametes.json
has resolved my issue.
QUESTION
I'm trying to set up an AWS Amplify JavaScript project with Gitpod in a way that when I start a new Workspace I don't have to manually go through the amplify-cli
steps (adding IAM user, generating aws-exports.js
file, etc.).
I've managed to successfully install the aws-cli
and amplify-cli
on the machine so far (I'm adding this to my .gitpod.yml
file on task init)
ANSWER
Answered 2021-Aug-24 at 12:53I've got it working, first I've added these environment variables for the amplify
setup using the Gitpod account settings:
QUESTION
I'm trying to write a schema so that I can query models filtered by multiple keys, sorted by a custom key and paginated.
an example of my model:
...ANSWER
Answered 2021-Jun-25 at 12:34- Filtering
You will need a Global Secondary Index in DynamoDB to achieve such a behaviour. You can create them with the @key annotation. I your case I would create a composite key consisting of the category for the partition key and area and publishOn as the sort key(s).
QUESTION
Which Category is your question related to? DynamoDB, AppSync(GraphQL)
Amplify CLI Version 4.50.2
Provide additional details e.g. code snippets
BACKGROUND: I'm new in AWS serverless app systems and as a frontend dev, I'm quite enjoying it thanks to auto-generated APIs, tables, connections, resolvers etc. I'm using Angular/Ionic in frontend and S3, DynamoDB, AppSync, Cognito, Amplify-cli for the backend.
WHAT I HAVE: Here is a part of my schema. I can easily use auto-generated APIs to List/Get Feedbacks with additional filters (i.e. score: { ge: 3 }). And thanks to the @connection I can see the User's details in the listed Feedback items.
...ANSWER
Answered 2021-May-13 at 20:54Amplify, and really DynamoDB in general, requires you to think about your access patterns ahead of time. There is a lot of really good information out there to help guide you through what this thought process can look like. Particularly, I like Nader Dabit's https://dev.to/dabit3/data-modeling-in-depth-with-graphql-aws-amplify-17-data-access-patterns-4meh
At first glance, I think I would add a new @key called byCountry to the User model, which will create a new Global Secondary Index on that property for you in DDB and will give you some new query methods as well. Check out https://docs.amplify.aws/cli/graphql-transformer/key#designing-data-models-using-key for more examples.
Once you have User.getByCountry in place, you should then be able to also bring back each user's Feedbacks.
QUESTION
I have installed Amplify CLI with curl and npm, I which to keep one, so I'm uninstalling curl just because in my personal case npm is easier for me to update, this is the command I used to install it:
...ANSWER
Answered 2021-Feb-13 at 10:51You have to clean up manually seems to me which isnt that hard though.
Binary is located in $HOME/.amplify/bin/amplify
. Then depending on your shell you can remove the custom path and configuration added by the installation script.
QUESTION
I've just started learning AWS Amplify and followed the step given in https://aws.amazon.com/getting-started/hands-on/build-flutter-app-amplify/module-two/ to initialize Amplify in my flutter project. But I'm getting The method 'Amplify' isn't defined for the type '_MyAppState' error when I'm trying to integrate Amplify (with statement final _amplify = Amplify();) in my App.
Below is my main.dart file.
...ANSWER
Answered 2021-Feb-27 at 19:09According to https://github.com/aws-amplify/amplify-flutter/issues/274 amplify_core is now renamed to amplify_flutter so you need to change
QUESTION
When running the Amplify Flutter tutorial project after configuring the authentication plugin, I constantly receive the following error:
...ANSWER
Answered 2021-Feb-23 at 18:11As of posting, Amplify-Flutter does not support the Web platform, and this error is expected behavior until then. See: https://github.com/aws-amplify/amplify-flutter/issues/234
QUESTION
We are moving our auth to Cognito and need to alter the token we get from Cognito. We are using a Pre Token Generation Lambda Trigger to accomplish this. We are also using Amplify's Auth library. However, I can not access the clientMetadata we are sending with Auth.signIn()
.
On the front-end we simply have:
...ANSWER
Answered 2021-Feb-22 at 23:11Try setting the metadata value using Auth.configure
before executing Auth.signIn
. On one hand, it doesn't look like the sign-in event is a pre-token lambda trigger, which explains why the metadata isn't being passed. I appreciate that this is not especially intuitive. That said, on the other hand and assuming you will need to access the same metadata value when tokens are generated as part of a refresh, you'll likely need to cover additional non-initial-signIn events anyways. Using Auth.configure
looks to do the trick for both.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install amplify-cli
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page