Managing Amazon ECS account settings using the Amazon CLI
You can manage your account settings using the Amazon ECS API, Amazon CLI or SDKs. The
dualStackIPv6
, fargateFIPSMode
and the
fargateTaskRetirementWaitPeriod
account settings can only be viewed or
changed using those tools.
For information about the available API actions for task definitions see Account setting actions in the Amazon Elastic Container Service API Reference.
Use one of the following commands to modify the default account setting for all users or roles on your account. These changes apply to the entire Amazon account unless a user or role explicitly overrides these settings for themselves.
-
put-account-setting-default (Amazon CLI)
aws ecs put-account-setting-default --name
serviceLongArnFormat
--valueenabled
--regionus-east-2
You can also use this command to modify other account settings. To do this, replace the
name
parameter with the corresponding account setting. -
Write-ECSAccountSetting (Amazon Tools for Windows PowerShell)
Write-ECSAccountSettingDefault -Name
serviceLongArnFormat
-Valueenabled
-Regionus-east-1
-Force
To modify the account settings for your user account (Amazon CLI)
Use one of the following commands to modify the account settings for your user. If you’re using these commands as the root user, changes apply to the entire Amazon account unless a; user or role explicitly overrides these settings for themselves.
-
put-account-setting (Amazon CLI)
aws ecs put-account-setting --name
serviceLongArnFormat
--valueenabled
--regionus-east-1
You can also use this command to modify other account settings. To do this, replace the
name
parameter with the corresponding account setting. -
Write-ECSAccountSetting (Amazon Tools for Windows PowerShell)
Write-ECSAccountSetting -Name
serviceLongArnFormat
-Valueenabled
-Force
To modify the account settings for a specific user or role (Amazon CLI)
Use one of the following commands and specify the ARN of a user, role, or root user in the request to modify the account settings for a specific user or role.
-
put-account-setting (Amazon CLI)
aws ecs put-account-setting --name
serviceLongArnFormat
--valueenabled
--principal-arn arn:aws:iam::aws_account_id
:user/principalName
--regionus-east-1
You can also use this command to modify other account settings. To do this, replace the
name
parameter with the corresponding account setting. -
Write-ECSAccountSetting (Amazon Tools for Windows PowerShell)
Write-ECSAccountSetting -Name
serviceLongArnFormat
-Valueenabled
-PrincipalArn arn:aws:iam::aws_account_id
:user/principalName
-Regionus-east-1
-Force