AWS DataSync Agent
This page shows how to write Terraform and CloudFormation for DataSync Agent and write them securely.
aws_datasync_agent (Terraform)
The Agent in DataSync can be configured in Terraform with the resource name aws_datasync_agent
. The following sections describe 2 examples of how to use the resource and its parameters.
Example Usage from GitHub
resource "aws_datasync_agent" "datasyncagent" {
ip_address = aws_instance.datasync_agent.public_ip
name = var.data_sync_agent_name
resource "aws_datasync_agent" "this" {
activation_key = var.activation_key
ip_address = var.ip_address
name = var.name
tags = var.tags
Parameters
-
activation_key
optional computed - string -
arn
optional computed - string -
id
optional computed - string -
ip_address
optional computed - string -
name
optional - string -
tags
optional - map from string to string -
timeouts
single block-
create
optional - string
-
Explanation in Terraform Registry
Manages an AWS DataSync Agent deployed on premises.
NOTE: One of
activation_key
orip_address
must be provided for resource creation (agent activation). Neither is required for resource import. If usingip_address
, Terraform must be able to make an HTTP (port 80) GET request to the specified IP address from where it is running. The agent will turn off that HTTP server after activation.
AWS::DataSync::Agent (CloudFormation)
The Agent in DataSync can be configured in CloudFormation with the resource name AWS::DataSync::Agent
. The following sections describe how to use the resource and its parameters.
Example Usage from GitHub
An example could not be found in GitHub.
Parameters
-
AgentName
optional - String -
ActivationKey
required - String -
SecurityGroupArns
optional - List -
SubnetArns
optional - List -
VpcEndpointId
optional - String -
Tags
optional - List of Tag
Explanation in CloudFormation Registry
The
AWS::DataSync::Agent
resource specifies an AWS DataSync agent to be deployed and activated on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3, Amazon EFS, or Amazon FSx for Windows) reside. Your tasks are created in this AWS Region.You can activate the agent in a VPC (virtual private cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public internet.
You can specify an agent to be used for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run. For more information, see Activating an Agent in the AWS DataSync User Guide.
Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.
Frequently asked questions
What is AWS DataSync Agent?
AWS DataSync Agent is a resource for DataSync of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.
Where can I find the example code for the AWS DataSync Agent?
For Terraform, the shaikis/terraform-aws-datasync and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.