# DependOn API Gateway deployment

**URL:** <https://forum.serverless.com/t/dependon-api-gateway-deployment/7792>\
**Category:** Serverless Framework\
**Tags:** aws, cloudformation, api-gateway\
**Created:** [March 26, 2019, 6:19am UTC](https://forum.serverless.com/t/dependon-api-gateway-deployment/7792 "2019-03-26T06:19:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kekalama](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kekalama](https://forum.serverless.com/u/kekalama)\
**Post date:** [March 26, 2019, 6:19am UTC](https://forum.serverless.com/t/dependon-api-gateway-deployment/7792/1 "2019-03-26T06:19:18Z")

</div>

I have a resource part that is assigning selected API Gateway stage with predefined WAF ACL rule. However this part is failing as the REST API deployment part is not ready when assigning happens. We’re having following error at AWS CF console. So the question is, is there possibility to tackle this issue by depending (DependOn) on some particular artifact?

```auto
The referenced item does not exist. (Service: AWSWAFRegional; Status Code: 400; Error Code: WAFNonexistentItemException

```

Here’s the serverless.yml part:

```auto
 RestApiToWebACLAssociation:
      Type: 'AWS::WAFRegional::WebACLAssociation'
      Properties:
        WebACLId: { 'Fn::ImportValue': '<key>' }
        ResourceArn: arn:aws:apigateway:#{AWS::Region}::/restapis/#{ApiGatewayRestApi}/stages/${self:provider.stage}

```

---

<div class="post-metadata">

**Author:** ![ocind](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/ocind/32/3387_2.png) [@ocind](https://forum.serverless.com/u/ocind)\
**Post date:** [May 28, 2019, 4:22am UTC](https://forum.serverless.com/t/dependon-api-gateway-deployment/7792/2 "2019-05-28T04:22:30Z")

</div>

hi do you manage to solve this problem? I am currently having the same issue.
