Skip to content

Commit

Permalink
Edit of How Amplify Gen 2 works (#6534)
Browse files Browse the repository at this point in the history
  • Loading branch information
hibler13 authored Nov 22, 2023
1 parent 3111f1c commit 4a9b629
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/gen2/how-amplify-works/concepts/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ All branches can be managed in the new Amplify console. The Gen-2 Amplify consol

### Data

The `@aws-amplify/backend` library offers a TypeScript-first `Data` library for setting up fully-typed real-time APIs (powered by AWS AppSync GraphQL APIs) and NoSQL databases (powered by Amazon DynamoDB tables). After you generate an Amplify backend, you will have an `amplify/data/resource.ts` file, which will contain your app's data schema. The `defineData` function turns the schema into a fully functioning data backend with all the boilerplate handled automatically.
The `@aws-amplify/backend` library offers a TypeScript-first `Data` library for setting up fully typed real-time APIs (powered by AWS AppSync GraphQL APIs) and NoSQL databases (powered by Amazon DynamoDB tables). After you generate an Amplify backend, you will have an `amplify/data/resource.ts` file, which will contain your app's data schema. The `defineData` function turns the schema into a fully functioning data backend with all the boilerplate handled automatically.

<Callout>
The schema-based approach is an evolution of the Amplify GraphQL API in Gen 1.
Expand Down Expand Up @@ -99,7 +99,7 @@ Auth works similarly to data. You can configure the authentication settings you
export const auth = defineAuth({
loginWith: {
email: {
verificationEmailSubject: 'Welcome 👋 verify your email!'
verificationEmailSubject: 'Welcome 👋 Verify your email!'
}
}
});
Expand Down Expand Up @@ -134,7 +134,7 @@ Amplify makes it easy to quickly build web app user interfaces using the UI comp

### Add any AWS resource

Gen 2 is layered on top of [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/api/v2/)—the Data and Auth capabilities in `@aws-amplify/backend` wrap L3 AWS CDK constructs. As a result, extending the Amplify generated resources does not require any special configuration (for example, Gen 1 requires `amplify add custom` to create a new sub-project with its own dependency tree). The following example adds Amazon Location Services by adding a file: `amplify/custom/maps/resource.ts`.
Gen 2 is layered on top of [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/api/v2/)—the Data and Auth capabilities in `@aws-amplify/backend` wrap L3 AWS CDK constructs. As a result, extending the resources generated by Amplify does not require any special configuration (for example, Gen 1 requires `amplify add custom` to create a new sub-project with its own dependency tree). The following example adds Amazon Location Services by adding a file: `amplify/custom/maps/resource.ts`.

```ts
import { CfnOutput, Stack, StackProps } from 'aws-cdk-lib';
Expand Down

0 comments on commit 4a9b629

Please sign in to comment.