Back to Aws Doc Sdk Examples

Amazon Inspector Specification

scenarios/basics/inspector/SPECIFICATION.md

latest6.6 KB
Original Source

Amazon Inspector Specification

This SDK Basics scenario demonstrates how to interact with Amazon Inspector, a basics scenario that showcases AWS services and SDKs. It is primarily intended for the AWS code examples team to use while developing this example in additional languages.

Resources

This Basics scenario does not require any additional AWS resources.

Relevant documentation

API Actions Used

Hello Amazon Inspector

The Hello example is designed for users who are new to Amazon Inspector. It demonstrates how to set up the Inspector service client and retrieve a list of all member accounts associated with the current Inspector administrator account.

Scenario

This scenario demonstrates the basic usage of Amazon Inspector using a Java program. It focuses on checking account status, enabling Inspector, listing findings, reviewing coverage, and managing filters.


Setup

  • Check Amazon Inspector account status
  • Enable Inspector for available resource types (if not already enabled)
  • Display account status summary

Coverage Assessment

  • List coverage details for scanned resources
  • Display overall coverage statistics
  • Review scan status for resources (general overview)

Findings Management

  • List security findings across all resource types
  • Create an example filter to suppress low-severity findings
  • List existing filters

Usage and Costs

  • Check usage totals and metrics for Inspector
  • Review coverage statistics

Cleanup

  • Delete the filter
  • Diable inspector

Outcome

By following this scenario, users learn how to:

  • Check Inspector account status and configuration
  • Enable Inspector for different resource types
  • List and analyze security findings
  • Monitor scan coverage
  • Create and manage filters
  • Track usage and coverage statistics
  • Cleanup the resources

Errors

The table below describes the exceptions handled in the program for each action.

ActionExceptionHandling
EnableValidationExceptionPrints a message indicating Inspector may already be enabled.
DisableValidationExceptionPrints a message indicating Inspector may already be disabled.
listUsageTotalsValidationExceptionValidation error listing usage totals.
BatchGetAccountStatusAccessDeniedExceptionPrints AWS service error details and rethrows the exception.
ListFindingsValidationExceptionPrints validation error details.
ListCoverageValidationExceptionPrints validation error details.
ListCoverageStatisticsValidationExceptionPrints validation error details.
createFilterValidationExceptionPrints validation error details.
ListFiltersValidationExceptionPrints AWS service error details and rethrows the exception.
deleteFilterResourceNotFoundExceptionPrints AWS service error details and rethrows the exception.
batchGetFindingDetailsResourceNotFoundExceptionPrints AWS service error details and rethrows the exception.

Metadata

Action / ScenarioMetadata FileMetadata Key
Enableinspector_metadata.yamlinspector_Enable
Disableinspector_metadata.yamlinspector_Disable
BatchGetAccountStatusinspector_metadata.yamlinspector_GetAccountStatus
ListFindingsinspector_metadata.yamlinspector_ListFindings
ListCoverageinspector_metadata.yamlinspector_ListCoverage
ListCoverageStatisticsinspector_metadata.yamlinspector_ListCoverageStatistics
ListUsageTotalsinspector_metadata.yamlinspector_ListUsageTotals
CreateFilterinspector_metadata.yamlinspector_CreateFilter
ListFiltersinspector_metadata.yamlinspector_ListFilters
DeleteFilterinspector_metadata.yamlinspector_DeleteFilter
BatchGetFindingDetailsinspector_metadata.yamlinspector_BatchGetFindingDetails
Amazon Inspector Helloinspector_metadata.yamlinspector_Hello
Amazon Inspector Basics Scenarioinspector_metadata.yamlinspector_Scenario