小编Tan*_*ong的帖子

对CloudFormation上的嵌套堆栈使用CAPABILITY_AUTO_EXPAND

我试图使用嵌套堆栈,当我的ChangeSet被执行时,我收到此错误:

Requires capabilities : [CAPABILITY_AUTO_EXPAND]

我去创建了一个带有cloudformation的管道.

这可以用于创建管道:

Configuration:
  ActionMode: CHANGE_SET_REPLACE
  ChangeSetName: changeset
  RoleArn: ??
  Capabilities: CAPABILITY_IAM
  StackName: appsync-graphql
  TemplatePath: BuildArtifact::output.yaml
Run Code Online (Sandbox Code Playgroud)

这不能:

Configuration:
  ActionMode: CHANGE_SET_REPLACE
  ChangeSetName: changeset
  RoleArn: ??
  Capabilities: 
    - CAPABILITY_IAM
    - CAPABILITY_AUTO_EXPAND
  StackName: appsync-graphql
  TemplatePath: BuildArtifact::output.yaml
Run Code Online (Sandbox Code Playgroud)

错误是:"属性值配置必须是具有String(或简单类型)属性的对象"

这是我找到的最接近的文档:https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_UpdateStack.html

它说:Type: Array of strings对于功能性而言,aws cli docs同样地说,但没有举例说明.

所以我没想到还有什么可以尝试拥有CAPABILITY_AUTO_EXPAND功能.

aws-cloudformation aws-codepipeline

11
推荐指数
3
解决办法
5429
查看次数

如何使用 $util.error 在 AppSync 中发送自定义错误

我对 AppSync 错误处理有疑问。我想发送errorInfo对象以及错误响应,我尝试了$util.error. 根据文件:

\n\n

https://docs.aws.amazon.com/appsync/latest/devguide/resolver-util-reference.html

\n\n
\n

$util.error(String, String, Object, Object)

\n\n

抛出自定义错误。如果模板检测到请求或调用结果有错误,则可以在请求或响应映射模板中使用该模板。此外,还可以指定 errorType 字段、data 字段和 errorInfo 字段。数据值将添加到 GraphQL 响应中错误内的相应错误块中。注意:数据将根据查询选择集进行过滤。errorInfo 值将添加到 GraphQL 响应中错误内相应的 error\n 块中。注意:errorInfo 将不会根据查询选择集进行过滤。

\n
\n\n

这是我的 ResponseMappingTemplate 的样子:

\n\n
#if( $context.result && $context.result.errorMessage )\n  $utils.error($context.result.errorMessage, $context.result.errorType, $context.result.data), $context.result.errorInfo)\n#else\n  $utils.toJson($context.result.data)\n#end\n
Run Code Online (Sandbox Code Playgroud)\n\n

这是我在解析器上所做的:

\n\n
var result = {\n  data: null,\n  errorMessage: \'I made this error\',\n  errorType: \'ALWAYS_ERROR\',\n  errorInfo: {\n    errorCode: 500,\n    validations: [\n      {\n        fieldName: \'_\',\n        result: false,\n        reasons: [\n          \'Failed! Yay!\'\n        ]\n      }\n …
Run Code Online (Sandbox Code Playgroud)

error-handling vtl graphql graphql-js aws-appsync

7
推荐指数
1
解决办法
1万
查看次数

BigQuery 计划查询:当目标数据集位于 > REGION_ASIA_SOUTHEAST_1 时,无法在 > JURISDICTION_US 中创建传输

我在尝试创建计划查询时经常收到此错误

创建计划查询时出错:当目标数据集位于 REGION_ASIA_SOUTHEAST_1 时,无法在 JURISDICTION_US 中创建传输

我只需要一个计划查询来覆盖表中的数据。

google-bigquery

7
推荐指数
1
解决办法
6289
查看次数