AWS Toolkit for JetBrains
User Guide

Working with Amazon EventBridge Schemas

You can use the AWS Toolkit for JetBrains to work with Amazon EventBridge Schemas as follows.

Note

Working with EventBridge Schemas is currently supported only by the AWS Toolkit for IntelliJ and the AWS Toolkit for PyCharm.

The following information assumes you have already set up the AWS Toolkit for JetBrains.

View an Available Schema

  1. With the AWS Explorer tool window displayed, expand Schemas.

  2. Expand the name of the registry that contains the schema you want to view. For example, many of the schemas that AWS supplies are in the aws.events registry.

  3. To view the schema in the editor, right-click the title of the schema, and on the context menu, choose View Schema.

Find an Available Schema

With the AWS Explorer tool window displayed, do one of the following:

  • Begin typing the title of the schema you want to find. The AWS Explorer highlights the titles of schemas that contain a match.

  • Right-click Schemas, and on the context menu, choose Search Schemas. In the Search EventBridge Schemas dialog box, begin typing the title of the schema you want to find. The dialog box displays the titles of schemas that contain a match.

  • Expand Schemas. Right-click the name of the registry that contains the schema you want to find, and then choose Search Schemas in Registry. In the Search EventBridge Schemas dialog box, begin typing the title of the schema you want to find. The dialog box displays the titles of schemas that contain a match.

To view a schema in the list of matches, do one of the following:

  • To display the schema in the editor, in AWS Explorer, right-click the title of the schema, and then choose View Schema.

  • In the Search EventBridge Schemas dialog box, choose the title of the schema to display the schema.

Generate Code for an Available Schema

  1. With the AWS Explorer tool window displayed, expand Schemas.

  2. Expand the name of the registry that contains the schema you want to generate code for.

  3. Right-click the title of the schema, and then choose Download code bindings.

  4. In the Download code bindings dialog box, choose the following:

    • The Version of the schema to generate code for.

    • The supported programming Language and language version to generate code for.

    • The File location where you want to store the generated code on the local development machine.

  5. Choose Download.

Create an AWS Serverless Application Model Application that Uses an Available Schema

  1. On the File menu, choose New, Project.

  2. In the New Project dialog box, choose AWS.

  3. Choose AWS Serverless Application, and then choose Next.

  4. Specify the following:

    • A Project name for the project.

    • A Project location on your local development machine for the project.

    • A supported AWS Lambda Runtime for the project.

    • An AWS Serverless Application Model (AWS SAM) SAM Template for the project. The choices currently include the following:

      • AWS SAM EventBridge Hello World (EC2 Instance State Change) – When deployed, creates an AWS Lambda function and an associated Amazon API Gateway endpoint in your AWS account. By default, this function and endpoint respond only to an Amazon EC2 instance status change.

      • AWS SAM EventBridge App from Scratch (for any Event trigger from a Schema Registry) – When deployed, creates an AWS Lambda function and an associated Amazon API Gateway endpoint in your AWS account. This function and endpoint can respond to events that are available in the schema you specify.

        If you choose this template, you must also specify the following:

        • The named profile, Credentials, to use.

        • The AWS Region to use.

        • The EventBridge Event Schema to use.

    • The version of the SDK to use for the project (Project SDK).

After you create an AWS serverless application project, you can do the following:

You can also do the following with Lambda functions that are part of the application: