AWS::OpsWorks::UserProfile
The AWS::OpsWorks::UserProfile resource configures SSH access for users who
require access to instances in an AWS OpsWorks stack.
Topics
Syntax
JSON
{ "Type" : "AWS::OpsWorks::UserProfile", "Properties" : { "AllowSelfManagement" :Boolean, "IamUserArn" :String, "SshPublicKey" :String, "SshUsername" :String} }
YAML
Type: "AWS::OpsWorks::UserProfile" Properties: AllowSelfManagement:BooleanIamUserArn:StringSshPublicKey:StringSshUsername:String
Properties
AllowSelfManagement-
Indicates whether users can use the AWS OpsWorks My Settings page to specify their own SSH public key. For more information, see Setting an IAM User's Public SSH Key in the AWS OpsWorks User Guide.
Required: No
Type: Boolean
Update requires: No interruption
IamUserArn-
The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) user to associate with this configuration.
Required: Yes
Type: String
Update requires: Replacement
SshPublicKey-
The public SSH key that is associated with the IAM user. To access instances, the IAM user must have or be given the corresponding private key.
Required: No
Type: String
Update requires: No interruption
SshUsername-
The user's SSH user name.
Required: No
Type: String
Update requires: No interruption
Return Value
Ref
When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the IAM user ARN, such as arn:aws:iam::123456789012:user/opsworksuser.
For more information about using the Ref function, see Ref.
Fn::GetAtt
Fn::GetAtt returns a value for a specified attribute of this type.
The following are the available attributes and sample return values.
-
SshUsernameThe user's SSH user name, as a string.
For more information about using Fn::GetAtt, see Fn::GetAtt.
Example
The following example registers a public key to the testUser IAM user.
The user can also use self-management to specify his or her own public key.
JSON
"userProfile": { "Type": "AWS::OpsWorks::UserProfile", "Properties": { "IamUserArn": { "Fn::GetAtt": ["testUser", "Arn"] }, "AllowSelfManagement": "true", "SshPublicKey": "xyz1234567890" } }
YAML
userProfile: Type: AWS::OpsWorks::UserProfile Properties: IamUserArn: !GetAtt [testUser, Arn] AllowSelfManagement: 'true' SshPublicKey: xyz1234567890
