{"id":47943,"date":"2022-11-13T14:04:18","date_gmt":"2023-11-20T22:02:37","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/"},"modified":"2024-04-29T00:30:10","modified_gmt":"2024-04-28T16:30:10","slug":"%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/","title":{"rendered":"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1"},"content":{"rendered":"<p>\u672c\u7bc7\u6587\u7ae0\u662fKDDI\u654f\u6377\u5f00\u53d1\u4e2d\u5fc32022\u5e74\u7b2c21\u65e5\u7684\u5de5\u7a0b\u5e08\u4e0e\u8bbe\u8ba1\u5e08\u8054\u5408\u65e5\u5386\u6d3b\u52a8\u7684\u6587\u7ae0\u3002<\/p>\n<h1>\u9996\u5148<\/h1>\n<p>\u8fd9\u7bc7\u6587\u7ae0\u5c06\u6309\u7167 AWS Amplify \u7684\u5b98\u65b9\u6559\u7a0b\u4e00\u6b65\u4e00\u6b65\u5730\u8fdb\u884c\u3002\u6240\u4ee5<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u3053\u308c\u304b\u3089amplify\u3092\u59cb\u3081\u3066\u307f\u305f\u3044\u4eba<\/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\u306e\u6982\u8981\u3092\u628a\u63e1\u3057\u305f\u3044\u4eba<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5e74\u672b\u306b\u3086\u3063\u304f\u308a\u3068qita\u306e\u8a18\u4e8b\u3092\u306a\u3093\u3067\u3082\u3044\u3044\u304b\u3089\u8aad\u307f\u305f\u3044\u4eba<\/ul>\n<p>\u6b64\u4e3a\u4e13\u4e3a&#8230;\u800c\u8bbe\u8ba1\u3002<\/p>\n<p>\u8bf7\u53c2\u8003amplify\u5b98\u65b9\u6559\u7a0b\u4ee5\u83b7\u53d6\u672c\u6b21\u5185\u5bb9\u7684\u8be6\u7ec6\u4fe1\u606f\u3002\u8bf7\u67e5\u9605\u90a3\u91cc\u4ee5\u83b7\u53d6\u66f4\u8be6\u7ec6\u7684\u5185\u5bb9\u3002<\/p>\n<h1>amplify\u7684\u610f\u601d\u662f\u4ec0\u4e48\uff1f<\/h1>\n<p>\u5728Amplify\u516c\u5f0f\u6587\u6863\u4e2d\u6709\u5982\u4e0b\u6240\u8ff0\u3002<\/p>\n<blockquote><p>AWS Amplify \u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u53ef\u4ee5\u8ba9\u524d\u7aef\u7684\u7f51\u9875\/\u79fb\u52a8\u5e94\u7528\u7a0b\u5e8f\u5f00\u53d1\u4eba\u5458\u5728 AWS \u4e0a\u8f7b\u677e\u6784\u5efa\u3001\u90e8\u7f72\u548c\u6258\u7ba1\u5168\u6808\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u6839\u636e\u7528\u4f8b\u9700\u6c42\u7075\u6d3b\u5730\u5229\u7528\u5404\u79cd AWS \u670d\u52a1\u3002\u65e0\u9700\u4e91\u4e13\u4e1a\u77e5\u8bc6\u3002<\/p><\/blockquote>\n<p>\u867d\u7136\u7528\u8bcd\u7a0d\u663e\u4e25\u8c28\uff0c\u4f46\u4f9d\u6211\u4e2a\u4eba\u7684\u7406\u89e3\u662f<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">web\u30fb\u30e2\u30d0\u30a4\u30eb\u30a2\u30d7\u30ea\u3092\u9ad8\u901f\u3067\u958b\u767a\u3059\u308b\u305f\u3081\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0<\/ul>\n<\/li>\n<\/ul>\n<p>\u30b5\u30fc\u30d0\u3084\u30df\u30c9\u30eb\u30a6\u30a7\u30a2\u3068\u3044\u3063\u305f\u30a4\u30f3\u30d5\u30e9\u306a\u3069\u5dee\u5225\u5316\u306b\u306a\u3089\u306a\u3044\u3053\u3068\u3092AWS\u306b\u304a\u307e\u304b\u305b\u3067\u304d\u308b<br \/>\namplify CLI\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001AWS\u30ea\u30bd\u30fc\u30b9\u3092\u81ea\u52d5\u751f\u6210\u3057\u8a2d\u5b9a\u3082\u3084\u3063\u3066\u304f\u308c\u308b<br \/>\namplify Console\u3067\u30b5\u30fc\u30d0\u30fc\u30ec\u30b9\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u81ea\u52d5\u30c7\u30d7\u30ed\u30a4\u3059\u308bCICD\u74b0\u5883\u3084\u30db\u30b9\u30c6\u30a3\u30f3\u30b0\u3001Basic\u8a8d\u8a3c\u306a\u3069\u3092\u7c21\u5358\u306b\u8a2d\u5b9a\u3067\u304d\u308b<\/p>\n<p>\u901a\u8fc7\u7ee7\u7eed\u8fdb\u884c\u6559\u7a0b\uff0c\u6211\u4eec\u5c06\u5728\u7406\u89e3\u4e0a\u8ff0\u5185\u5bb9\u7684\u540c\u65f6\u524d\u8fdb\u3002<\/p>\n<h1>\u4e3a\u4e86\u4f7f\u7528amplify\u505a\u51c6\u5907\u3002<\/h1>\n<p>\u4f5c\u4e3a\u5148\u51b3\u6761\u4ef6\uff0c\u9700\u8981\u4ee5\u4e0b\u73af\u5883\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Node.js v14.x or later<\/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\">npm v6.14.4 or later<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">git v2.14.1 or later<\/ul>\n<p>\u9996\u5148\uff0c\u5c06\u9700\u8981\u4f7f\u7528\u7684amplify CLI\u5b89\u88c5\u5230\u8ba1\u7b97\u673a\u4e0a\u3002<\/p>\n<pre class=\"post-pre\"><code>npm install -g @aws-amplify\/cli\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u5c06\u8fdb\u884camplifyCLI\u7684\u8bbe\u7f6e\u3002<br \/>\n\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06\u8981\u6c42\u60a8\u767b\u5f55\u5230AWS\u63a7\u5236\u53f0\u5e76\u521b\u5efaIAM\u7528\u6237\u3002<\/p>\n<pre class=\"post-pre\"><code>amplify configure\r\n<\/code><\/pre>\n<p>\u5b8c\u6210\u8a2d\u7f6e\u5f8c\uff0c\u60a8\u5c07\u8fd4\u56deCLI\u754c\u9762\u4e26\u6536\u5230&#8221;\u6309Enter\u7e7c\u7e8c&#8221;\u4ee5\u7e7c\u7e8c\u8a2d\u7f6e\u3002<br \/>\n\u5340\u57df\u53ef\u4ee5\u9078\u64c7\u4efb\u610f\u5730\u65b9\uff0c\u6b64\u6b21\u6211\u5011\u9078\u64c7\u4e86ap-northeast-1\u3002<br \/>\n\u8f38\u5165IAM\u4f7f\u7528\u8005\u5f8c\uff0c\u60a8\u5c07\u8df3\u8f49\u81f3AWS\u63a7\u5236\u53f0\u4ee5\u5275\u5efaIAM\u5e33\u6236\u3002\u540c\u6642\uff0c\u6211\u5011\u6703\u9644\u52a0AdministratorAccess-Amplify\u7b56\u7565\u3002<br \/>\n\u4e00\u65e6\u5275\u5efaIAM\u4f7f\u7528\u8005\uff0c\u518d\u6b21\u56de\u5230CLI\u754c\u9762\uff0c\u5c07\u8981\u6c42\u60a8\u8a2d\u7f6eaccessKeyID\u3001secret access key\u548cProfile Name\uff0c\u8acb\u4f7f\u7528\u5148\u524d\u6240\u5275\u5efa\u7684IAM\u4f7f\u7528\u8005\u7684\u76f8\u61c9\u8cc7\u8a0a\u3002<br \/>\n\u82e5\u6210\u529f\u8a2d\u7f6e\u65b0\u4f7f\u7528\u8005\uff0c\u5247\u8868\u793aamplify CLI\u7684\u8a2d\u7f6e\u5df2\u5b8c\u6210\uff01<\/p>\n<pre class=\"post-pre\"><code>accessKeyID:xxxxxxx\r\nsecret access key:xxxxxx\r\nProfile Name:dev\r\nSuccessfully set up the new user.\r\n<\/code><\/pre>\n<h1>\u5c1d\u8bd5\u4f7f\u7528\u540e\u7aef<\/h1>\n<h3>\u524d\u53f0\u51c6\u5907\u597d\u4e86\u3002<\/h3>\n<p>\u4f7f\u7528amplify\u7684\u8bbe\u7f6e\u5df2\u7ecf\u5b8c\u6210\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u521b\u5efa\u5e76\u8fde\u63a5\u524d\u7aef\u548c\u540e\u7aef\u3002<br \/>\n\u8fd9\u6b21\u6211\u4eec\u5c06\u6309\u7167\u6559\u7a0b\u4f7f\u7528CRA\u521b\u5efa\u524d\u7aef\u3002<\/p>\n<pre class=\"post-pre\"><code>$ npx create-react-app {\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d}\r\n<\/code><\/pre>\n<h3>\u540e\u7aef\u521d\u59cb\u5316<\/h3>\n<p>\u73b0\u5728\u524d\u7aef\u5df2\u7ecf\u5b8c\u6210\u4e86\uff0c\u63a5\u4e0b\u6765\u6211\u4eec\u4f1a\u5f00\u59cb\u5236\u4f5c\u540e\u7aef\u3002<\/p>\n<pre class=\"post-pre\"><code>amplify init\r\n<\/code><\/pre>\n<p>\u6267\u884camplify init\u65f6\uff0camplify CLI\u5c06\u542f\u52a8\u5e76\u63a8\u65ad\u51fa\u5c06\u8981\u521d\u59cb\u5316\u7684amplify\u9879\u76ee\uff0c\u5e76\u4e3a\u60a8\u63d0\u4f9b\u9002\u5f53\u7684\u914d\u7f6e\u5efa\u8bae\uff0c\u53ea\u9700\u8f93\u5165Y\u5373\u53ef\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">amplify\u3068\u3044\u3046\u6700\u4e0a\u4f4d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u4f5c\u6210\u3055\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>GraphQL API\u3084\u8a8d\u8a3c\u6a5f\u80fd\u306a\u3069\u3092\u8ffd\u52a0\u3059\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002<br \/>\n\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u3068amplify\u304c\u8ffd\u52a0\u3057\u305fAWS\u30b5\u30fc\u30d3\u30b9\u306eCloudFormation\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u3002<\/p>\n<p>src\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306baws-exports.js\u304c\u4f5c\u6210\u3055\u308c\u308b<\/p>\n<p>amplify\u3067\u4f5c\u6210\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u306e\u8a2d\u5b9a\u60c5\u5831\u3092\u4fdd\u6301\u3059\u308b\u30d5\u30a1\u30a4\u30eb<br \/>\n\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u304b\u3089\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u3092\u4f7f\u3046\u969b\u306b\u5fc5\u8981\u306a\u3059\u3079\u3066\u306e\u60c5\u5831\u304c\u683c\u7d0d\u3055\u308c\u3066\u3044\u308b<\/p>\n<p>.gitignore\u3092\u4fee\u6b63\u3057\u3001\u4e0a\u8a18\u3067\u751f\u6210\u3055\u308c\u305f\u30d5\u30a1\u30a4\u30eb\u3092git\u7ba1\u7406\u304b\u3089\u9664\u5916\u3059\u308b\u3088\u3046\u306b\u3059\u308b<br \/>\nAWS\u4e0a\u306eamplify console\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u4f5c\u6210\u3055\u308c\u308b\u3002<\/p>\n<p>\u30d0\u30c3\u30af\u30a8\u30f3\u30c9\u74b0\u5883\u3084\u30c7\u30d7\u30ed\u30a4\u30b9\u30c6\u30fc\u30bf\u30b9\u306a\u3069\u3092amplify console\u304b\u3089\u78ba\u8a8d\u3067\u304d\u308b<\/p>\n<h3>\u5b89\u88c5Amplify Libraries<\/h3>\n<p>\u4e3a\u4e86\u4f7f\u7528amplify\u5e93\uff0c\u9700\u8981\u5b89\u88c5aws-amplify\u5305\u3002<\/p>\n<pre class=\"post-pre\"><code>npm install aws-amplify\r\n<\/code><\/pre>\n<p>\u5982\u679c\u6210\u529f\u5b89\u88c5\u4e86 AWS Amplify\uff0c\u5219\u53ef\u4ee5\u5728 src\/index.js \u6587\u4ef6\u4e2d\u4f7f\u7528 aws-amplify \u548c\u521a\u521a\u521b\u5efa\u7684 aws-exports.js \u6587\u4ef6\u6765\u8fdb\u884c Amplify \u7684\u8bbe\u7f6e\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"k\">import<\/span> <span class=\"p\">{<\/span> <span class=\"nx\">Amplify<\/span> <span class=\"p\">}<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">aws-amplify<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\r\n<span class=\"k\">import<\/span> <span class=\"nx\">awsExports<\/span> <span class=\"k\">from<\/span> <span class=\"dl\">'<\/span><span class=\"s1\">.\/aws-exports<\/span><span class=\"dl\">'<\/span><span class=\"p\">;<\/span>\r\n<span class=\"nx\">Amplify<\/span><span class=\"p\">.<\/span><span class=\"nf\">configure<\/span><span class=\"p\">(<\/span><span class=\"nx\">awsExports<\/span><span class=\"p\">);<\/span>\r\n<\/code><\/pre>\n<p>\u901a\u8fc7\u5c06\u5176\u914d\u7f6e\u4e3a\u8fd9\u6837\uff0c\u5f53\u5728amplify\u4e2d\u66f4\u65b0\u540e\u7aef\u8bbe\u7f6e\u65f6\uff0caws-exports.js \u5c06\u81ea\u52a8\u66f4\u65b0\uff0c\u5e76\u4f7fAmplify\u5e93\u80fd\u591f\u8bc6\u522b\u5b83\u4eec\u3002<\/p>\n<h3>\u7f16\u5199\u540e\u7aef\u548cAPI\u4ee5\u8fde\u63a5\u5e94\u7528\u7a0b\u5e8f\u3002<\/h3>\n<p>\u5728Amplify\u4e2d\u53ef\u4ee5\u4f7f\u7528REST\u548cGraphQL\u4f5c\u4e3aAPI\u3002\u672c\u6b21\u5c06\u6309\u7167\u6559\u7a0b\u4f7f\u7528GraphQL\u8fde\u63a5DynamoDB\u5e76\u8fdb\u884c\u6570\u636e\u83b7\u53d6\u3002\u5728\u5e94\u7528\u7684\u6839\u76ee\u5f55\u4e0b\u6267\u884c\u547d\u4ee4\u3002<\/p>\n<pre class=\"post-pre\"><code>amplify add api\r\n<\/code><\/pre>\n<p>\u672c\u6b21\u9009\u62e9\u4e86\u9ed8\u8ba4\u7684GraphQL\u2192Continue\u2192Single Object..\u9009\u9879\u3002<br \/>\n\u7136\u540e\uff0c\u5b83\u4f1a\u81ea\u52a8\u751f\u6210GraphQL\u7684\u6a21\u5f0f\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<p>\u8fde\u7eed\u90e8\u7f72 API.<\/p>\n<pre class=\"post-pre\"><code>amplify push\r\n<\/code><\/pre>\n<p>\u88ab\u95ee\u4e86\u5404\u79cd\u5404\u6837\u7684\u95ee\u9898\uff0c\u6211\u4f1a\u6309\u7167\u5b98\u65b9\u6559\u7a0b\u7684\u5185\u5bb9\u8fdb\u884c\u56de\u7b54\u3002<br \/>\n\u7136\u540e\uff0cAPI\u5c06\u90e8\u7f72\u5728AWS\u4e0a\u3002<\/p>\n<pre class=\"post-pre\"><code>? Are you sure you want to continue? Y\r\n\r\n# You will be walked through the following questions for GraphQL code generation\r\n? Do you want to generate code for your newly created GraphQL API? Y\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? Y\r\n? Enter maximum statement depth [increase from default if your schema is deeply nested]: 2\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8220913a08637a6aeef0\/45-1.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2022-12-19 20.54.06.png\" \/><\/div>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8220913a08637a6aeef0\/46-0.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2022-12-19 20.58.57.png\" \/><\/div>\n<p>\u54c7\uff01TODO\u5df2\u7ecf\u6dfb\u52a0\u5e76\u4e14\u6210\u529f\u4fdd\u5b58\u5230\u4e86DynamoDB\u4e2d\uff01\u592a\u4ee4\u4eba\u60ca\u53f9\u4e86\uff01\u7b80\u5355\u6613\u884c\uff01<\/p>\n<h1>\u5c1d\u8bd5\u589e\u52a0(\u53ef\u9009)\u5f85\u529e\u4e8b\u9879\u5e94\u7528\u7684\u8f93\u5165\u9879\u76ee\u3002<\/h1>\n<p>\u5c3d\u7ba1\u4e0d\u7b26\u5408\u6559\u7a0b\u7684\u6b65\u9aa4\uff0c\u6211\u5c06\u4fee\u6b63\u4e4b\u524d\u751f\u6210\u7684GraphQL\u6a21\u5f0f\uff0c\u4ee5\u4fbf\u5728Todo\u9879\u76ee\u4e2d\u80fd\u591f\u8f93\u5165\u65b0\u8d1f\u8d23\u4eba\u3002<br \/>\n\u9996\u5148\uff0c\u6211\u4f1a\u5728\u4e4b\u524d\u7684schema.graphql\u6587\u4ef6\u7684Todo\u6a21\u5f0f\u4e2d\u6dfb\u52a0\u4e00\u4e2aperson\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\">description<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\r\n  <span class=\"n\">person<\/span><span class=\"p\">:<\/span> <span class=\"nb\">String<\/span>\r\n<span class=\"p\">}<\/span>\r\n<\/code><\/pre>\n<div><img decoding=\"async\" class=\"post-images\" title=\"\" src=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8220913a08637a6aeef0\/51-3.png\" alt=\"\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8 2022-12-20 17.33.42.png\" \/><\/div>\n<h1>\u603b\u7ed3<\/h1>\n<p>\u8fd9\u6b21\u6211\u5c1d\u8bd5\u4e86\u4f7f\u7528amplify\u5b98\u65b9\u6559\u7a0b\u3002<br \/>\n\u4f7f\u7528amplify\u53ef\u4ee5\u7b80\u5355\u5730\u901a\u8fc7CLI\u521b\u5efaAPI\uff0c\u8fd8\u53ef\u4ee5\u8fdb\u884c\u7f51\u9875\u6258\u7ba1\uff0c\u6240\u4ee5\u5728\u6709\u77ed\u671f\u5f00\u53d1\u76ee\u6807\u6216\u8005\u53c2\u52a0\u9ed1\u5ba2\u9a6c\u62c9\u677e\u7b49\u6d3b\u52a8\u65f6\u7279\u522b\u65b9\u4fbf\u3002<br \/>\n\u8fd9\u6b21\u6211\u5df2\u7ecf\u8fdb\u884c\u4e86\u672c\u5730\u6267\u884c\uff0c\u6240\u4ee5CI\/CD\u8bbe\u7f6e\u548c\u6258\u7ba1\u7b49\u5c06\u5728\u540e\u7eed\u66f4\u65b0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u7bc7\u6587\u7ae0\u662fKDDI\u654f\u6377\u5f00\u53d1\u4e2d\u5fc32022\u5e74\u7b2c21\u65e5\u7684\u5de5\u7a0b\u5e08\u4e0e\u8bbe\u8ba1\u5e08\u8054\u5408\u65e5\u5386\u6d3b\u52a8\u7684\u6587\u7ae0\u3002 \u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u5c06\u6309\u7167 A [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-47943","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>\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1 - 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\/\u6309\u7167aws-amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\u3002\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\" \/>\n<meta property=\"og:description\" content=\"\u672c\u7bc7\u6587\u7ae0\u662fKDDI\u654f\u6377\u5f00\u53d1\u4e2d\u5fc32022\u5e74\u7b2c21\u65e5\u7684\u5de5\u7a0b\u5e08\u4e0e\u8bbe\u8ba1\u5e08\u8054\u5408\u65e5\u5386\u6d3b\u52a8\u7684\u6587\u7ae0\u3002 \u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u5c06\u6309\u7167 A [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u6309\u7167aws-amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\u3002\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-20T22:02:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-28T16:30:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8220913a08637a6aeef0\/45-1.png\" \/>\n<meta name=\"author\" content=\"\u79d1, \u96c5\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u79d1, \u96c5\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \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\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/\",\"name\":\"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-11-20T22:02:37+00:00\",\"dateModified\":\"2024-04-28T16:30:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\"}]},{\"@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\/41e222757cdd2a3365361328bd79970a\",\"name\":\"\u79d1, \u96c5\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g\",\"caption\":\"\u79d1, \u96c5\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1 - 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\/\u6309\u7167aws-amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\u3002\/","og_locale":"zh_CN","og_type":"article","og_title":"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1","og_description":"\u672c\u7bc7\u6587\u7ae0\u662fKDDI\u654f\u6377\u5f00\u53d1\u4e2d\u5fc32022\u5e74\u7b2c21\u65e5\u7684\u5de5\u7a0b\u5e08\u4e0e\u8bbe\u8ba1\u5e08\u8054\u5408\u65e5\u5386\u6d3b\u52a8\u7684\u6587\u7ae0\u3002 \u9996\u5148 \u8fd9\u7bc7\u6587\u7ae0\u5c06\u6309\u7167 A [&hellip;]","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u6309\u7167aws-amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1\u3002\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-20T22:02:37+00:00","article_modified_time":"2024-04-28T16:30:10+00:00","og_image":[{"url":"https:\/\/cdn.silicloud.com\/blog-img\/blog\/img\/657d8220913a08637a6aeef0\/45-1.png"}],"author":"\u79d1, \u96c5","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u79d1, \u96c5","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/","name":"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-11-20T22:02:37+00:00","dateModified":"2024-04-28T16:30:10+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/41e222757cdd2a3365361328bd79970a"},"breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u6309\u7167AWS Amplify\u7684\u6559\u7a0b\u8fdb\u884c\u8f7b\u677e\u7684\u7f51\u9875\u5f00\u53d1"}]},{"@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\/41e222757cdd2a3365361328bd79970a","name":"\u79d1, \u96c5","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1b2d3e00a7df03689797ebd4af8c5827ba5af936849a71050ec331f4cf902c5d?s=96&d=mm&r=g","caption":"\u79d1, \u96c5"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keya\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e6%8c%89%e7%85%a7aws-amplify%e7%9a%84%e6%95%99%e7%a8%8b%e8%bf%9b%e8%a1%8c%e8%bd%bb%e6%9d%be%e7%9a%84%e7%bd%91%e9%a1%b5%e5%bc%80%e5%8f%91%e3%80%82\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47943","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=47943"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47943\/revisions"}],"predecessor-version":[{"id":68427,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/47943\/revisions\/68427"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=47943"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=47943"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=47943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}