synthetics function

Synthetics

Synthetics

Amazon CloudWatch Synthetics

You can use Amazon CloudWatch Synthetics to continually monitor your services. You can create and manage canaries, which are modular, lightweight scripts that monitor your endpoints and APIs from the outside-in. You can set up your canaries to run 24 hours a day, once per minute. The canaries help you check the availability and latency of your web services and troubleshoot anomalies by investigating load time data, screenshots of the UI, logs, and metrics. The canaries seamlessly integrate with CloudWatch ServiceLens to help you trace the causes of impacted nodes in your applications. For more information, see Using ServiceLens to Monitor the Health of Your Applications

in the Amazon CloudWatch User Guide.

Before you create and manage canaries, be aware of the security considerations. For more information, see Security Considerations for Synthetics Canaries.

synthetics( config = list(), credentials = list(), endpoint = NULL, region = NULL )

Arguments

  • config: Optional configuration of credentials, endpoint, and/or region.

    • credentials :

      • creds :

        • access_key_id : AWS access key ID
        • secret_access_key : AWS secret access key
        • session_token : AWS temporary session token
      • profile : The name of a profile to use. If not given, then the default profile is used.

      • anonymous : Set anonymous credentials.

    • endpoint : The complete URL to use for the constructed client.

    • region : The AWS Region used in instantiating the client.

    • close_connection : Immediately close all HTTP connections.

    • timeout : The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

    • s3_force_path_style : Set this to true to force the request to use path-style addressing, i.e. http://s3.amazonaws.com/BUCKET/KEY.

    • sts_regional_endpoint : Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

  • credentials: Optional credentials shorthand for the config parameter

    • creds :

      • access_key_id : AWS access key ID
      • secret_access_key : AWS secret access key
      • session_token : AWS temporary session token
    • profile : The name of a profile to use. If not given, then the default profile is used.

    • anonymous : Set anonymous credentials.

  • endpoint: Optional shorthand for complete URL to use for the constructed client.

  • region: Optional shorthand for AWS Region used in instantiating the client.

Returns

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- synthetics(
  config = list(
    credentials = list(
 creds = list(
   access_key_id = "string",
   secret_access_key = "string",
   session_token = "string"
 ),
 profile = "string",
 anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
 access_key_id = "string",
 secret_access_key = "string",
 session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

associate_resourceAssociates a canary with a group
create_canaryCreates a canary
create_groupCreates a group which you can use to associate canaries with each other, including cross-Region canaries
delete_canaryPermanently deletes the specified canary
delete_groupDeletes a group
describe_canariesThis operation returns a list of the canaries in your account, along with full details about each canary
describe_canaries_last_runUse this operation to see information from the most recent run of each canary that you have created
describe_runtime_versionsReturns a list of Synthetics canary runtime versions
disassociate_resourceRemoves a canary from a group
get_canaryRetrieves complete information about one canary
get_canary_runsRetrieves a list of runs for a specified canary
get_groupReturns information about one group
list_associated_groupsReturns a list of the groups that the specified canary is associated with
list_group_resourcesThis operation returns a list of the ARNs of the canaries that are associated with the specified group
list_groupsReturns a list of all groups in the account, displaying their names, unique IDs, and ARNs
list_tags_for_resourceDisplays the tags associated with a canary or group
start_canaryUse this operation to run a canary that has already been created
stop_canaryStops the canary to prevent all future runs
tag_resourceAssigns one or more tags (key-value pairs) to the specified canary or group
untag_resourceRemoves one or more tags from the specified resource
update_canaryUpdates the configuration of a canary that has already been created

Examples

## Not run: svc <- synthetics() svc$associate_resource( Foo = 123 ) ## End(Not run)
  • Maintainer: Dyfan Jones
  • License: Apache License (>= 2.0)
  • Last published: 2025-03-17