Giter VIP home page Giter VIP logo

stackstorm-aws's Introduction

AWS Integration Pack

The StackStorm AWS integration pack supplies action integration for EC2 and Route53.

Configuration

You will need to add a set of AWS credentials, and default zone to the config.yaml file:

---
setup:
  region: ""
  aws_access_key_id: ""
  aws_secret_access_key: ""
interval: 20
st2_user_data: ""

You can generate the access key and secret access key by following these directions:

http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingCredentials.html#Using_CreateAccessKey

If you would like to use the IAM role assigned to the instance stackstorm is running set the key and secret to null and set the region.

---
setup:
  region: "us-east-1"
  aws_access_key_id: null
  aws_secret_access_key: null
interval: 20
st2_user_data: ""
  • service_notifications_sensor.host - Listen host for the HTTP interface.
  • service_notifications_sensor.port - Listen path for the HTTP interface.
  • service_notifications_sensor.path - Path where the events need to be sent.

st2_user_data

Optionally, you can set the user_data to set a default file to be used during new instance creation. Put your user_data file somewhere accessible by the StackStorm user, and use the st2_user_data config option to set it.

st2_user_data: "/full/path/to/file"

This file/script will be used for all invocations of the ec2_run_instances action

Sensors

ServiceNotificationsSensor

This sensor exposes a HTTP interface and listens for service event notifications which are delivered via AWS SNS service using HTTP(s) endpoint.

Currently it supports event notifications generated by the S3 service - http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html

Keep in mind that this sensor doesn't implement any kind of authentication. This means that if the sensor is not behind a proxy which implements authentication and is accessible to the outside world, you need to configure path setting to include a random secret which is only known to the AWS SNS service.

aws.service_notification

This trigger is emitted for every service event notification.

Example trigger payload:

{
    "source": "aws:s3",
    "region": "us-west-2",
    "name": "ObjectCreated:Put",
    "timestamp": 123456789,
    "response_elements": {
        "x-amz-id-2": "blahid//4U+rk=",
        "x-amz-request-id": "5FF5BB6EDE3631F8"
    },
    "request_parameters": {
        "sourceIPAddress": "127.0.0.1"
    },
    "payload": {
        "configurationId": "snsnotificationforput",
        "object": {
            "eTag": "5dfd7f29bce6d94dc5c73553f269659b",
            "key": "myfile.tar.gz",
            "size": 178428
        },
        "bucket": {
            "ownerIdentity": {
                "principalId": "BLAHBLAH"
            },
            "name": "testbucket33333",
            "arn": "arn:aws:s3:::testbucket33333"
        },
        "s3SchemaVersion": "1.0"
    }
}

source, region, name and timestamp attributes are included with all the events, but the format and values inside the payload attribute different across different services and event types.

For a list of supported S3 event types see http://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#supported-notification-event-types

AWS SQS sensor

This is generic SQS Sensor using boto3 api to fetch messages from SQS queue. After receiving a message it's content is passed as payload to a trigger 'aws.sqs_new_message'

This sensor can be configured either by using config.yaml within a pack or by creating following values in datastore:

  • aws.input_queues (list queues as comma separated string: first_queue,second_queue)
  • aws.aws_access_key_id
  • aws.aws_secret_access_key
  • aws.region
  • aws.max_number_of_messages (must be between 1 - 10)

For configuration in config.yaml with config like this

    setup:
      aws_access_key_id:
      aws_access_key_id:
      region:
    sqs_sensor:
      input_queues:
        - first_queue
        - second_queue
    sqs_other:
      max_mumber_of_messages: 1

If any value exist in datastore it will be taken instead of any value in config.yaml

aws.sqs_new_message

This trigger is emitted when a single message is received from a queue.

{
  "queue": "first_sqs_queue",
  "body": "example message body"
}

Actions

Route53 Actions

  • r53_build_base_http_request
  • r53_change_rrsets
  • r53_close
  • r53_create_health_check
  • r53_create_hosted_zone
  • r53_create_zone
  • r53_delete_health_check
  • r53_delete_hosted_zone
  • r53_get_all_hosted_zones
  • r53_get_all_rrsets
  • r53_get_change
  • r53_get_hosted_zone
  • r53_get_hosted_zone_by_name
  • r53_get_http_connection
  • r53_get_list_health_checks
  • r53_get_path
  • r53_get_proxy_auth_header
  • r53_get_proxy_url_with_auth
  • r53_get_zone
  • r53_get_zones
  • r53_handle_proxy
  • r53_make_request
  • r53_new_http_connection
  • r53_prefix_proxy_to_path
  • r53_proxy_ssl
  • r53_put_http_connection
  • r53_server_name
  • r53_set_host_header
  • r53_set_request_hook
  • r53_skip_proxy
  • r53_zone_add_a
  • r53_zone_add_cname
  • r53_zone_add_mx
  • r53_zone_add_record
  • r53_zone_delete
  • r53_zone_delete_a
  • r53_zone_delete_cname
  • r53_zone_delete_mx
  • r53_zone_delete_record
  • r53_zone_find_records
  • r53_zone_get_a
  • r53_zone_get_cname
  • r53_zone_get_mx
  • r53_zone_get_nameservers
  • r53_zone_get_records
  • r53_zone_update_a
  • r53_zone_update_cname
  • r53_zone_update_mx
  • r53_zone_update_record

EC2 Actions

  • ec2_allocate_address
  • ec2_assign_private_ip_addresses
  • ec2_associate_address
  • ec2_associate_address_object
  • ec2_attach_network_interface
  • ec2_attach_volume
  • ec2_authorize_security_group
  • ec2_authorize_security_group_deprecated
  • ec2_authorize_security_group_egress
  • ec2_build_base_http_request
  • ec2_build_complex_list_params
  • ec2_build_configurations_param_list
  • ec2_build_filter_params
  • ec2_build_list_params
  • ec2_build_tag_param_list
  • ec2_bundle_instance
  • ec2_cancel_bundle_task
  • ec2_cancel_reserved_instances_listing
  • ec2_cancel_spot_instance_requests
  • ec2_close
  • ec2_confirm_product_instance
  • ec2_copy_image
  • ec2_copy_snapshot
  • ec2_create_image
  • ec2_create_key_pair
  • ec2_create_network_interface
  • ec2_create_placement_group
  • ec2_create_reserved_instances_listing
  • ec2_create_security_group
  • ec2_create_snapshot
  • ec2_create_spot_datafeed_subscription
  • ec2_create_tags
  • ec2_create_volume
  • ec2_delete_key_pair
  • ec2_delete_network_interface
  • ec2_delete_placement_group
  • ec2_delete_security_group
  • ec2_delete_snapshot
  • ec2_delete_spot_datafeed_subscription
  • ec2_delete_tags
  • ec2_delete_volume
  • ec2_deregister_image
  • ec2_describe_account_attributes
  • ec2_describe_reserved_instances_modifications
  • ec2_describe_vpc_attribute
  • ec2_detach_network_interface
  • ec2_detach_volume
  • ec2_disassociate_address
  • ec2_enable_volume_io
  • ec2_get_all_addresses
  • ec2_get_all_bundle_tasks
  • ec2_get_all_images
  • ec2_get_all_instance_status
  • ec2_get_all_instance_types
  • ec2_get_all_instances
  • ec2_get_all_kernels
  • ec2_get_all_key_pairs
  • ec2_get_all_network_interfaces
  • ec2_get_all_placement_groups
  • ec2_get_all_ramdisks
  • ec2_get_all_regions
  • ec2_get_all_reservations
  • ec2_get_all_reserved_instances
  • ec2_get_all_reserved_instances_offerings
  • ec2_get_all_security_groups
  • ec2_get_all_snapshots
  • ec2_get_all_spot_instance_requests
  • ec2_get_all_tags
  • ec2_get_all_volume_status
  • ec2_get_all_volumes
  • ec2_get_all_zones
  • ec2_get_console_output
  • ec2_get_http_connection
  • ec2_get_image
  • ec2_get_image_attribute
  • ec2_get_instance_attribute
  • ec2_get_key_pair
  • ec2_get_list
  • ec2_get_object
  • ec2_get_only_instances
  • ec2_get_params
  • ec2_get_password_data
  • ec2_get_path
  • ec2_get_proxy_auth_header
  • ec2_get_proxy_url_with_auth
  • ec2_get_snapshot_attribute
  • ec2_get_spot_datafeed_subscription
  • ec2_get_spot_price_history
  • ec2_get_status
  • ec2_get_utf8_value
  • ec2_get_volume_attribute
  • ec2_handle_proxy
  • ec2_import_key_pair
  • ec2_make_request
  • ec2_modify_image_attribute
  • ec2_modify_instance_attribute
  • ec2_modify_network_interface_attribute
  • ec2_modify_reserved_instances
  • ec2_modify_snapshot_attribute
  • ec2_modify_volume_attribute
  • ec2_modify_vpc_attribute
  • ec2_monitor_instance
  • ec2_monitor_instances
  • ec2_new_http_connection
  • ec2_prefix_proxy_to_path
  • ec2_proxy_ssl
  • ec2_purchase_reserved_instance_offering
  • ec2_put_http_connection
  • ec2_reboot_instances
  • ec2_register_image
  • ec2_release_address
  • ec2_request_spot_instances
  • ec2_reset_image_attribute
  • ec2_reset_instance_attribute
  • ec2_reset_snapshot_attribute
  • ec2_revoke_security_group
  • ec2_revoke_security_group_deprecated
  • ec2_revoke_security_group_egress
  • ec2_run_instances
  • ec2_server_name
  • ec2_set_host_header
  • ec2_set_request_hook
  • ec2_skip_proxy
  • ec2_start_instances
  • ec2_stop_instances
  • ec2_terminate_instances
  • ec2_trim_snapshots
  • ec2_unassign_private_ip_addresses
  • ec2_unmonitor_instance
  • ec2_unmonitor_instances
  • ec2_wait_for_state

SQS Actions

  • sqs_add_permission.yaml
  • sqs_build_base_http_request.yaml
  • sqs_build_complex_list_params.yaml
  • sqs_build_list_params.yaml
  • sqs_change_message_visibility.yaml
  • sqs_change_message_visibility_batch.yaml
  • sqs_close.yaml
  • sqs_create_queue.yaml
  • sqs_delete_message.yaml
  • sqs_delete_message_batch.yaml
  • sqs_delete_message_from_handle.yaml
  • sqs_delete_queue.yaml
  • sqs_get_all_queues.yaml
  • sqs_get_dead_letter_source_queues.yaml
  • sqs_get_http_connection.yaml
  • sqs_get_list.yaml
  • sqs_get_object.yaml
  • sqs_get_path.yaml
  • sqs_get_proxy_auth_header.yaml
  • sqs_get_proxy_url_with_auth.yaml
  • sqs_get_queue.yaml
  • sqs_get_queue_attributes.yaml
  • sqs_get_status.yaml
  • sqs_get_utf8_value.yaml
  • sqs_handle_proxy.yaml
  • sqs_lookup.yaml
  • sqs_make_request.yaml
  • sqs_new_http_connection.yaml
  • sqs_prefix_proxy_to_path.yaml
  • sqs_proxy_ssl.yaml
  • sqs_purge_queue.yaml
  • sqs_put_http_connection.yaml
  • sqs_receive_message.yaml
  • sqs_remove_permission.yaml
  • sqs_send_message.yaml
  • sqs_send_message_batch.yaml
  • sqs_server_name.yaml
  • sqs_set_host_header.yaml
  • sqs_set_queue_attribute.yaml
  • sqs_set_request_hook.yaml
  • sqs_skip_proxy.yaml

stackstorm-aws's People

Contributors

kami avatar andymoore avatar userlocalhost avatar emedvedev avatar erikthoreson avatar tonybaloney avatar m4dcoder avatar dhgwilliam avatar manasdk avatar

Watchers

James Cloos avatar Ryan Ritz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.