小编sta*_*eve的帖子

模板错误:Fn::GetAtt 的实例引用未定义的资源 EventHandlerLambdaFunction

谁能帮我找出问题所在吗?

我正在我的无服务器 yml 中导入此 cloudformation 资源。这是我的功能配置:

Resources:
  eventHandler:
    Type: AWS::Serverless::Function
    Properties:
      CodeUri: eventLambda/
      Handler: dist/app.eventHandler
      Runtime: nodejs12.x
      FunctionName: eventHandler
Run Code Online (Sandbox Code Playgroud)

这是我引用它的地方:

eventSourceRule:
    Type: 'AWS::Events::Rule'
    Properties:
      Name: eventSourceRule
      EventBusName: omnibus-${self:custom.stage}
      EventPattern: |
        {
          "source": ["op.api"]
        }
      RetryPolicy:
        MaximumRetryAttempts: 5
        MaximumEventAgeInSeconds: 900
      DeadLetterConfig:
        Type: SQS
        QueueLogicalId: EBRuleDLQ
      Targets:
        - Arn:
            Fn::GetAtt:
              - 'EventHandlerLambdaFunction'
              - 'Arn'
          Id: 'eventSourceRule'
Run Code Online (Sandbox Code Playgroud)

请注意,我已经尝试过了eventHandlerEventHandler但这些都不起作用。这就是我收到的错误:

The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource EventHandlerLambdaFunction
Run Code Online (Sandbox Code Playgroud)

resources amazon-web-services aws-cloudformation serverless

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

Prisma 生成的类型未更新

我使用 Prisma 作为 ORM,并且必须更改删除一些列并添加其他列。我已经使用新列更新了数据库并重新创建了 prisma 架构,但问题是现在每次我尝试插入新条目时都会收到此错误:

Unknown arg "picture" in create.picture for type usersCreateInput. Did you mean "image"?

“图片”是新列之一,“图像”是已删除的列之一,似乎生成的类型没有正确更新,因为其中一个新列存在(email_verified),但另一个(图片)不是。

type usersCreateInput {
  name?: String | Null
  email?: String | Null
  email_verified?: DateTime | Null
  image?: String | Null
  mentor?: Boolean | Null
  weekly_time?: Int | Null
  journey?: String | Null
  pronouns?: String | Null
  occupation?: String | Null
  description?: String | Null
  created_at?: DateTime
  updated_at?: DateTime
  skills?: usersCreateskillsInput | List<String>
  boards?: boardsCreateNestedOneWithoutUsersInput
}
Run Code Online (Sandbox Code Playgroud)

这些正是我所做的步骤:

  1. 更改了 Docker 使用的 init.sql 文件
  2. 基于新的 …

postgresql orm prisma

3
推荐指数
2
解决办法
7060
查看次数