CmdID / aws / aws redshift
aws redshift modify-cluster-iam-roles
Modifies the list of Identity and Access Management (IAM) roles that can be used by the cluster to access other Amazon Web Services services. AWS CLI reference
1 example 4 options Its page in the AWS CLI reference
Examples
To modify the IAM role for a cluster
The following modify-cluster-iam-roles example removes the specified AWS IAM role from the specified cluster.
aws redshift modify-cluster-iam-roles --cluster-identifier mycluster --remove-iam-roles arn:aws:iam::123456789012:role/myRedshiftRoleIdentify--cluster-identifierThe unique identifier of the cluster for which you want to associate or disassociate IAM roles.--remove-iam-rolesZero or more IAM roles in ARN format to disassociate from the cluster.Its output, shortened
{
"Cluster": {
"ClusterIdentifier": "mycluster",
"NodeType": "dc2.large",
"ClusterStatus": "available",
"ClusterAvailabilityStatus": "Available",
"MasterUsername": "adminuser",
"DBName": "dev",
"Endpoint": {
"Address": "mycluster.cmeaswqeuae.us-west-2.redshift.amazonaws.com",
"Port": 5439
},
"ClusterCreateTime": "2019-12-05T18:44:36.991Z",
"AutomatedSnapshotRetentionPeriod": 3,
"ManualSnapshotRetentionPeriod": -1,
"ClusterSecurityGroups": [],
"VpcSecurityGroups": [
{
"VpcSecurityGroupId": "sh-f9b731sd",
"Status": "active"
}
],
"ClusterParameterGroups": [
{
"ParameterGroupName": "default.redshift-1.0",
"ParameterApplyStatus": "in-sync"
}
],
"ClusterSubnetGroupName": "default",
"VpcId": "vpc-b2fal7t9",
… 27 more linesFor more information, see Using Identity-Based Policies (IAM Policies) for Amazon Redshift in the Amazon Redshift Cluster Management Guide.
Options
--add-iam-rolesZero or more IAM roles to associate with the cluster.--cluster-identifierThe unique identifier of the cluster for which you want to associate or disassociate IAM roles.--default-iam-role-arnThe Amazon Resource Name (ARN) for the IAM role that was set as default for the cluster when the cluster was last modified.--remove-iam-rolesZero or more IAM roles in ARN format to disassociate from the cluster.