· 5 years ago · Jan 14, 2021, 09:12 AM
1{
2 "AWSTemplateFormatVersion":"2010-09-09",
3 "Description":"Article nested stack.",
4 "Metadata":{
5
6 },
7 "Parameters":{
8 "AppSyncApiId":{
9 "Type":"String",
10 "Description":"The id of the AppSync API associated with this project."
11 },
12 "AppSyncApiName":{
13 "Type":"String",
14 "Description":"The name of the AppSync API",
15 "Default":"AppSyncSimpleTransform"
16 },
17 "env":{
18 "Type":"String",
19 "Description":"The environment name. e.g. Dev, Test, or Production",
20 "Default":"NONE"
21 },
22 "S3DeploymentBucket":{
23 "Type":"String",
24 "Description":"The S3 bucket containing all deployment assets for the project."
25 },
26 "S3DeploymentRootKey":{
27 "Type":"String",
28 "Description":"An S3 key relative to the S3DeploymentBucket that points to the root\nof the deployment directory."
29 }
30 },
31 "Resources":{
32 "CreateArticlePipelineResolver":{
33 "Type":"AWS::AppSync::Resolver",
34 "Properties":{
35 "ApiId":{
36 "Ref":"AppSyncApiId"
37 },
38 "Kind":"PIPELINE",
39 "PipelineConfig":{
40 "Functions":[
41 {
42 "Fn::GetAtt":[
43 "...",
44 "FunctionId"
45 ]
46 },
47 {
48 "Fn::GetAtt":[
49 "...",
50 "FunctionId"
51 ]
52 },
53 "SetRandomColorArticleFunctionId"
54 {
55 "Fn::GetAtt":[
56 "...",
57 "FunctionId"
58 ]
59 },
60 {
61 "Fn::GetAtt":[
62 "...",
63 "FunctionId"
64 ]
65 }
66 ]
67 },
68 "TypeName":"Mutation",
69 "FieldName":"createArticle",
70 "RequestMappingTemplateS3Location":{
71 "Fn::Sub":[
72 "s3://${S3DeploymentBucket}/${S3DeploymentRootKey}/resolvers/Mutation.pipelineArticleCreate.req.vtl",
73 {
74 "S3DeploymentBucket":{
75 "Ref":"S3DeploymentBucket"
76 },
77 "S3DeploymentRootKey":{
78 "Ref":"S3DeploymentRootKey"
79 }
80 }
81 ]
82 },
83 "ResponseMappingTemplateS3Location":{
84 "Fn::Sub":[
85 "s3://${S3DeploymentBucket}/${S3DeploymentRootKey}/resolvers/PIPELINE.res.vtl",
86 {
87 "S3DeploymentBucket":{
88 "Ref":"S3DeploymentBucket"
89 },
90 "S3DeploymentRootKey":{
91 "Ref":"S3DeploymentRootKey"
92 }
93 }
94 ]
95 }
96 },
97 "DependsOn":[
98 "...",
99 "...",
100 "SetRandomColorArticleFunction", // possible ?
101 "...",
102 "..."
103 ]
104 }
105 },
106 "Conditions":{
107 "HasEnvironmentParameter":{
108 "Fn::Not":[
109 {
110 "Fn::Equals":[
111 {
112 "Ref":"env"
113 },
114 "NONE"
115 ]
116 }
117 ]
118 },
119 "AlwaysFalse":{
120 "Fn::Equals":[
121 "true",
122 "false"
123 ]
124 }
125 },
126 "Outputs":{
127
128 }
129}