94 releases (50 stable)

new 1.50.0 Dec 4, 2024
1.49.0 Nov 6, 2024
1.48.0 Oct 31, 2024
1.36.0 Jul 22, 2024
0.0.0 May 7, 2021

#2488 in Network programming

Download history 179/week @ 2024-08-16 53/week @ 2024-08-23 143/week @ 2024-08-30 116/week @ 2024-09-06 133/week @ 2024-09-13 184/week @ 2024-09-20 137/week @ 2024-09-27 175/week @ 2024-10-04 103/week @ 2024-10-11 8/week @ 2024-10-18 156/week @ 2024-10-25 224/week @ 2024-11-01 54/week @ 2024-11-08 6/week @ 2024-11-15 3/week @ 2024-11-22 101/week @ 2024-11-29

227 downloads per month

Apache-2.0

2MB
32K SLoC

aws-sdk-detective

Detective uses machine learning and purpose-built visualizations to help you to analyze and investigate security issues across your Amazon Web Services (Amazon Web Services) workloads. Detective automatically extracts time-based events such as login attempts, API calls, and network traffic from CloudTrail and Amazon Virtual Private Cloud (Amazon VPC) flow logs. It also extracts findings detected by Amazon GuardDuty.

The Detective API primarily supports the creation and management of behavior graphs. A behavior graph contains the extracted data from a set of member accounts, and is created and managed by an administrator account.

To add a member account to the behavior graph, the administrator account sends an invitation to the account. When the account accepts the invitation, it becomes a member account in the behavior graph.

Detective is also integrated with Organizations. The organization management account designates the Detective administrator account for the organization. That account becomes the administrator account for the organization behavior graph. The Detective administrator account is also the delegated administrator account for Detective in Organizations.

The Detective administrator account can enable any organization account as a member account in the organization behavior graph. The organization accounts do not receive invitations. The Detective administrator account can also invite other accounts to the organization behavior graph.

Every behavior graph is specific to a Region. You can only use the API to manage behavior graphs that belong to the Region that is associated with the currently selected endpoint.

The administrator account for a behavior graph can use the Detective API to do the following:

  • Enable and disable Detective. Enabling Detective creates a new behavior graph.
  • View the list of member accounts in a behavior graph.
  • Add member accounts to a behavior graph.
  • Remove member accounts from a behavior graph.
  • Apply tags to a behavior graph.

The organization management account can use the Detective API to select the delegated administrator for Detective.

The Detective administrator account for an organization can use the Detective API to do the following:

  • Perform all of the functions of an administrator account.
  • Determine whether to automatically enable new organization accounts as member accounts in the organization behavior graph.

An invited member account can use the Detective API to do the following:

  • View the list of behavior graphs that they are invited to.
  • Accept an invitation to contribute to a behavior graph.
  • Decline an invitation to contribute to a behavior graph.
  • Remove their account from a behavior graph.

All API actions are logged as CloudTrail events. See Logging Detective API Calls with CloudTrail.

Getting Started

Examples are available for many services and operations, check out the examples folder in GitHub.

The SDK provides one crate per AWS service. You must add Tokio as a dependency within your Rust project to execute asynchronous code. To add aws-sdk-detective to your project, add the following to your Cargo.toml file:

[dependencies]
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-detective = "1.50.0"
tokio = { version = "1", features = ["full"] }

Then in code, a client can be created with the following:

use aws_sdk_detective as detective;

#[::tokio::main]
async fn main() -> Result<(), detective::Error> {
    let config = aws_config::load_from_env().await;
    let client = aws_sdk_detective::Client::new(&config);

    // ... make some calls with the client

    Ok(())
}

See the client documentation for information on what calls can be made, and the inputs and outputs for each of those calls.

Using the SDK

Until the SDK is released, we will be adding information about using the SDK to the Developer Guide. Feel free to suggest additional sections for the guide by opening an issue and describing what you are trying to do.

Getting Help

License

This project is licensed under the Apache-2.0 License.

Dependencies

~8–20MB
~286K SLoC