amazon-web-services - 如何在无服务器中将 aws 堆栈名称与其他字符串连接起来?

标签 amazon-web-services aws-cloudformation serverless

考虑serverless模板

stepFunctions:
  stateMachines:

    MyStateMachine:
      name: "#{AWS::StackName}SomeName"

给我:

Error: The CloudFormation template is invalid: Template format error: Resource name #{AWS::StackName}SomeName is non alphanumeric.

所以这个内联不起作用。有什么想法吗?

最佳答案

没什么神奇的,您不需要引号,请尝试以下操作:

stepFunctions:
  stateMachines:

    MyStateMachine:
      name: #{AWS::StackName}SomeName

关于amazon-web-services - 如何在无服务器中将 aws 堆栈名称与其他字符串连接起来?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57929343/

相关文章:

amazon-web-services - 如何暂停/恢复AWS Lambda函数

amazon-web-services - CloudFormation S3 指定物理名称

azure - 如何将新创建的子网引用到 terraforn azure 中的其他模块

amazon-web-services - 使用 EC2 作为代理连接到 Aurora Serverless

node.js - 无服务器离线 - 在 MacBook 16"M1 Pro(运行 Mac OS Monterey)上运行时无法命中端点

java - 如何排查 Amazon S3 GET 请求签名不匹配问题?

amazon-web-services - 将 EC2 公共(public) IP 地址指向子域

amazon-web-services - 定义为 null 的 bean 'AmazonEc2InstanceDataPropertySourcePostProcessor' 无法注册

amazon-web-services - 如何在执行 [aws cloudformation create-stack] 后自动提取 VPCID、PrivateSubnet1、PublicSubnet1、S3BucketName 和 DBSubnetGroup

node.js - 将 NodeJS 运行时从 8.10 更新到 10.x 或 12.x - AWS Amplify