title: AWS API Gateway integration with AWS Event Bridge(Cloudwatch Events) in Cloudformation Script
body: <p><em>Original Requirement</em>:</p>
  <p>Create a route/path on AWS Api Gateway which connects API Gateway directly to AWS Event Bridge (Cloudwatch Events) and puts/pushes event on an event bus of it.</p>
  <p>Was able to create it and executes just fine when done from AWS Console.</p>
  <p><em>Actual Problem</em>:</p>
  <p>When writing the AWS Cloudformation script for this API Gateway, it looks like this:</p>
  <pre><code>EventsPostMethod:
   Type: AWS::ApiGateway::Method
   Properties:
     ResourceId:
       Ref: EventsResource
   RestApiId:
     Ref: RestAPI
   HttpMethod: POST
   AuthorizationType: NONE
   Integration:
     Type: AWS
     IntegrationHttpMethod: POST
     Uri:
       Fn::Sub: arn:aws:apigateway:${AWS::Region}:cloudwatchEvents:action/PutEvents
     RequestParameters:
       integration.request.header.X-Amz-Target: &quot;'AWSEvents.PutEvents'&quot;
     RequestTemplate:
       some-script-here...
     
  </code></pre>
  <p>Notice the Uri value:</p>
  <pre><code>&quot;arn:aws:apigateway:${AWS::Region}:cloudwatchEvents:action/PutEvents&quot;
  arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}
  </code></pre>
  <p>According to AWS <a href="https://docs.aws.amazon.com/apigateway/api-reference/resource/integration/#type" rel="nofollow noreferrer">Docs</a> the value of uri should be following:</p>
  <blockquote>
  <p>For AWS or AWS_PROXY integrations, the URI is of the form arn:aws:apigateway:{region}:{subdomain.service|service}:path|action/{service_api}. Here, {Region} is the API Gateway region (e.g., us-east-1); {service} is the name of the integrated AWS service (e.g., s3); and {subdomain} is a designated subdomain supported by certain AWS service for fast host-name lookup. action can be used for an AWS service action-based API, using an Action={name}&amp;{p1}={v1}&amp;p2={v2}... query string. The ensuing {service_api} refers to a supported action {name} plus any required input parameters. Alternatively, path can be used for an AWS service path-based API. The ensuing service_api refers to the path to an AWS service resource, including the region of the integrated AWS service, if applicable. For example, for integration with the S3 API of GetObject, the uri can be either arn:aws:apigateway:us-west-2:s3:action/GetObject&amp;Bucket={bucket}&amp;Key={key} or arn:aws:apigateway:us-west-2:s3:path/{bucket}/{key}</p>
  </blockquote>
  <p>You must have noticed that I replaced the <strong>service</strong> with <strong>cloudwatchEvents</strong> in the above mentioned uri.</p>
  <p>Now, error Given by AWS Cloudformation Console during Publish of API Gateway:</p>
  <blockquote>
  <p>AWS Service of type cloudwatchEvents not supported (Service: AmazonApiGateway; Status Code: 400; Error Code: BadRequestException; Request ID: 07bae22c-d198-4595-8de9-6ea23763eff5; Proxy: null)</p>
  </blockquote>
  <p>Now I have tried replacing service with</p>
  <ul>
  <li>cloudwatch</li>
  <li>eventBridge</li>
  <li>cloudwatchEvent</li>
  <li>event-bus</li>
  </ul>
  <p>This is the real problem. What should I place in service in uri so that it accepts ?</p>
  <p><a href="https://i.stack.imgur.com/rA8oO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rA8oO.png" alt="enter image description here" /></a></p>