You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/gen2/reference/project-structure/index.mdx
+7-28Lines changed: 7 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
exportconst meta = {
2
2
title: 'Project structure',
3
-
description: 'Learn more about the Amplify project structure.'
3
+
description: 'Learn more about how Amplify projects are structured.'
4
4
};
5
5
6
6
exportfunction getStaticProps(context) {
@@ -11,9 +11,9 @@ export function getStaticProps(context) {
11
11
};
12
12
}
13
13
14
-
Amplify (Gen 2) backends are defined using TypeScript, and enable you to collocate resources depending on their function. For example, you can author a [Post Confirmation trigger for Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html) right next to your auth's resource file.
14
+
Amplify (Gen 2) backends are defined using TypeScript, and enable you to collocate resources depending on their function. For example, you can author a [post confirmation trigger for Amazon Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-post-confirmation.html) right next to your auth's resource file.
15
15
16
-
First, after creating your first Amplify project with`npm create amplify@latest`, it will contain the scaffolding for Data and Authentication resources:
16
+
When you create your first Amplify project using`npm create amplify@latest`, it will automatically set up the scaffolding for Data and Authentication resources:
17
17
18
18
```text
19
19
├── amplify/
@@ -30,7 +30,7 @@ First, after creating your first Amplify project with `npm create amplify@latest
30
30
└── tsconfig.json
31
31
```
32
32
33
-
As your project grows and your backend is built out, the structure of your project may look like the following:
33
+
As your project grows and you build out your backend, the structure of your project may look like the following:
Backends can be extended using the [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html). By leveraging CDK you can build using any AWS service, such as an Amazon S3 bucket that authenticated users have read and write access to. You can get started by installing AWS CDK:
105
-
106
-
```bash
107
-
npm add --save-dev aws-cdk-lib
108
-
```
109
-
110
-
<Calloutwarning>
111
-
112
-
Depending on the Node.js package manager you are using, you may encounter warnings where it is now unable to resolve the peer dependency version `@aws-amplify/backend` has on `aws-cdk-lib`. If you encounter a warning similar to the following, re-install the version specified in the warning text:
113
-
114
-
```
115
-
npm WARN Could not resolve dependency:
116
-
npm WARN peer aws-cdk-lib@"~2.103.0" from @aws-amplify/[email protected]
117
-
npm WARN node_modules/@aws-amplify/backend
118
-
npm WARN dev @aws-amplify/backend@"^0.4.0" from the root project
119
-
```
120
-
121
-
Using the sample warning text above, you would need to install `[email protected]`.
122
-
123
-
</Callout>
124
-
125
-
Then add CDK to your backend:
104
+
You can extend backends by using the [AWS Cloud Development Kit (AWS CDK)](https://docs.aws.amazon.com/cdk/v2/guide/home.html), which is installed by default as part of the `create amplify` workflow. With the CDK, you can build using any AWS service, such as an Amazon S3 bucket that authenticated users have read and write access to. To get started with the CDK, add it to your backend:
0 commit comments