AWS Transfer Family SSH Key

This page shows how to write Terraform and CloudFormation for AWS Transfer Family SSH Key and write them securely.

aws_transfer_ssh_key (Terraform)

The SSH Key in AWS Transfer Family can be configured in Terraform with the resource name aws_transfer_ssh_key. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

key.tf#L1
resource "aws_transfer_ssh_key" "example" {
  server_id = aws_transfer_server.example.id
  user_name = aws_transfer_user.user1.user_name
  body      = var.ssh_public_key
}

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides a AWS Transfer User SSH Key resource.

AWS::Transfer::User SshPublicKey (CloudFormation)

The User SshPublicKey in Transfer can be configured in CloudFormation with the resource name AWS::Transfer::User SshPublicKey. 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

Explanation in CloudFormation Registry

Provides information about the public Secure Shell (SSH) key that is associated with a user account for the specific file transfer protocol-enabled server (as identified by ServerId). The information returned includes the date the key was imported, the public key contents, and the public key ID. A user can store more than one SSH public key associated with their user name on a specific server.

Frequently asked questions

What is AWS Transfer Family SSH Key?

AWS Transfer Family SSH Key is a resource for Transfer Family of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Transfer Family SSH Key?

For Terraform, the daduskacpokus/aws-sftp-family source code example is useful. See the Terraform Example section for further details.