# First deploy fails due to dependent AWS Role

**URL:** <https://forum.serverless.com/t/first-deploy-fails-due-to-dependent-aws-role/1809>\
**Category:** Serverless Framework\
**Tags:** aws, release\
**Created:** [May 4, 2017, 6:44pm UTC](https://forum.serverless.com/t/first-deploy-fails-due-to-dependent-aws-role/1809 "2017-05-04T18:44:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankeeinlondon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/yankeeinlondon/32/244_2.png) [@yankeeinlondon](https://forum.serverless.com/u/yankeeinlondon)\
**Post date:** [May 4, 2017, 6:44pm UTC](https://forum.serverless.com/t/first-deploy-fails-due-to-dependent-aws-role/1809/1 "2017-05-04T18:44:21Z")

</div>

I have a role definition in my `serverless.yml` which provides Lamdba functions the right to execute:

```
lambdaInvocation:
  Type: AWS::IAM::Policy
  Properties:
    PolicyName: truecash-invocation
    PolicyDocument:
      Version: '2012-10-17'
      Statement:
        - Effect: Allow
          Action:
            - lambda:InvokeFunction
            - lambda:ListFunctions
          Resource: 
            - "arn:aws:lambda:${self:custom.region}:*:function:truecash-services-${self:custom.stage}-*"
    Roles:
      - truecash-services-${self:custom.stage}-accounting
      - truecash-services-${self:custom.stage}-${self:provider.region}-lambdaRole

```

In my **Dev** environment this works just fine but now that I want to deploy to **Prod** I have a problem. It seems that when you deploy to a new _stage_ it doesn’t setup the roles first and therefore my deployment fails because the functions depend on the role but the role hasn’t been created yet.

How can I get around this? Can I deploy only the resources?

---

<div class="post-metadata">

**Author:** ![yankeeinlondon](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/yankeeinlondon/32/244_2.png) [@yankeeinlondon](https://forum.serverless.com/u/yankeeinlondon)\
**Post date:** [May 4, 2017, 7:43pm UTC](https://forum.serverless.com/t/first-deploy-fails-due-to-dependent-aws-role/1809/2 "2017-05-04T19:43:52Z")

</div>

please ignore, I was misinterpreting the error message
