{"id":47963,"date":"2024-01-05T20:06:28","date_gmt":"2023-05-20T16:22:30","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/"},"modified":"2024-05-04T17:03:18","modified_gmt":"2024-05-04T09:03:18","slug":"aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/","title":{"rendered":"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55"},"content":{"rendered":"<h1>\u7b80\u8ff0<\/h1>\n<p>\u8fd9\u662f\u6211\u5728\u9605\u8bfbAWS Amplify (\u30a2\u30f3\u30d7\u30ea\u30d5\u30a1\u30a4)\u6846\u67b6\u7684\u5165\u95e8\u9875\u9762\uff08Getting Started\uff09\u5e76\u5b66\u4e60\u57fa\u672c\u4f7f\u7528\u65b9\u6cd5\u65f6\u8bb0\u5f55\u7684\u7b14\u8bb0\u3002<\/p>\n<p>\u73af\u5883<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Windows 10 Professional 1903<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">aws CLI 2.0.7<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">amplify CLI 4.18.0<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Node.js 12.16.2<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">npm 6.14.4<\/ul>\n<p>\u8bf7\u53c2\u8003<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">AWS Amplify<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">Amplify \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<\/ul>\n<h1>\u5b89\u88c5\u548c\u914d\u7f6eAmplify CLI<\/h1>\n<p>Amplify CLI\u662fAmplify\u6846\u67b6\u7684\u4e00\u4e2a\u7ec4\u4ef6\uff0c\u53ef\u7528\u4e8e\u901a\u8fc7\u547d\u4ee4\u884c\u521b\u5efa\u9879\u76ee\u548c\u6784\u5efa\u540e\u7aef\u670d\u52a1\u3002<\/p>\n<h2>\u524d\u63d0 (qian tI)- precondition<\/h2>\n<p>\u5b89\u88c5 Amplify CLI \u9700\u8981 Node.js 8.x \u6216\u66f4\u9ad8\u7248\u672c\uff0c\u4ee5\u53ca npm 5.x \u6216\u66f4\u9ad8\u7248\u672c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> node <span class=\"nt\">-v<\/span>\r\n<span class=\"go\">v12.16.2\r\n\r\n<\/span><span class=\"gp\">&gt;<\/span> npm <span class=\"nt\">-v<\/span>\r\n<span class=\"go\">6.14.4\r\n<\/span><\/code><\/pre>\n<p>\u53e6\u5916\uff0c\u867d\u7136\u4e0d\u9700\u8981\u4f7f\u7528AWS CLI\uff0c\u4f46\u6211\u4f1a\u63d0\u4f9b\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> aws <span class=\"nt\">--version<\/span>\r\n<span class=\"go\">aws-cli\/2.0.7 Python\/3.7.5 Windows\/10 botocore\/2.0.0dev11\r\n<\/span><\/code><\/pre>\n<h2>\u5b89\u88c5<\/h2>\n<p>\u8bf7\u4f7f\u7528npm\u6765\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> npm <span class=\"nb\">install<\/span> <span class=\"nt\">-g<\/span> @aws-amplify\/cli\r\n<span class=\"go\">\r\n\/\/ \u7701\u7565\r\n\r\n----------------------------------------\r\nSuccessfully installed the Amplify CLI\r\n----------------------------------------\r\n\r\n\r\nJavaScript Getting Started - https:\/\/aws-amplify.github.io\/docs\/js\/start\r\n\r\n\r\nAndroid Getting Started - https:\/\/aws-amplify.github.io\/docs\/android\/start\r\n\r\n\r\niOS Getting Started - https:\/\/aws-amplify.github.io\/docs\/ios\/start\r\n\r\n\/\/ \u7701\u7565\r\n\r\n+ @aws-amplify\/cli@4.18.0\r\nadded 1048 packages from 713 contributors in 225.911s\r\n<\/span><\/code><\/pre>\n<p>\u786e\u8ba4\u7248\u672c<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify <span class=\"nt\">--version<\/span>\r\n<span class=\"go\">Scanning for plugins...\r\nPlugin scan successful\r\n4.18.0\r\n<\/span><\/code><\/pre>\n<p>\u5b89\u88c5\u4e86 @aws-amplify\/cli \u540e\uff0c\u5728\u663e\u793a\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u5217\u8868\u65f6\uff0c\u5c06\u4f1a\u663e\u793a\u4ee5\u4e0b\u591a\u884c\u6d88\u606f\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> npm <span class=\"nt\">-g<\/span> <span class=\"nb\">ls<\/span> <span class=\"nt\">-depth<\/span><span class=\"o\">=<\/span>0\r\n<span class=\"go\">\r\nnpm ERR! peer dep missing: inquirer@^5.0.0 || ^6.0.0, required by inquirer-autocomplete-prompt@1.0.2\r\n\/\/ \u8907\u6570\u884c\u8868\u793a\u3055\u308c\u308b\r\n<\/span><\/code><\/pre>\n<p>\u4f3c\u4e4e\u51fa\u73b0\u4e86\u9519\u8bef(Peer dependency missing #3284)\uff0c\u4f46\u4f3c\u4e4e\u5bf9\u64cd\u4f5c\u6ca1\u6709\u5f71\u54cd\u3002<\/p>\n<h2>\u8bbe\u5b9a<\/h2>\n<blockquote><p>\u8bbe\u7f6e amplify-cli \u9879\u76ee\u7684\u5c5e\u6027\uff0c\u4f8b\u5982\u5207\u6362\u524d\u7aef\u6846\u67b6\u548c\u6dfb\u52a0\/\u5220\u9664\u4e91\u63d0\u4f9b\u5546\u63d2\u4ef6\u3002<\/p><\/blockquote>\n<p>\u8bbe\u7f6e\u53ef\u4ee5\u901a\u8fc7amplify configure\u547d\u4ee4\u8fdb\u884c\u3002\u8bbe\u7f6e\u662f\u901a\u8fc7\u5bf9\u8bdd\u5f62\u5f0f\u8fdb\u884c\u7684\uff0c\u5e76\u4e14\u5728\u8fc7\u7a0b\u4e2d\u9700\u8981\u5728AWS\u63a7\u5236\u53f0\u4e0a\u6ce8\u518c\u65b0\u7684IAM\u7528\u6237\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify configure\r\n<span class=\"go\">\r\nFollow these steps to set up access to your AWS account:\r\nSign in to your AWS administrator account:\r\nhttps:\/\/console.aws.amazon.com\/\r\nPress Enter to continue\r\n<\/span><\/code><\/pre>\n<p>\u5728\u8fd9\u4e2a\u65f6\u5019\uff0cAWS\u63a7\u5236\u53f0\u7684\u767b\u5f55\u9875\u9762\u4f1a\u663e\u793a\u5728\u6d4f\u89c8\u5668\u4e0a\uff0c\u7136\u540e\u60a8\u53ef\u4ee5\u4f7f\u7528\u7ba1\u7406\u5458\u8d26\u53f7\u767b\u5f55\u3002<br \/>\n\u767b\u5f55\u6210\u529f\u540e\uff0c\u8bf7\u6309Enter\u7ee7\u7eed\u3002<\/p>\n<p>\u63a5\u4e0b\u6765\u9009\u62e9\u533a\u57df\uff08\u4f8b\u5982\u6b64\u4f8b\u4e2d\u7684ap-northeast-1\uff09\uff0c\u7136\u540e\u8f93\u5165\u8981\u6dfb\u52a0\u7684IAM\u7528\u6237\u540d\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f1a\u663e\u793aamplify-{\u968f\u673a\u82f1\u6570\u5b57}\uff0c\u5982\u679c\u4e0d\u9700\u8981\u66f4\u6539\u53ef\u4ee5\u76f4\u63a5\u6309Enter\uff0c\u5982\u679c\u9700\u8981\u5176\u4ed6\u540d\u79f0\u5219\u8f93\u5165\u76f8\u5e94\u7684\u540d\u79f0\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">Specify the AWS Region\r\n? region:  ap-northeast-1\r\nSpecify the username of the new IAM user:\r\n? user name:  amplify-8ZcOy\r\nComplete the user creation using the AWS console\r\n<\/span><span class=\"gp\">https:\/\/console.aws.amazon.com\/iam\/home?region=undefined#<\/span>\/users<span class=\"nv\">$new<\/span>?step<span class=\"o\">=<\/span>final&amp;accessKey&amp;userNames<span class=\"o\">=<\/span>amplify-8ZcOy&amp;permissionType<span class=\"o\">=<\/span>policies&amp;policies<span class=\"o\">=<\/span>arn:aws:iam::aws:policy%2FAdministratorAccess\r\n<span class=\"go\">Press Enter to continue\r\n<\/span><\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/28-4.png\" alt=\"amplify-05.png\" \/><\/div>\n<p>\u8f93\u5165\u65b0\u589e\u7684IAM\u7528\u6237\u7684\u8bbf\u95ee\u5bc6\u94a5ID\u548c\u79d8\u5bc6\u8bbf\u95ee\u5bc6\u94a5\uff0c\u7136\u540e\u521b\u5efa\u65b0\u7684\u914d\u7f6e\u6587\u4ef6\u3002<br \/>\n\u914d\u7f6e\u6587\u4ef6\u540d\u79f0\u4e0e\u7528\u6237\u540d\u76f8\u540c\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">Enter the access key of the newly created user:\r\n? accessKeyId:  XXXXXXXXXXXX**********\r\n? secretAccessKey:  XXXXXXXXXXXXXXXXXXXX********************\r\nThis would update\/create the AWS Profile in your local machine\r\n? Profile Name:  amplify-8ZcOy\r\n\r\nSuccessfully set up the new user.\r\n<\/span><\/code><\/pre>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8bbe\u7f6e\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n<p>\u4e3a\u4e86\u786e\u8ba4\u4e00\u4e0b\uff0c\u5728AWS CLI\u4e2d\u6ce8\u518c\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u6211\u5c06\u5c1d\u8bd5\u67e5\u770b\u5b83\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> aws configure list <span class=\"nt\">--profile<\/span> amplify-8ZcOy\r\n<span class=\"go\">\r\n      Name                    Value             Type    Location\r\n      ----                    -----             ----    --------\r\n   profile            amplify-8ZcOy           manual    --profile\r\naccess_key     ****************XXXX shared-credentials-file\r\nsecret_key     ****************XXXX shared-credentials-file\r\n    region           ap-northeast-1      config-file    ~\/.aws\/config\r\n<\/span><\/code><\/pre>\n<h1>\u521b\u5efa\u4e00\u4e2aWeb\u5e94\u7528\u9879\u76ee<\/h1>\n<p>Amplify Framework \u63d0\u4f9b\u4e86\u7528\u4e8e\u4e0e iOS\u3001Android\u3001Web \u4ee5\u53ca React Native \u7b49\u5e94\u7528\u7a0b\u5e8f\u96c6\u6210\u7684\u5e93\u548c UI \u7ec4\u4ef6\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/36-0.png\" alt=\"get_started.png\" \/><\/div>\n<p>\u5728JavaScript\u7684\u6846\u67b6\u4e2d\uff0c\u5305\u62ecAngular\u3001Ember.js\u3001Ionic\u3001React\u3001Vue\u7b49\u88ab\u652f\u6301\u3002<\/p>\n<h2>\u51c6\u5907\u9879\u76ee\u7684\u6a21\u677f<\/h2>\n<p>\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u540d\u4e3ademo-amplify-js-app\u7684\u6587\u4ef6\u5939\uff0c\u5e76\u521b\u5efa\u4e0b\u9762\u7684\u7a7a\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/src\r\n  |     |\r\n  |     `--- app.js\r\n  |\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/41-0.png\" alt=\"project-01.png\" \/><\/div>\n<pre class=\"post-pre\"><code>http:\/\/localhost:8080\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/43-0.png\" alt=\"amplify-06.png\" \/><\/div>\n<p>\u4ee5\u4e0a\u5b8c\u6210\u4e86\u9879\u76ee\u6a21\u677f\u7684\u51c6\u5907\u5de5\u4f5c\u3002<\/p>\n<h2>\u9879\u76ee\u7684\u542f\u52a8<\/h2>\n<h3>\u6269\u5927\u521d\u59cb<\/h3>\n<blockquote><p>\u521d\u59cb\u5316\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5728\u4e91\u4e2d\u8bbe\u7f6e\u90e8\u7f72\u8d44\u6e90\uff0c\u5e76\u4f7f\u60a8\u7684\u9879\u76ee\u51c6\u5907\u597d\u4f7f\u7528Amplify\u3002<\/p><\/blockquote>\n<p>\u4f7f\u7528amplify init\u547d\u4ee4\u8fdb\u884c\u521d\u59cb\u5316\u3002\u9879\u76ee\u7684\u521d\u59cb\u5316\u662f\u4ee5\u5bf9\u8bdd\u5f62\u5f0f\u8fdb\u884c\u7684\u3002<br \/>\n\u5e26\u6709\u95ee\u53f7\u7684\u884c\u662f\u9700\u8981\u8f93\u5165\/\u9009\u62e9\u7684\u9879\u76ee\u3002<br \/>\n\u8f93\u5165\u73af\u5883(environment)\u7684\u540d\u79f0\uff0c\u4f46\u5728\u8fd9\u91cc\u6211\u4eec\u5c06\u5176\u8f93\u5165\u4e3a&#8221;prod&#8221;\uff0c\u4ee3\u8868&#8221;\u751f\u4ea7\u73af\u5883&#8221;\u3002\u73af\u5883\u6307\u7684\u662f\u6240\u8c13\u7684&#8221;\u751f\u4ea7\u73af\u5883&#8221;\u548c&#8221;\u5f00\u53d1\u73af\u5883&#8221;\uff0camplify\u547d\u4ee4\u53ef\u4ee5\u901a\u8fc7\u6307\u5b9a\u73af\u5883\u540d\u79f0\u6765\u5207\u6362\u591a\u4e2a\u73af\u5883\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify init\r\n<span class=\"go\">\r\nNote: It is recommended to run this command from the root of your app directory\r\n? Enter a name for the project demo-amplify-js-app\r\n? Enter a name for the environment prod\r\n? Choose your default editor: Visual Studio Code\r\n? Choose the type of app that you're building javascript\r\nPlease tell us about your project\r\n? What javascript framework are you using none\r\n? Source Directory Path:  src\r\n? Distribution Directory Path: dist\r\n? Build Command:  npm.cmd run-script build\r\n? Start Command: npm.cmd run-script start\r\nUsing default provider  awscloudformation\r\n\r\nFor more information on AWS Profiles, see:\r\nhttps:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-multiple-profiles.html\r\n<\/span><\/code><\/pre>\n<p>\u5728\u63a5\u4e0b\u6765\uff0c\u5f53\u88ab\u8be2\u95ee\u662f\u5426\u8981\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u65f6\uff0c\u8bf7\u9009\u62e9&#8221;Yes&#8221;\uff0c\u7136\u540e\u9009\u62e9\u4f7f\u7528\u901a\u8fc7amplify configure\u521b\u5efa\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5728\u6b64\u793a\u4f8b\u4e2d\u4e3aamplify-8ZcOy\uff09\u3002<br \/>\n\u4e4b\u540e\uff0c\u5c06\u8fdb\u884c\u9879\u76ee\u521d\u59cb\u5316\u5904\u7406\uff0c\u5e76\u5728AWS\u4e0a\u6dfb\u52a0\u4e00\u4e9b\u8d44\u6e90\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"go\">? Do you want to use an AWS profile? Yes\r\n? Please choose the profile you want to use amplify-8ZcOy\r\nAdding backend environment dev to AWS Amplify Console app: xxxxxxxxxxxxxx\r\n- Initializing project in the cloud...\r\n\r\n\/\/ \u7701\u7565\r\n\r\nYour project has been successfully initialized and connected to the cloud!\r\n\r\nSome next steps:\r\n\"amplify status\" will show you what you've added already and if it's locally configured or deployed\r\n<\/span><span class=\"gp\">\"amplify add &lt;category&gt;<\/span><span class=\"s2\">\" will allow you to add features like user login or a backend API\r\n<\/span><span class=\"go\">\"amplify push\" will build all your local backend resources and provision it in the cloud\r\n\u201camplify console\u201d to open the Amplify Console and view your project status\r\n\"amplify publish\" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud\r\n\r\nPro tip:\r\nTry \"amplify add api\" to create a backend API and then \"amplify publish\" to deploy everything\r\n<\/span><\/code><\/pre>\n<h4>\u5728AWS\u4e0a\u7531init\u521b\u5efa\u7684\u8d44\u6e90\u3002<\/h4>\n<p>\u4ee5\u4e0b\u8d44\u6e90\u5c06\u5728AWS\u4e0a\u521b\u5efa\u3002\u987a\u4fbf\u4e00\u63d0\uff0c\u8d44\u6e90\u6307\u7684\u662fS3\u6216DynamoDB\u3002<\/p>\n<h5>\u653e\u5927\u4eea\u8868\u53f0<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/55-1.png\" alt=\"init-amplify-console.png\" \/><\/div>\n<h5>\u4e91\u5f62\u6210<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/57-0.png\" alt=\"init-cloudformation-stack.png\" \/><\/div>\n<h5>S3<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/59-0.png\" alt=\"init-s3-bucket.png\" \/><\/div>\n<h5>\u89d2\u8272<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/61-0.png\" alt=\"init-roles.png\" \/><\/div>\n<h4>\u5728init\u4e4b\u540e\u7684\u9879\u76ee<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/63-0.png\" alt=\"project-02.png\" \/><\/div>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/amplify               &lt;--- add\r\n  |      |\r\n  |      `--- \/.config\r\n  |      |      |\r\n  |      |      `--- local-aws-info.json\r\n  |      |      `--- local-env-info.json\r\n  |      |      `--- project-config.json\r\n  |      |\r\n  |      `--- \/#current-cloud-backend\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |\r\n  |      `--- \/backend\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- teram-provider-info.json\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- app.js\r\n  |     `--- aws-exports.js   &lt;--- add\r\n  |\r\n  `--- .gitignore             &lt;--- add\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<h3>\u9879\u76ee\u7684git\u7248\u672c\u63a7\u5236<\/h3>\n<p>\u5728`init`\u4e2d\uff0c\u5df2\u7ecf\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3a`.gitignore`\u7684\u6587\u4ef6\uff0c\u5176\u5185\u5bb9\u5982\u4e0b\u3002\u8fd9\u4e2a\u6587\u4ef6\u5217\u51fa\u4e86\u4e00\u4e9b\u4e0d\u9700\u8981\u8fdb\u884c\u7248\u672c\u63a7\u5236\u6216\u8005\u4e0d\u80fd\u8fdb\u884c\u7248\u672c\u63a7\u5236\u7684\u6587\u4ef6\u3002<br \/>\n\u4e3a\u4e86\u66f4\u65b9\u4fbf\u5730\u4e86\u89e3\u4ee5\u540e\u9879\u76ee\u7684\u66f4\u65b0\u5185\u5bb9\uff0c\u6211\u4eec\u5c06\u5728\u6b64\u65f6\u5c06\u5176\u8f6c\u5316\u4e3a\u4e00\u4e2aGit\u4ed3\u5e93\u3002<\/p>\n<pre class=\"post-pre\"><code>#amplify\r\namplify\/\\#current-cloud-backend\r\namplify\/.config\/local-*\r\namplify\/mock-data\r\namplify\/backend\/amplify-meta.json\r\namplify\/backend\/awscloudformation\r\nbuild\/\r\ndist\/\r\nnode_modules\/\r\naws-exports.js\r\nawsconfiguration.json\r\namplifyconfiguration.json\r\namplify-build-config.json\r\namplify-gradle-config.json\r\namplifyxc.config\r\n<\/code><\/pre>\n<h3>\u63d0\u5347\u8eab\u4efd\u5730\u4f4d<\/h3>\n<blockquote><p>\u663e\u793a\u5c1a\u672a\u63a8\u9001\u5230\u4e91\u7aef\u7684\u672c\u5730\u8d44\u6e90\u7684\u72b6\u6001\uff08\u521b\u5efa\/\u66f4\u65b0\/\u5220\u9664\uff09\u3002<\/p><\/blockquote>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528amplify status\u547d\u4ee4\u6765\u786e\u8ba4\u9879\u76ee\u6b63\u5728\u4f7f\u7528\u54ea\u4e9b\u8d44\u6e90\u3002init\u540e\uff0c\u7531\u4e8e\u5728AWS\u4e0a\u8fd8\u6ca1\u6709\u4efb\u4f55\u8d44\u6e90\uff0c\u56e0\u6b64\u4f1a\u663e\u793a\u4e00\u4e2a\u7a7a\u8868\u683c\uff0c\u5982\u4e0b\u6240\u793a\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name | Operation | Provider plugin |\r\n| -------- | ------------- | --------- | --------------- |\r\n<\/span><\/code><\/pre>\n<h2>\u5728\u9879\u76ee\u4e2d\u6dfb\u52a0API\u3002<\/h2>\n<h3>\u589e\u5f3a \u6dfb\u52a0 API<\/h3>\n<blockquote><p>\u5728\u672c\u5730\u540e\u7aef\u6dfb\u52a0Amplify\u5206\u7c7b\u7684\u8d44\u6e90<\/p><\/blockquote>\n<p>\u4f7f\u7528 amplify add api \u547d\u4ee4\u6dfb\u52a0 API\u3002\u8be5\u547d\u4ee4\u4e5f\u4ee5\u4ea4\u4e92\u65b9\u5f0f\u8fdb\u884c\u914d\u7f6e\u3002<br \/>\n\u5728 API \u7684\u9009\u62e9\u4e2d\uff0c\u6211\u4eec\u9009\u62e9\u4e86 GraphQL\uff0c\u5e76\u5c06\u5176\u547d\u540d\u4e3a todo\u3002<br \/>\n\u540c\u65f6\uff0c\u7cfb\u7edf\u4f1a\u8be2\u95ee\u662f\u5426\u521b\u5efa\u4e00\u4e2a\u6a21\u5f0f\uff0c\u6211\u4eec\u9009\u62e9\u4e86 Yes\uff0c\u5e76\u9009\u62e9\u4e86\u540d\u4e3a &#8220;Todo&#8221; \u7684\u6a21\u5f0f\u3002\uff08\u203b \u8fd9\u4e2a\u6a21\u5f0f\u53ef\u4ee5\u662f\u7528\u4e8e\u8bf4\u660e\u7684\u6837\u4f8b\uff0c\u4e5f\u53ef\u4ee5\u9009\u62e9\u540d\u4e3a &#8220;Posts&#8221; \u7684\u7a0d\u590d\u6742\u6a21\u5f0f\u3002\uff09<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify add api\r\n<span class=\"go\">\r\n? Please select from one of the below mentioned services: GraphQL\r\n? Provide API name: todo\r\n? Choose the default authorization type for the API API key\r\n? Enter a description for the API key: todo api\r\n? After how many days from now the API key should expire (1-365): 7\r\n? Do you want to configure advanced settings for the GraphQL API No, I am done.\r\n? Do you have an annotated GraphQL schema? No\r\n? Do you want a guided schema creation? Yes\r\n? What best describes your project: Single object with fields (e.g., \u201cTodo\u201d with ID, name, description)\r\n? Do you want to edit the schema now? No\r\n\r\nThe following types do not have '@auth' enabled. Consider using @auth with @model\r\n         - Todo\r\n<\/span><span class=\"gp\">Learn more about @auth here: https:\/\/aws-amplify.github.io\/docs\/cli-toolchain\/graphql#<\/span>auth\r\n<span class=\"go\">\r\n\r\nGraphQL schema compiled successfully.\r\n\r\nEdit your schema at D:\\dev\\vsc-workspace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema.graphql or place .graphql files in a directory at D:\\dev\\vsc-worksp\r\nace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema\r\nSuccessfully added resource todo locally\r\n\r\nSome next steps:\r\n\"amplify push\" will build all your local backend resources and provision it in the cloud\r\n\"amplify publish\" will build all your local backend and frontend resources (if you have hosting category added) and provision it in the cloud\r\n<\/span><\/code><\/pre>\n<h4>\u5728\u52a0\u5165API\u4e4b\u540e\u7684\u9879\u76ee<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/78-0.png\" alt=\"project-03.png\" \/><\/div>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/amplify\r\n  |      |\r\n  |      `--- \/.config\r\n  |      |      |\r\n  |      |      `--- local-aws-info.json\r\n  |      |      `--- local-env-info.json\r\n  |      |      `--- project-config.json\r\n  |      |\r\n  |      `--- \/#current-cloud-backend\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |\r\n  |      `--- \/backend\r\n  |      |      |\r\n  |      |      `--- \/api                      &lt;--- add\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo              &lt;--- amplify add api\u3067\u6307\u5b9a\u3057\u305fAPI\u540d\r\n  |      |      |             |\r\n  |      |      |             `--- \/build\r\n  |      |      |             `--- \/resolvers\r\n  |      |      |             `--- \/stacks\r\n  |      |      |             |      |\r\n  |      |      |             |      `--- CustomResources.json\r\n  |      |      |             |\r\n  |      |      |             `--- parameters.json\r\n  |      |      |             `--- schema.graphql\r\n  |      |      |             `--- transform.config.json\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json      &lt;--- modify\r\n  |      |\r\n  |      `--- teram-provider-info.json\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- app.js\r\n  |     `--- aws-exports.js\r\n  |\r\n  `--- .gitignore\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<p>\u5f53\u56de\u7b54\u8005\u5728\u547d\u4ee4\u884c\u6267\u884c\u65f6\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3a&#8221;Todo&#8221;\u7684\u67b6\u6784\uff0c\u5e76\u4e14\u5728amplify\/backend\/api\/todo\u8def\u5f84\u4e0b\u521b\u5efa\u4e86\u4e00\u4e2a\u540d\u4e3aschema.graphql\u7684\u6587\u4ef6\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">type<\/span> <span class=\"n\">Todo<\/span> <span class=\"err\">@<\/span><span class=\"n\">model<\/span> <span class=\"p\">{<\/span>\r\n  <span class=\"n\">id<\/span><span class=\"p\">:<\/span> <span class=\"nb\">ID<\/span><span class=\"p\">!<\/span>\r\n  <span class=\"n\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"p\">!<\/span>\r\n  <span class=\"n\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<h4>\u6dfb\u52a0API\u4e4b\u540e\u7684\u72b6\u6001\u3002<\/h4>\n<p>\u4ee5\u4e0b\u662fAPI\u6dfb\u52a0\u540e\u7684\u72b6\u6001\u3002\u5176\u4e2dOperation\u4e3aCreate\uff0c\u610f\u5473\u7740\u5f53\u5728AWS\u4e0a\u8fdb\u884c\u53cd\u6620\u65f6\uff0c\u5c06\u521b\u5efa\u6b64API\u7684\u8d44\u6e90\u3002<br \/>\n\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5728GraphQL\u4e2d\uff0cAppSync\u548cDynamoDB\u5c06\u4f5c\u4e3a\u8d44\u6e90\u88ab\u521b\u5efa\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name | Operation | Provider plugin   |\r\n| -------- | ------------- | --------- | ----------------- |\r\n| Api      | todo          | Create    | awscloudformation |\r\n<\/span><\/code><\/pre>\n<h3>\u63a8\u9001\u653e\u5927<\/h3>\n<blockquote><p>\u4f7f\u7528\u6700\u65b0\u7684\u672c\u5730\u53d1\u5c55\u60c5\u51b5\u4e3a\u4e91\u8d44\u6e90\u63d0\u4f9b\u914d\u7f6e\u3002<\/p><\/blockquote>\n<p>\u8981\u5c06\u672c\u5730\u72b6\u6001\u53cd\u6620\u5230AWS\u4e0a\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528amplify push\u547d\u4ee4\u3002\u5728\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u5c06\u88ab\u8be2\u95ee\u662f\u5426\u8981\u751f\u6210\u64cd\u4f5cGraphQL API\u7684\u4ee3\u7801\u4ee5\u53ca\u4f7f\u7528\u54ea\u79cd\u8bed\u8a00\uff08JavaScript\u3001TypeScript\u3001flow\uff09\u3002<br \/>\n\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u56de\u7b54\u8bf4\u8981\u4f7f\u7528JavaScript\u6765\u751f\u6210\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify push\r\n<span class=\"go\">\r\n\u221a Successfully pulled backend environment dev from the cloud.\r\n\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name | Operation | Provider plugin   |\r\n| -------- | ------------- | --------- | ----------------- |\r\n| Api      | todo          | Create    | awscloudformation |\r\n? Are you sure you want to continue? Yes\r\n\r\nThe following types do not have '@auth' enabled. Consider using @auth with @model\r\n         - Todo\r\n<\/span><span class=\"gp\">Learn more about @auth here: https:\/\/aws-amplify.github.io\/docs\/cli-toolchain\/graphql#<\/span>auth\r\n<span class=\"go\">\r\n\r\nGraphQL schema compiled successfully.\r\n\r\nEdit your schema at D:\\dev\\vsc-workspace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema.graphql or place .graphql files in a directory at D:\\dev\\vsc-worksp\r\nace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema\r\n? Do you want to generate code for your newly created GraphQL API Yes\r\n? Choose the code generation language target javascript\r\n? Enter the file name pattern of graphql queries, mutations and subscriptions src\\graphql\\**\\*.js\r\n? Do you want to generate\/update all possible GraphQL operations - queries, mutations and subscriptions Yes\r\n? Enter maximum statement depth [increase from default if your schema is deeply nested] 2\r\n\/ Updating resources in the cloud. This may take a few minutes...\r\n\r\n\/\/ \u7701\u7565\r\n\r\n\u221a Generated GraphQL operations successfully and saved at src\\graphql\r\n\u221a All resources are updated in the cloud\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\n<\/span><\/code><\/pre>\n<h4>\u901a\u8fc7push\u521b\u5efa\u7684AWS\u8d44\u6e90<\/h4>\n<h5>\u653e\u5927\u63a7\u5236\u53f0<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/91-0.png\" alt=\"push-amplify-console.png\" \/><\/div>\n<h5>AppSync \u5e94\u7528\u540c\u6b65<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/93-3.png\" alt=\"push-appsync-setting-api-key.png\" \/><\/div>\n<h5>DynamoDB &#8211;<br \/>\nDynamoDB &#8211; \u4e9a\u9a6c\u900a\u516c\u53f8\u63d0\u4f9b\u7684NoSQL\u6570\u636e\u5e93\u670d\u52a1<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/95-0.png\" alt=\"push-dynamodb.png\" \/><\/div>\n<h5>\u89d2\u8272<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/97-0.png\" alt=\"push-roles.png\" \/><\/div>\n<h5>\u4e91\u5806\u6808<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/99-0.png\" alt=\"push-cloudformation.png\" \/><\/div>\n<h4>\u63a8\u51fa\u540e\u7684\u9879\u76ee<\/h4>\n<p>\u5728src\/graphql\u76ee\u5f55\u4e0b\u751f\u6210\u4e86\u7528\u4e8e\u64cd\u4f5cGraphQL API\u7684\u4ee3\u7801\u3002<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/102-0.png\" alt=\"project-04.png\" \/><\/div>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/amplify\r\n  |      |\r\n  |      `--- \/.config\r\n  |      |      |\r\n  |      |      `--- ...\u7701\u7565...\r\n  |      |\r\n  |      `--- \/#current-cloud-backend\r\n  |      |      |\r\n  |      |      `--- \/api                     &lt;--- add\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- \/build\r\n  |      |      |             `--- \/resolvers\r\n  |      |      |             `--- \/stacks\r\n  |      |      |             |      |\r\n  |      |      |             |      `--- CustomResources.json\r\n  |      |      |             |\r\n  |      |      |             `--- parameters.json\r\n  |      |      |             `--- schema.graphql\r\n  |      |      |             `--- transform.config.json\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- \/backend\r\n  |      |      |\r\n  |      |      `--- \/api\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- ...\u7701\u7565...\r\n  |      |      |\r\n  |      |      `--- \/awscloudformation        &lt;-- add\r\n  |      |      |      |\r\n  |      |      |       `--- nested-cloudformation-stack.yml\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- teram-provider-info.json\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- \/graphql               &lt;--- add\r\n  |     |      |\r\n  |     |      `--- mutations.js\r\n  |     |      `--- queries.js\r\n  |     |      `--- schema.json\r\n  |     |      `--- subscrptions.js\r\n  |     `--- app.js\r\n  |     `--- aws-exports.js\r\n  |\r\n  `--- .gitignore\r\n  `--- .graphqlconfig.yml           &lt;--- add\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<h4>\u63a8\u9001\u5f8c\u7684\u72b6\u6001<\/h4>\n<p>\u4ee5\u4e0b\u662f\u63a8\u9001\u540e\u7684\u72b6\u6001\u3002\u7531\u4e8e\u63a8\u9001\u6210\u529f\uff0c\u64cd\u4f5c\u4e3a\u65e0\u53d8\u5316\uff08No Change\uff09\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name | Operation | Provider plugin   |\r\n| -------- | ------------- | --------- | ----------------- |\r\n| Api      | todo          | No Change | awscloudformation |\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\n<\/span><\/code><\/pre>\n<h2>\u5728\u4e2d\u6587\u4e2d\uff0cAPI\u7684\u52a8\u4f5c\u786e\u8ba4<\/h2>\n<p>\u6211\u8ba4\u4e3a\u5728\u8fd9\u4e2a\u65f6\u5019\uff0csrc\/app.js\u4ecd\u7136\u662f\u4e00\u4e2a\u7a7a\u6587\u4ef6\u3002\u8bf7\u590d\u5236\u5e76\u7c98\u8d34\u5728&#8221;\u6b65\u9aa44\uff1a\u96c6\u6210\u5230\u60a8\u7684\u5e94\u7528\u7a0b\u5e8f&#8221;\u4e2d\u63d0\u5230\u7684\u4ee3\u7801\u3002<br \/>\n\u5728\u66f4\u65b0app.js\u4e4b\u540e\uff0c\u4f7f\u7528npm start\u547d\u4ee4\u542f\u52a8\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u8bbf\u95ee\u4e0b\u9762\u7684URL\u3002<\/p>\n<pre class=\"post-pre\"><code>http:\/\/localhost:8080\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/110-0.png\" alt=\"amplify-07.png\" \/><\/div>\n<p>DynamoDB &#8211; \u4e9a\u9a6c\u900a\u4e91\u6570\u636e\u5e93<\/p>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/112-0.png\" alt=\"add-data-dynamodb.png\" \/><\/div>\n<h2>\u9759\u6001\u7f51\u7ad9\u7684\u6258\u7ba1<\/h2>\n<h3>\u589e\u5f3a\u3001\u589e\u52a0\u6258\u7ba1<\/h3>\n<p>\u53ea\u9700\u4e00\u79cd\u9009\u62e9\uff1a\u4f7f\u7528amplify add hosting\u547d\u4ee4\u4e3a\u5e94\u7528\u7a0b\u5e8f\u51c6\u5907\u5c06\u5176\u6258\u7ba1\u5230S3\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u5c06\u88ab\u8981\u6c42\u9009\u62e9\u662f\u4f7f\u7528CloudFront\u548cS3\u8fd8\u662f\u4ec5\u4f7f\u7528S3\uff0c\u5e76\u547d\u540d\u7528\u4e8e\u516c\u5f00\u7684\u5b58\u50a8\u6876\u3002<br \/>\n\u5728\u6b64\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4ec5\u4f7f\u7528S3\uff0c\u5e76\u5c06\u516c\u5f00\u5b58\u50a8\u6876\u540d\u79f0\u4fdd\u6301\u9ed8\u8ba4\u8bbe\u7f6e\u3002<br \/>\n\u5728\u6b64\u65f6\u70b9\uff0c\u5e94\u7528\u7a0b\u5e8f\u8fd8\u672a\u516c\u5f00\u3002\u8fd9\u610f\u5473\u7740\u5728AWS\u4e0a\u5c1a\u672a\u521b\u5efa\u8d44\u6e90\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify add hosting\r\n<span class=\"go\">\r\n? Select the plugin module to execute Amazon CloudFront and S3\r\n? Select the environment setup: DEV (S3 only with HTTP)\r\n? hosting bucket name demo-amplify-js-app-20200415223152-hostingbucket\r\n? index doc for the website index.html\r\n? error doc for the website index.html\r\n\r\nYou can now publish your app using the following command:\r\nCommand: amplify publish\r\n<\/span><\/code><\/pre>\n<h4>\u6dfb\u52a0\u4e3b\u673a\u540e\u7684\u9879\u76ee de<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/118-0.png\" alt=\"project-05.png\" \/><\/div>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/amplify\r\n  |      |\r\n  |      `--- \/.config\r\n  |      |      |\r\n  |      |      `--- ...\u7701\u7565...\r\n  |      |\r\n  |      `--- \/#current-cloud-backend\r\n  |      |      |\r\n  |      |      `--- \/api\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- ...\u7701\u7565...\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- \/backend\r\n  |      |      |\r\n  |      |      `--- \/api\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- ...\u7701\u7565...\r\n  |      |      |\r\n  |      |      `--- \/awscloudformation\r\n  |      |      |      |\r\n  |      |      |       `--- nested-cloudformation-stack.yml\r\n  |      |      |\r\n  |      |      `--- \/hosting                        &lt;--- add\r\n  |      |      |      |\r\n  |      |      |      `--- \/S3AndCloudFront\r\n  |      |      |             |\r\n  |      |      |             `--- parameters.json\r\n  |      |      |             `--- template.json\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json             &lt;--- modify\r\n  |      |\r\n  |      `--- teram-provider-info.json\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- \/graphql\r\n  |     |      |\r\n  |     |      `--- mutations.js\r\n  |     |      `--- queries.js\r\n  |     |      `--- schema.json\r\n  |     |      `--- subscrptions.js\r\n  |     `--- app.js\r\n  |     `--- aws-exports.js\r\n  |\r\n  `--- .gitignore\r\n  `--- .graphqlconfig.yml\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<h4>\u589e\u52a0\u4e3b\u673a\u540e\u7684\u72b6\u6001<\/h4>\n<p>\u4ee5\u4e0b\u662f\u6dfb\u52a0\u4e3b\u673a\u540e\u7684\u72b6\u6001\u3002\u7531\u4e8e\u4e3b\u673a\u64cd\u4f5c\u4e3a\u521b\u5efa\uff08Create\uff09\uff0c\u56e0\u6b64\u53ef\u4ee5\u4e86\u89e3\u5230\u6b63\u5728\u7b49\u5f85\u5c06\u5176\u53cd\u6620\u5230AWS\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name   | Operation | Provider plugin   |\r\n| -------- | --------------- | --------- | ----------------- |\r\n| Hosting  | S3AndCloudFront | Create    | awscloudformation |\r\n| Api      | todo            | No Change | awscloudformation |\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\n<\/span><\/code><\/pre>\n<h3>\u653e\u5927\u51fa\u7248<\/h3>\n<blockquote><p>\u6267\u884c amplify push\uff0c\u7136\u540e\u6784\u5efa\u5e76\u53d1\u5e03\u7528\u4e8e\u6258\u7ba1\u7684\u5ba2\u6237\u7aef\u5e94\u7528\u7a0b\u5e8f\u3002<\/p><\/blockquote>\n<p>\u4f7f\u7528amplify publish\u547d\u4ee4\u8fdb\u884c\u53d1\u5e03\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify publish\r\n<span class=\"go\">\r\n\u221a Successfully pulled backend environment prod from the cloud.\r\n\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name   | Operation | Provider plugin   |\r\n| -------- | --------------- | --------- | ----------------- |\r\n| Hosting  | S3AndCloudFront | Create    | awscloudformation |\r\n| Api      | todo            | No Change | awscloudformation |\r\n? Are you sure you want to continue? Yes\r\n| Updating resources in the cloud. This may take a few minutes...\r\n\r\n\/\/ \u7701\u7565\r\n\r\nPublish started for S3AndCloudFront\r\n\u221a Uploaded files successfully.\r\nYour app is published successfully.\r\nhttp:\/\/demo-amplify-js-app-20200415223152-hostingbucket-prod.s3-website-ap-northeast-1.amazonaws.com\r\n<\/span><\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/127-0.png\" alt=\"amplify-09.png\" \/><\/div>\n<h4>AWS\u8d44\u6e90\u662f\u901a\u8fc7publish\u521b\u5efa\u7684\u3002<\/h4>\n<h5>S3<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/130-1.png\" alt=\"publish-s3-files.png\" \/><\/div>\n<h5>\u4e91\u7f16\u6392<\/h5>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/132-1.png\" alt=\"publish-cloudformation-resource.png\" \/><\/div>\n<h4>\u53d1\u5e03\u4e4b\u540e\u7684\u9879\u76ee<\/h4>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/134-0.png\" alt=\"project-06.png\" \/><\/div>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/amplify\r\n  |      |\r\n  |      `--- \/.config\r\n  |      |      |\r\n  |      |      `--- ...\u7701\u7565...\r\n  |      |\r\n  |      `--- \/#current-cloud-backend\r\n  |      |      |\r\n  |      |      `--- \/api\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- ...\u7701\u7565...\r\n  |      |      |\r\n  |      |      `--- \/hosting                        &lt;--- add\r\n  |      |      |      |\r\n  |      |      |      `--- \/S3AndCloudFront\r\n  |      |      |             |\r\n  |      |      |             `--- parameters.json\r\n  |      |      |             `--- template.json\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- \/backend\r\n  |      |      |\r\n  |      |      `--- \/api\r\n  |      |      |      |\r\n  |      |      |      `--- \/todo\r\n  |      |      |             |\r\n  |      |      |             `--- ...\u7701\u7565...\r\n  |      |      |\r\n  |      |      `--- \/awscloudformation\r\n  |      |      |      |\r\n  |      |      |       `--- nested-cloudformation-stack.yml\r\n  |      |      |\r\n  |      |      `--- \/hosting\r\n  |      |      |      |\r\n  |      |      |      `--- \/S3AndCloudFront\r\n  |      |      |             |\r\n  |      |      |             `--- parameters.json\r\n  |      |      |             `--- template.json\r\n  |      |      |\r\n  |      |      `--- amplify-meta.json\r\n  |      |      `--- backend-config.json\r\n  |      |\r\n  |      `--- teram-provider-info.json\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- \/graphql\r\n  |     |      |\r\n  |     |      `--- mutations.js\r\n  |     |      `--- queries.js\r\n  |     |      `--- schema.json\r\n  |     |      `--- subscrptions.js\r\n  |     `--- app.js\r\n  |     `--- aws-exports.js\r\n  |\r\n  `--- .gitignore\r\n  `--- .graphqlconfig.yml\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<h4>\u53d1\u5e03\u540e\u7684\u72b6\u6001<\/h4>\n<p>\u4ee5\u4e0b\u662f\u53d1\u5e03\u540e\u7684\u72b6\u6001\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name   | Operation | Provider plugin   |\r\n| -------- | --------------- | --------- | ----------------- |\r\n| Api      | todo            | No Change | awscloudformation |\r\n| Hosting  | S3AndCloudFront | No Change | awscloudformation |\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\nHosting endpoint: http:\/\/demo-amplify-js-app-20200415223152-hostingbucket-prod.s3-website-ap-northeast-1.amazonaws.com\r\n<\/span><\/code><\/pre>\n<p>\u4ee5\u4e0a\u662f\u4f7f\u7528JavaScript\u521b\u5efaWeb\u5e94\u7528\u7a0b\u5e8f\u7684&#8221;\u5feb\u901f\u5165\u95e8&#8221;\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n<h2>\u5e94\u7528\u7a0b\u5e8f\u7684\u4fee\u6539<\/h2>\n<h3>\u524d\u53f0\u4ee3\u7801\u4fee\u6b63<\/h3>\n<p>\u53ea\u9700\u4fee\u6539\u524d\u7aef\u4ee3\u7801\uff08\u5982index.html\u548cjs\u6587\u4ef6\uff09\uff0c\u7136\u540e\u5728\u4f7f\u7528npm run build\u547d\u4ee4\u6784\u5efa\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528amplify publish\u547d\u4ee4\u5c06\u5176\u90e8\u7f72\u5230AWS\u7684S3\u4e0a\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify publish\r\n<\/code><\/pre>\n<h3>\u4fee\u6539GraphQL\u6a21\u5f0f\uff08\u540e\u7aef\u4ee3\u7801\u4fee\u6539\uff09\u3002<\/h3>\n<p>\u5982\u679c\u8981\u5728Todo\u5bf9\u8c61\u4e2d\u6dfb\u52a0\u4e00\u4e2a\u540d\u4e3apriority\u7684\u5b57\u6bb5\uff0c\u53ef\u4ee5\u901a\u8fc7\u4fee\u6539amplify\/backend\/api\/todo\u7684schema.graphql\u6587\u4ef6\u6765\u5b9e\u73b0\u3002\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u4ee5!\u7ed3\u5c3e\u7684\u5b57\u6bb5\u662f\u5fc5\u586b\u5b57\u6bb5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">type<\/span> <span class=\"n\">Todo<\/span> <span class=\"err\">@<\/span><span class=\"n\">model<\/span> <span class=\"p\">{<\/span>\r\n  <span class=\"n\">id<\/span><span class=\"p\">:<\/span> <span class=\"nb\">ID<\/span><span class=\"p\">!<\/span>\r\n  <span class=\"n\">name<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span><span class=\"p\">!<\/span>\r\n  <span class=\"n\">priority<\/span><span class=\"p\">:<\/span> <span class=\"nb\">Int<\/span><span class=\"p\">!<\/span>\r\n  <span class=\"n\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<p>\u5f53\u67e5\u770b\u72b6\u6001\u65f6\uff0c\u53ef\u4ee5\u770b\u5230Api\u7684Operation\u5df2\u7ecf\u53d8\u4e3aUpdate\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify status\r\n<span class=\"go\">\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name   | Operation | Provider plugin   |\r\n| -------- | --------------- | --------- | ----------------- |\r\n| Api      | todo            | Update    | awscloudformation |\r\n| Hosting  | S3AndCloudFront | No Change | awscloudformation |\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\nHosting endpoint: http:\/\/demo-amplify-js-app-20200416174831-hostingbucket-prod.s3-website-ap-northeast-1.amazonaws.com\r\n<\/span><\/code><\/pre>\n<p>\u4e3a\u4e86\u53cd\u6620\u5bf9Todo\u5bf9\u8c61\u7684\u4fee\u6539\uff0c\u8bf7\u6267\u884camplify push\u547d\u4ee4\u3002<br \/>\n\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0c\u4f1a\u8be2\u95ee\u662f\u5426\u8981\u66f4\u65b0GraphQL\u8bed\u53e5\uff08\u67e5\u8be2\u3001\u53d8\u66f4\u548c\u8ba2\u9605\uff09\uff0c\u8bf7\u952e\u5165\u201cYes\u201d\u4ee5\u751f\u6210\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify push\r\n<span class=\"go\">\r\n\u221a Successfully pulled backend environment prod from the cloud.\r\n\r\nCurrent Environment: prod\r\n\r\n| Category | Resource name   | Operation | Provider plugin   |\r\n| -------- | --------------- | --------- | ----------------- |\r\n| Api      | todo            | Update    | awscloudformation |\r\n| Hosting  | S3AndCloudFront | No Change | awscloudformation |\r\n? Are you sure you want to continue? Yes\r\n\r\nThe following types do not have '@auth' enabled. Consider using @auth with @model\r\n         - Todo\r\n<\/span><span class=\"gp\">Learn more about @auth here: https:\/\/aws-amplify.github.io\/docs\/cli-toolchain\/graphql#<\/span>auth\r\n<span class=\"go\">\r\n\r\nGraphQL schema compiled successfully.\r\nEdit your schema at D:\\dev\\vsc-workspace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema.graphql or place .graphql files in a directory at D:\\dev\\vsc-worksp\r\nace\\demo-amplify-js-app\\amplify\\backend\\api\\todo\\schema\r\n? Do you want to update code for your updated GraphQL API Yes\r\n? Do you want to generate GraphQL statements (queries, mutations and subscription) based on your schema types?\r\nThis will overwrite your current graphql queries, mutations and subscriptions Yes\r\n\/ Updating resources in the cloud. This may take a few minutes...\r\n\r\n\/\/ \u7701\u7565\r\n\r\n\u221a Generated GraphQL operations successfully and saved at src\\graphql\r\n\u221a All resources are updated in the cloud\r\n\r\nGraphQL endpoint: https:\/\/xxxxxxxxxxxxxxxxxxxxxxxxxx.appsync-api.ap-northeast-1.amazonaws.com\/graphql\r\nGraphQL API KEY: xxx-xxxxxxxxxxxxxxxxxxxxxxxxxx\r\n<\/span><\/code><\/pre>\n<p>\u5f53\u540e\u7aef\u4fee\u590d\u5b8c\u6bd5\u540e\uff0c\u6211\u4eec\u5c06\u6839\u636e\u4ee5\u4e0b\u793a\u4f8b\u4fee\u6539\u53d7\u5f71\u54cd\u7684\u524d\u7aef\u6e90\u4ee3\u7801\uff08src\/app.js\uff09\uff0c\u4f8b\u5982\u4fee\u6539\u6ce8\u518c\u65b0\u6570\u636e\u7684\u4ee3\u7801\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"kd\">const<\/span> <span class=\"nx\">todo<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span> <span class=\"na\">name<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">Use AppSync<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"na\">description<\/span><span class=\"p\">:<\/span> <span class=\"dl\">\"<\/span><span class=\"s2\">Realtime and Offline<\/span><span class=\"dl\">\"<\/span><span class=\"p\">,<\/span> <span class=\"na\">priority<\/span><span class=\"p\">:<\/span> <span class=\"mi\">1<\/span> <span class=\"p\">}<\/span>\r\n<span class=\"nx\">API<\/span><span class=\"p\">.<\/span><span class=\"nx\">graphql<\/span><span class=\"p\">(<\/span><span class=\"nx\">graphqlOperation<\/span><span class=\"p\">(<\/span><span class=\"nx\">createTodo<\/span><span class=\"p\">,<\/span> <span class=\"p\">{<\/span> <span class=\"na\">input<\/span><span class=\"p\">:<\/span> <span class=\"nx\">todo<\/span> <span class=\"p\">}))<\/span>\r\n<\/code><\/pre>\n<p>\u5982\u679c\u5728\u672c\u5730\u8fdb\u884c\u4e86\u9a8c\u8bc1\u5e76\u6ca1\u6709\u95ee\u9898\uff0c\u6700\u7ec8\u5c06\u4f7f\u7528amplify publish\u547d\u4ee4\u8fdb\u884c\u53d1\u5e03\u3002<\/p>\n<h3>\u6dfb\u52a0 source-map<\/h3>\n<p>\u5c06\u4ee5\u4e0b\u884c\u6dfb\u52a0\u5230webpack.config.js\u6587\u4ef6\u4e2d\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nx\">module<\/span><span class=\"p\">.<\/span><span class=\"nx\">exports<\/span> <span class=\"o\">=<\/span> <span class=\"p\">{<\/span>\r\n\r\n  <span class=\"na\">devtool<\/span><span class=\"p\">:<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">source-map<\/span><span class=\"dl\">'<\/span><span class=\"p\">,<\/span>\r\n\r\n<span class=\"p\">};<\/span>\r\n<\/code><\/pre>\n<h2>\u5378\u8f7d\u5e94\u7528\u7a0b\u5e8f<\/h2>\n<p>\u5f53\u5728AWS\u4e0a\u4f7f\u7528S3\u3001AppSync\u3001DynamoDB\u7b49\u6d89\u53ca\u4ed8\u8d39\u7684\u670d\u52a1\u65f6\uff0c\u82e5\u5e94\u7528\u7a0b\u5e8f\u4e0d\u518d\u9700\u8981\uff0c\u5219\u4f1a\u5c06\u5176\u5220\u9664\u4ee5\u907f\u514d\u4ea7\u751f\u4e0d\u5fc5\u8981\u7684\u8d39\u7528\u3002<\/p>\n<h3>\u653e\u5927\u5220\u9664<\/h3>\n<blockquote><p>\u4ece\u4e91\u7aef\u5220\u9664\u4e0e\u8be5\u9879\u76ee\u76f8\u5173\u8054\u7684\u6240\u6709\u8d44\u6e90\u3002<\/p><\/blockquote>\n<p>\u901a\u8fc7\u4f7f\u7528amplify delete\u547d\u4ee4\uff0c\u60a8\u53ef\u4ee5\u5220\u9664\u4e0e\u9879\u76ee\u76f8\u5173\u7684\u8d44\u6e90\u3002\u8fd9\u4e2a\u547d\u4ee4\u5c06\u5e2e\u52a9\u60a8\u5220\u9664\u51e0\u4e4e\u6240\u6709\u901a\u8fc7\u4e4b\u524d\u7684\u64cd\u4f5c\u521b\u5efa\u7684\u8d44\u6e90\uff0c\u4f46\u662f\u4e3a\u9759\u6001\u7f51\u7ad9\u521b\u5efa\u7684S3\u5b58\u50a8\u6876\u5c06\u4fdd\u7559\u4e0b\u6765\uff0c\u6240\u4ee5\u60a8\u9700\u8981\u4eceAWS\u63a7\u5236\u53f0\u53e6\u5916\u8fdb\u884c\u5220\u9664\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify delete\r\n<span class=\"go\">\r\nScanning for plugins...\r\nPlugin scan successful\r\n? Are you sure you want to continue? (This would delete all the environments of the project from the cloud and wipe out all the local amplify resource files) Yes\r\n- Deleting resources from the cloud. This may take a few minutes...\r\nDeleting env:prod\r\n\u221a Project deleted in the cloud\r\nProject deleted locally.\r\n<\/span><\/code><\/pre>\n<h4>\u5220\u9664\u540e\u7684\u9879\u76ee ch\u00fa de<\/h4>\n<p>\u6267\u884cdelete\u547d\u4ee4\u540e\uff0c\u672c\u5730\u9879\u76ee\u6587\u4ef6\u7684\u5927\u90e8\u5206\u4ecd\u7136\u5b58\u5728\u3002<\/p>\n<pre class=\"post-pre\"><code>demo-amplify-js-app\r\n  |\r\n  `--- \/dist\r\n  `--- \/node_modules\r\n  `--- \/src\r\n  |     |\r\n  |     `--- \/graphql\r\n  |     |      `--- schema.json\r\n  |     `--- app.js\r\n  |\r\n  `--- .gitignore\r\n  `--- .graphqlconfig.yml\r\n  `--- index.html\r\n  `--- package.json\r\n  `--- package-lock.json\r\n  `--- webpack.config.js\r\n<\/code><\/pre>\n<h1>\u586b\u88dc<\/h1>\n<h2>\u63a7\u5236\u53f0\u547d\u4ee4<\/h2>\n<p>\u6d4f\u89c8\u5668\u542f\u52a8\u5e76\u663e\u793aAmplify\u63a7\u5236\u53f0\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify console\r\n<\/code><\/pre>\n<h2>\u5e2e\u52a9\u6307\u4ee4<\/h2>\n<p>\u5e2e\u52a9\u547d\u4ee4<\/p>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify <span class=\"nb\">help<\/span>\r\n<\/code><\/pre>\n<pre class=\"post-pre\"><code><span class=\"gp\">&gt;<\/span> amplify &lt;<span class=\"nb\">command<\/span><span class=\"o\">&gt;<\/span> <span class=\"nb\">help<\/span>\r\n<\/code><\/pre>\n<h3>\u5206\u7c7b\u5217\u8868<\/h3>\n<div>\n<div class=\"post-table\">\u30ab\u30c6\u30b4\u30eaAPI\u30ac\u30a4\u30c9analytics<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/analytics\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/analytics<\/a>api<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/api\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/api<\/a>auth<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/authentication\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/authentication<\/a>function<br \/>\nhosting<br \/>\ninteractions<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/interactions\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/interactions<\/a>notifications<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/push-notifications\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/push-notifications<\/a>predictions<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/predictions\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/predictions<\/a>storage<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/storage\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/storage<\/a>xr<a class=\"autolink\" href=\"https:\/\/aws-amplify.github.io\/docs\/js\/xr\" target=\"_blank\" rel=\"nofollow noopener\">https:\/\/aws-amplify.github.io\/docs\/js\/xr<\/a><\/div>\n<\/div>\n<h3>\u547d\u4ee4\u5217\u8868<\/h3>\n<div>\n<div class=\"post-table\">\u30b3\u30de\u30f3\u30c9\u8aac\u660einitInitializes a new project, sets up deployment resources in the cloud, and makes your project ready for Amplify.<br \/>\n\u65b0\u3057\u3044\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u521d\u671f\u5316\u3057\u3001\u30af\u30e9\u30a6\u30c9\u306b\u30c7\u30d7\u30ed\u30a4\u30ea\u30bd\u30fc\u30b9\u3092\u8a2d\u5b9a\u3057\u3066\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092Amplify\u306b\u5bfe\u5fdc\u3055\u305b\u307e\u3059\u3002configureConfigures the attributes of your project for amplify-cli, such as switching front-end framework and adding\/removing cloud-provider plugins.<br \/>\n\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u5207\u308a\u66ff\u3048\u3084\u30af\u30e9\u30a6\u30c9\u30d7\u30ed\u30d0\u30a4\u30c0\u30fc\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u8ffd\u52a0\/\u524a\u9664\u306a\u3069\u3001amplify-cli\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u5c5e\u6027\u3092\u69cb\u6210\u3057\u307e\u3059\u3002pushProvisions cloud resources with the latest local developments.<br \/>\n\u6700\u65b0\u306e\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u3067\u30af\u30e9\u30a6\u30c9\u30ea\u30bd\u30fc\u30b9\u3092\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u3057\u307e\u3059\u3002pullFetch upstream backend environment definition changes from the cloud and updates the local environment to match that definition.<br \/>\n\u30af\u30e9\u30a6\u30c9\u304b\u3089\u30a2\u30c3\u30d7\u30b9\u30c8\u30ea\u30fc\u30e0\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u74b0\u5883\u5b9a\u7fa9\u306e\u5909\u66f4\u3092\u30d5\u30a7\u30c3\u30c1\u3057\u3001\u305d\u306e\u5b9a\u7fa9\u306b\u4e00\u81f4\u3059\u308b\u3088\u3046\u306b\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002publishExecutes amplify push, and then builds and publishes client-side application for hosting.<br \/>\namplify push\u3092\u5b9f\u884c\u3057\u3066\u304b\u3089\u3001\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u7528\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u7bc9\u3057\u3066\u516c\u958b\u3057\u307e\u3059\u3002serveExecutes amplify push, and then executes the project&#8217;s start command to test run the client-side application locally.<br \/>\namplify push\u3092\u5b9f\u884c\u3057\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u958b\u59cb\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u30ed\u30fc\u30ab\u30eb\u3067\u30c6\u30b9\u30c8\u5b9f\u884c\u3057\u307e\u3059\u3002statusShows the state of local resources not yet pushed to the cloud (Create\/Update\/Delete).<br \/>\n\u307e\u3060\u30af\u30e9\u30a6\u30c9\u306b\u30d7\u30c3\u30b7\u30e5\u3055\u308c\u3066\u3044\u306a\u3044\u30ed\u30fc\u30ab\u30eb\u30ea\u30bd\u30fc\u30b9\u306e\u72b6\u614b\u3092\u8868\u793a\u3057\u307e\u3059\uff08\u4f5c\u6210\/\u66f4\u65b0\/\u524a\u9664\uff09\u3002deleteDeletes all of the resources tied to the project from the cloud.<br \/>\n\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u95a2\u9023\u4ed8\u3051\u3089\u308c\u3066\u3044\u308b\u3059\u3079\u3066\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u30af\u30e9\u30a6\u30c9\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002&lt;category&gt; addAdds a resource for an Amplify category in your local backend.<br \/>\n\u30ed\u30fc\u30ab\u30eb\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306eAmplify\u30ab\u30c6\u30b4\u30ea\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002&lt;category&gt; updateUpdate resource for an Amplify category in your local backend.<br \/>\n\u30ed\u30fc\u30ab\u30eb\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306eAmplify\u30ab\u30c6\u30b4\u30ea\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002&lt;category&gt; pushProvisions all cloud resources in a category with the latest local developments.<br \/>\n\u30ab\u30c6\u30b4\u30ea\u5185\u306e\u3059\u3079\u3066\u306e\u30af\u30e9\u30a6\u30c9\u30ea\u30bd\u30fc\u30b9\u3092\u6700\u65b0\u306e\u30ed\u30fc\u30ab\u30eb\u958b\u767a\u3067\u30d7\u30ed\u30d3\u30b8\u30e7\u30cb\u30f3\u30b0\u3057\u307e\u3059\u3002&lt;category&gt; removeRemoves a resource for an Amplify category in your local backend.<br \/>\n\u30ed\u30fc\u30ab\u30eb\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u306eAmplify\u30ab\u30c6\u30b4\u30ea\u306e\u30ea\u30bd\u30fc\u30b9\u3092\u524a\u9664\u3057\u307e\u3059\u3002&lt;category&gt;Displays subcommands of the specified Amplify category.<br \/>\n\u6307\u5b9a\u3057\u305famplify\u30ab\u30c6\u30b4\u30ea\u306e\u30b5\u30d6\u30b3\u30de\u30f3\u30c9\u3092\u8868\u793a\u3057\u307e\u3059\u3002mockRun mock server for testing categories locally.<br \/>\n\u30ed\u30fc\u30ab\u30eb\u3067\u30c6\u30b9\u30c8\u30ab\u30c6\u30b4\u30ea\u306e\u30e2\u30c3\u30af\u30b5\u30fc\u30d0\u30fc\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002codegenGenerates GraphQL statements(queries, mutations and eventHandlers) and type annotations.<br \/>\nGraphQL\u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\uff08queries, mutations and eventHandlers\uff09\u3068type annotations\u3092\u751f\u6210\u3057\u307e\u3059\u3002envDisplays and manages environment related information for your Amplify project.<br \/>\nAmplify\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u74b0\u5883\u95a2\u9023\u60c5\u5831\u3092\u8868\u793a\u304a\u3088\u3073\u7ba1\u7406\u3057\u307e\u3059\u3002consoleOpens the web console for the selected cloud resource.<br \/>\n\u9078\u629e\u3057\u305fAWS\u30ea\u30bd\u30fc\u30b9\u306eWeb\u30b3\u30f3\u30bd\u30fc\u30eb\u3092\u958b\u304d\u307e\u3059\u3002<\/div>\n<\/div>\n<h3>\u5b50\u547d\u4ee4<\/h3>\n<p>\u5632\u7b11<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">storage<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">api<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">function<\/ul>\n<p>\u73af\u5883<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">add<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">pull [&#8211;restore]<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">list [&#8211;details] [&#8211;json]<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">get &#8211;name [&#8211;json]<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">import &#8211;name &#8211;config [&#8211;awsinfo ]<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">remove<\/ul>\n<h2>\u5bf9\u8bdd\u5f0f\u7684\u9009\u62e9\u7b56\u7565<\/h2>\n<p>\u6211\u5c06\u8865\u5145\u5173\u4e8eamplify\u547d\u4ee4\u9009\u9879\u7684\u5185\u5bb9\u3002<\/p>\n<h3>\u521d\u59cb\u5316\u653e\u5927<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/186-2.png\" alt=\"choose-03.png\" \/><\/div>\n<h3>\u589e\u5f3a\u6dfb\u52a0 API<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/188-3.png\" alt=\"choose-07.png\" \/><\/div>\n<h3>\u63a8\u9001\u653e\u5927<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/190-0.png\" alt=\"choose-08.png\" \/><\/div>\n<h3>\u589e\u52a0\u6258\u7ba1<\/h3>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/192-1.png\" alt=\"choose-10.png\" \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u8ff0 \u8fd9\u662f\u6211\u5728\u9605\u8bfbAWS Amplify (\u30a2\u30f3\u30d7\u30ea\u30d5\u30a1\u30a4)\u6846\u67b6\u7684\u5165\u95e8\u9875\u9762\uff08Getting Started\uff09\u5e76 [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47963","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55 - Blog - Silicon Cloud<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-\u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\" \/>\n<meta property=\"og:description\" content=\"\u7b80\u8ff0 \u8fd9\u662f\u6211\u5728\u9605\u8bfbAWS Amplify (\u30a2\u30f3\u30d7\u30ea\u30d5\u30a1\u30a4)\u6846\u67b6\u7684\u5165\u95e8\u9875\u9762\uff08Getting Started\uff09\u5e76 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-\u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-20T16:22:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-04T09:03:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/28-4.png\" \/>\n<meta name=\"author\" content=\"\u65b0, \u97f5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u65b0, \u97f5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/\",\"name\":\"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-05-20T16:22:30+00:00\",\"dateModified\":\"2024-05-04T09:03:18+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9\",\"name\":\"\u65b0, \u97f5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g\",\"caption\":\"\u65b0, \u97f5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55 - Blog - Silicon Cloud","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-\u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\/","og_locale":"zh_CN","og_type":"article","og_title":"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55","og_description":"\u7b80\u8ff0 \u8fd9\u662f\u6211\u5728\u9605\u8bfbAWS Amplify (\u30a2\u30f3\u30d7\u30ea\u30d5\u30a1\u30a4)\u6846\u67b6\u7684\u5165\u95e8\u9875\u9762\uff08Getting Started\uff09\u5e76 [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-\u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-05-20T16:22:30+00:00","article_modified_time":"2024-05-04T09:03:18+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8250913a08637a6afbc9\/28-4.png"}],"author":"\u65b0, \u97f5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u65b0, \u97f5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"13 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/","name":"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-05-20T16:22:30+00:00","dateModified":"2024-05-04T09:03:18+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"AWS Amplify \u6846\u67b6\u5165\u95e8\u5907\u5fd8\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/4ba4019495123db3038fd0809e6959c9","name":"\u65b0, \u97f5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d484b6c6e4ae82e8a9efea989e1d2af46d9b6ef128101e63b18f559fca0ae627?s=96&d=mm&r=g","caption":"\u65b0, \u97f5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/yunxin\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/aws-amplify-%e6%a1%86%e6%9e%b6%e5%85%a5%e9%97%a8%e5%a4%87%e5%bf%98%e5%bd%95\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=47963"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47963\/revisions"}],"predecessor-version":[{"id":99577,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47963\/revisions\/99577"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=47963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=47963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=47963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}