[go: up one dir, main page]
More Web Proxy on the site http://driver.im/Skip to main content

aws_sns_subscriptions Resource

Use the aws_sns_subscriptions InSpec audit resource to test properties of an AWS Simple Notification Service (SNS) subscription VPN route.

The AWS::SNS::Subscription resource subscribes an endpoint to an Amazon SNS topic. For a subscription to be created, the owner of the endpoint must confirm the subscription.

For additional information, including details on parameters and properties, see the AWS documentation on AWS SNS subscriptions..

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

Ensure that the subscription exists.

describe aws_sns_subscriptions do
  it { should exist }
end

Parameters

This resource does not require any parameters.

Properties

subscription_arns
The subscription’s ARN.

Field: subscription_arn

owners
The subscription’s owner.

Field: owner

protocols
The subscription’s protocol.

Field: protocol

endpoints
The subscription’s endpoint (format depends on the protocol).

Field: endpoint

topic_arns
The ARN of the subscription’s topic.

Field: topic_arn

Examples

Ensure a subscription ARN is available.

describe aws_sns_subscriptions do
  its('subscription_arns') { should include 'SUBSCRIPTION_ARN' }
end

Ensure a topic ARN is available.

describe aws_sns_subscriptions do
    its('topic_arns') { should include 'TOPIC_ARN' }
end

Matchers

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

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

exist

Use should to test that the entity exists.

describe aws_sns_subscriptions do
  it { should exist }
end

Use should_not to test the entity does not exist.

describe aws_sns_subscriptions do
  it { should_not exist }
end

be_available

Use should to check if the entity is available.

describe aws_sns_subscriptions do
  it { should be_available }
end

AWS Permissions

Your Principal will need the SNS:Client:ListSubscriptionsResponse action with Effect set to Allow.

Edit this page on GitHub

Thank you for your feedback!

×