# Error to define resources with typescript

**URL:** <https://forum.serverless.com/t/error-to-define-resources-with-typescript/12431>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [August 31, 2020, 2:07pm UTC](https://forum.serverless.com/t/error-to-define-resources-with-typescript/12431 "2020-08-31T14:07:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfollmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jfollmann/32/4528_2.png) [@jfollmann](https://forum.serverless.com/u/jfollmann)\
**Post date:** [August 31, 2020, 2:07pm UTC](https://forum.serverless.com/t/error-to-define-resources-with-typescript/12431/1 "2020-08-31T14:07:17Z")

</div>

Hi,

I"m using typescript aws template and now the serverless.yml is serverless.ts.  
However, i’m have a problem on type declaration to define my resources.

Sample in serverless.yml (working):

```auto
resources:
  Resources:
    IamRoleLambdaExecution:
      Properties:
        Path: /eng-roles/
        PermissionsBoundary: "arn:aws:iam::#{AWS::AccountId}:policy/roles-boundary"

```

Try #01 in serverless.ts (not working)

```auto
  resources: {
    Resources: {
      IamRoleLambdaExecution: {
        Type: "IamRoleLambdaExecution",
        Properties: {
          Path: "/eng-roles/",
          PermissionsBoundary: "arn:aws:iam::#{AWS::AccountId}:policy/roles-boundary"
        }
      }
    }
  }

```

Try #02 in serverless.ts (also not working)

```auto
  resources: {
    Resources: [ 
      { 
        Type: "IamRoleLambdaExecution",
        Properties: { 
          Path: "/eng-roles/",
          PermissionsBoundary: "arn:aws:iam::#{AWS::AccountId}:policy/roles-boundary"
        }
      }
    ]
  }

```

How can i adjust my resource definition?

Thanks
