Skip to main content

aws_athena_work_groups Resource

Use the aws_athena_work_groups InSpec audit resource to test properties of multiple Amazon Athena workgroups.

For additional information, including details on parameters and properties, see the AWS Athena workgroup documentation.

Install

This resource is available in the Chef InSpec AWS resource pack.

For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.

Syntax

describe aws_athena_work_groups do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

names
The workgroup name.
states
The state of the workgroup. Valid values are: ENABLED or DISABLED.
descriptions
The workgroup description.
creation_times
The workgroup creation time. Format: YYYY-MM-DD HH:MM:SS ZZZZ.

Examples

Ensure a work_group name is available.

describe aws_athena_work_groups do
  its('names') { should include 'WORK_GROUP_NAME' }
end

Ensure that the state is ENABLED or DISABLED.

describe aws_athena_work_groups do
    its('states') { should include 'ENABLED' }
end

Matchers

For a full list of available matchers, see our Universal Matchers page.

The controls will pass if the describe method returns at least one result.

exist

Use should to test that the entity exists.

describe aws_athena_work_groups do
  it { should exist }
end

Use should_not to test that an entity does not exist.

describe aws_athena_work_groups do
  it { should_not exist }
end

be_available

Use should to check if the work_group name is available.

describe aws_athena_work_groups do
  it { should be_available }
end

AWS Permissions

Your Principal will need the Athena:Client:ListWorkGroupsOutput action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×










Search Results