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/build-a-backend/add-aws-services/custom-resources/index.mdx
+2-23Lines changed: 2 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Custom resources allow you to integrate any AWS service into an Amplify backend.
18
18
19
19
</Callout>
20
20
21
-
With Amplify (Gen 2), you can add custom AWS resources to an Amplify app using the [AWS Cloud Development Kit (AWS CDK)](https://docs.aws.amazon.com/cdk/latest/guide/home.html). The AWS CDK is an open source software development framework that defines your cloud application resources using familiar programming languages, such as TypeScript.
21
+
With Amplify (Gen 2), you can add custom AWS resources to an Amplify app using the [AWS Cloud Development Kit (AWS CDK)](https://docs.aws.amazon.com/cdk/latest/guide/home.html), which is installed by default as part of the [`create-amplify`](https://www.npmjs.com/package/create-amplify) workflow. The AWS CDK is an open source software development framework that defines your cloud application resources using familiar programming languages, such as TypeScript.
22
22
23
23
The AWS CDK can be used within an Amplify app to add custom resources and configurations beyond what Amplify supports out of the box. For example, a developer could use CDK to hook up a Redis cache, implement custom security rules, deploy containers on AWS Fargate, or use any other AWS service.
24
24
@@ -34,28 +34,7 @@ With the Amplify code-first DX, you can add existing or custom CDK [constructs](
34
34
35
35
## Adding an existing CDK construct
36
36
37
-
The AWS CDK comes with [many existing constructs](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-construct-library.html) that can be directly added to your Amplify backend. To get started, install the CDK library:
38
-
39
-
```bash
40
-
npm add --save-dev aws-cdk-lib constructs
41
-
```
42
-
43
-
<Calloutwarning>
44
-
45
-
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:
46
-
47
-
```
48
-
npm WARN Could not resolve dependency:
49
-
npm WARN peer aws-cdk-lib@"~2.103.0" from @aws-amplify/[email protected]
50
-
npm WARN node_modules/@aws-amplify/backend
51
-
npm WARN dev @aws-amplify/backend@"^0.4.0" from the root project
52
-
```
53
-
54
-
Using the sample warning text above, you would need to install `[email protected]`.
55
-
56
-
</Callout>
57
-
58
-
For example, to add an [Amazon Simple Queue Service (Amazon SQS)](https://aws.amazon.com/sqs/) queue and an [Amazon Simple Notification Service (Amazon SNS)](https://aws.amazon.com/sns/) topic to your backend, you can add the following to your `amplify/backend.ts` file.
37
+
The AWS CDK comes with [many existing constructs](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-construct-library.html) that can be directly added to your Amplify backend. For example, to add an [Amazon Simple Queue Service (Amazon SQS)](https://aws.amazon.com/sqs/) queue and an [Amazon Simple Notification Service (Amazon SNS)](https://aws.amazon.com/sns/) topic to your backend, you can add the following to your `amplify/backend.ts` file.
Copy file name to clipboardExpand all lines: src/pages/gen2/build-a-backend/storage/index.mdx
+3-22Lines changed: 3 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,32 +13,13 @@ export function getStaticProps(context) {
13
13
14
14
<Calloutinfo>
15
15
16
-
**Coming soon:** The Storage experience for Amplify (Gen 2) is still under development. You can add Amazon S3 to your Amplify (Gen 2) project with AWS CDK.
16
+
**Coming soon:** The Storage experience for Amplify (Gen 2) is still under development. You can add Amazon S3 to your Amplify (Gen 2) project with the AWS CDK.
17
17
18
18
</Callout>
19
19
20
-
To use Storage today, you must use the [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/). To get started, install the CDK library package:
20
+
To use Storage today, you must use the [AWS Cloud Development Kit (CDK)](https://docs.aws.amazon.com/cdk/), which is installed by default as part of the [`create-amplify`](https://www.npmjs.com/package/create-amplify) workflow.
21
21
22
-
```bash
23
-
npm add --save-dev aws-cdk-lib
24
-
```
25
-
26
-
<Calloutwarning>
27
-
28
-
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:
29
-
30
-
```
31
-
npm WARN Could not resolve dependency:
32
-
npm WARN peer aws-cdk-lib@"~2.103.0" from @aws-amplify/[email protected]
33
-
npm WARN node_modules/@aws-amplify/backend
34
-
npm WARN dev @aws-amplify/backend@"^0.4.0" from the root project
35
-
```
36
-
37
-
Using the sample warning text above, you would need to install `[email protected]`.
38
-
39
-
</Callout>
40
-
41
-
Next, modify your project's `backend.ts` file to create an Amazon S3 bucket and grant Amplify-generated resources access to read and write:
22
+
To get started, modify your project's `backend.ts` file to create an Amazon S3 bucket and grant Amplify-generated resources access to read and write:
0 commit comments