# Getting error: "The CloudFormation template is invalid: Template error: every Fn::GetAtt object requires two non-empty parameters, the resource name and the resource attribute"

**URL:** <https://forum.serverless.com/t/getting-error-the-cloudformation-template-is-invalid-template-error-every-fn-getatt-object-requires-two-non-empty-parameters-the-resource-name-and-the-resource-attribute/18367>\
**Category:** Serverless Framework\
**Tags:** aws, lambda, api-gateway, iam, dynamodb\
**Created:** [February 26, 2023, 2:39pm UTC](https://forum.serverless.com/t/getting-error-the-cloudformation-template-is-invalid-template-error-every-fn-getatt-object-requires-two-non-empty-parameters-the-resource-name-and-the-resource-attribute/18367 "2023-02-26T14:39:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![testuser](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/testuser/32/7338_2.png) [@testuser](https://forum.serverless.com/u/testuser)\
**Post date:** [February 26, 2023, 2:39pm UTC](https://forum.serverless.com/t/getting-error-the-cloudformation-template-is-invalid-template-error-every-fn-getatt-object-requires-two-non-empty-parameters-the-resource-name-and-the-resource-attribute/18367/1 "2023-02-26T14:39:56Z")

</div>

When trying to deploy an app i keep getting the error in the console:

`The CloudFormation template is invalid: Template error: every Fn::GetAtt object requires two non-empty parameters, the resource name and the resource attribute`

This is the first time for me to try a serverless framework, and other than the comments under the `iam`, im not sure they are correct. just got if somewhere online.

This is my serverless.yml file:

```auto
org: testuser
app: aws-k
service: aws-k
frameworkVersion: '3'

provider:
  name: aws
  runtime: python3.9
  stage: V1
  region: eu-west-1
  httpApi:
    cors: true
  iam: # required to give the lambda function access to the dynamodb 
    role:
      statements:
        - Effect: Allow
          Action:
            - dynamodb:* # Allow all dynamodb actions (optional to be specific)
          Resource:
            Fn::GetAtt: # Hooks the Lambdas IAM role with the dynamodb tables
              - HHHs 
              - GWs
              # - TestTable
              - Arn

functions:

  # EXAMPLE 
  
  hello:
    handler: handler.hello
    events:
      - httpApi:
          path: /
          method: GET

  # HHHs

  get_hhhs: 
    handler: lambdas/hhhs/get_hhhs.lambda_handler
    events: 
      - httpApi:
          path: /hhhs
          method: GET

  add_hhh:
    handler: lambdas/hhhs/add_hhh.lambda_handler
    events: 
      - httpApi:
          path: /hhhs
          method: POST

  update_hhh:
    handler: lambdas/hhhs/update_hhh.lambda_handler
    events: 
      - httpApi:
          path: /hhhs
          method: PATCH

resources:
  Resources:

    HHHs:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: HHHs
        BillingMode: PAY_PER_REQUEST
        AttributeDefinitions:
          - AttributeName: serial
            AttributeType: S
        KeySchema:
          - AttributeName: serial
            KeyType: HASH

    GWs:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: GWs
        BillingMode: PAY_PER_REQUEST
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: N
        KeySchema:
          - AttributeName: id
            KeyType: HASH

```

Can someone help my understand what’s the problem? tnx
