From e8577de476f65d75d3b1d79c059a6f5e8fb05cea Mon Sep 17 00:00:00 2001 From: Abdallah Shaban Date: Wed, 8 Feb 2023 13:50:06 -0800 Subject: [PATCH 1/2] Updated the @latest command for NextJS --- src/fragments/start/getting-started/next/setup.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragments/start/getting-started/next/setup.mdx b/src/fragments/start/getting-started/next/setup.mdx index d7cbfcee52d..e1ea8601a1a 100644 --- a/src/fragments/start/getting-started/next/setup.mdx +++ b/src/fragments/start/getting-started/next/setup.mdx @@ -3,7 +3,7 @@ To set up the project, you'll first create a new Next.js app with [Create Next A From your projects directory, run the following commands: ```bash -npx create-next-app next-amplified +npx create-next-app@latest next-amplified cd next-amplified ``` From b1f97c5d56a0a913dc258de73a3d653de1a8671b Mon Sep 17 00:00:00 2001 From: Abdallah Shaban Date: Wed, 8 Feb 2023 20:44:16 -0800 Subject: [PATCH 2/2] streamlined the getting started guide --- src/fragments/lib/auth/js/getting-started.mdx | 2 +- .../start/getting-started/next/setup.mdx | 4 +- .../getting-started/vanillajs/nextsteps.mdx | 51 ------------------- 3 files changed, 2 insertions(+), 55 deletions(-) diff --git a/src/fragments/lib/auth/js/getting-started.mdx b/src/fragments/lib/auth/js/getting-started.mdx index 9889556b37a..68b6734aa0d 100644 --- a/src/fragments/lib/auth/js/getting-started.mdx +++ b/src/fragments/lib/auth/js/getting-started.mdx @@ -42,7 +42,7 @@ import reactnative0 from '/src/fragments/lib/auth/js/getting-started-steps-basic -In your app's entry point (i.e. **App.js**, **index.js**, or **main.js**), import and load the configuration file: +In your app's entry point (i.e. **App.js**, **index.js**, **_app.js**, or **main.js**), import and load the configuration file: ```javascript import { Amplify, Auth } from 'aws-amplify'; diff --git a/src/fragments/start/getting-started/next/setup.mdx b/src/fragments/start/getting-started/next/setup.mdx index e1ea8601a1a..f193900fa5e 100644 --- a/src/fragments/start/getting-started/next/setup.mdx +++ b/src/fragments/start/getting-started/next/setup.mdx @@ -84,6 +84,4 @@ The first step to using Amplify in the client is to install the necessary depend npm install aws-amplify @aws-amplify/ui-react ``` -The `aws-amplify` package is the main library for working with Amplify in your apps. The `@aws-amplify/ui-react` package includes React-specific UI components you'll use as you build the app. - -Now that your Next.js app is set up and Amplify is initialized, you're ready to add an API in the next step. +The `aws-amplify` package is the main library for working with Amplify in your apps. The `@aws-amplify/ui-react` package includes React-specific UI components that you can use to build your app UI. To learn more about Amplify UI visit our [documentation](https://ui.docs.amplify.aws/). \ No newline at end of file diff --git a/src/fragments/start/getting-started/vanillajs/nextsteps.mdx b/src/fragments/start/getting-started/vanillajs/nextsteps.mdx index 9e7a5484e0b..82ad50faaec 100644 --- a/src/fragments/start/getting-started/vanillajs/nextsteps.mdx +++ b/src/fragments/start/getting-started/vanillajs/nextsteps.mdx @@ -8,54 +8,3 @@ - [Push Notification](/lib/push-notifications/getting-started) - [PubSub](/lib/pubsub/getting-started) - [AR/VR](/lib/xr/getting-started) - -## Existing AWS Resources - -If you want to use your existing AWS resources with your app you will need to **manually configure** your app with an `awsconfiguration.json` file in your code. For example, if you were using Amazon Cognito Identity, Cognito User Pools, AWS AppSync, or Amazon S3: - -```json -{ - "CredentialsProvider": { - "CognitoIdentity": { - "Default": { - "PoolId": "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab", - "Region": "XX-XXXX-X" - } - } - }, - "CognitoUserPool": { - "Default": { - "PoolId": "XX-XXXX-X_abcd1234", - "AppClientId": "XXXXXXXX", - "Region": "XX-XXXX-X" - } - }, - "AppSync": { - "Default": { - "ApiUrl": "https://XXXXXX.appsync-api.XX-XXXX-X.amazonaws.com/graphql", - "Region": "XX-XXXX-X", - "AuthMode": "AMAZON_COGNITO_USER_POOLS" - } - }, - "S3TransferUtility": { - "Default": { - "Bucket": "BUCKET_NAME", - "Region": "XX-XXXX-X" - } - } -} -``` - -In the configuration above, you would need to set the appropriate values such as `Region`, `Bucket`, etc. - -## AWS SDK Interfaces - -For working with other AWS services you can use service interface objects directly via the generated SDK clients. - - - -To work with service interface objects, your Amazon Cognito users' [IAM role](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html) must have the appropriate permissions to call the requested services. - - - -You can call methods on any AWS Service interface object supported by the AWS Android SDK by passing your credentials from the AWSMobileClient to the service call constructor. See [SDK Setup Options](/sdk/configuration/setup-options) for more information.