Exo / Create New Iam Role
Create New Iam Role
Create a new IAM role based on a JSON policy document provided via standard input.
$
Terminal cat <path/to/policy.json> | exo iam role create <iam_role_name> --editable --policy - cat <path/to/policy.json> | exo iam role create <iam_role_name> --editable --policy - #!/bin/bash
# Create New Iam Role
cat {{path/to/policy.json}} | exo iam role create {{iam_role_name}} --editable --policy - When To Use
When implementing a new service that requires a custom role with specific permissions as defined in a policy document.
Pro Tip
Validate the JSON policy for syntax errors before executing the command; improperly formatted documents can lead to role creation failures.
Command Builder
Tune the command before you copy it
$
Generated Command cat <path/to/policy.json> | exo iam role create <iam_role_name> --editable --policy - Anatomy of Output
Understanding the result
Troubleshooting
Common pitfalls
Command Breakdown
What each part is doing
-
cat - Base Command
- The executable that performs this operation. Here it runs Exo before the shell applies any redirect operators.
-
<path/to/policy.json> - path to policy.json
- The value supplied for path to policy.json.
-
<iam_role_name> - iam role name
- The value supplied for iam role name.
-
--editable - Command Option
- Tool-specific option used by this command invocation.
-
--policy - Command Option
- Tool-specific option used by this command invocation.
-
- - Command Option
- Tool-specific option used by this command invocation.
Alternative Approaches
Comparable commands in other tools
Alternative cloud infrastructure tools for the same job.
Doctl / Run Doctl Databases Db Command With Token
doctl d db <command> -t <access_token> Doctl / Reset Database User Password doctl databases user reset <database_id> <user_name> Aws / Update Item Aws Dynamodb aws dynamodb update-item --table-name <table_name> --key '{{{"ID": {"N": "1"}}}}' --update-expression "{SET Name = :n}" --expression-attribute-values '{{{":n": {"S": "Jane"}}}}' Cloud Init / Query Instance Metadata cloud-init query <dot_delimited_variable_path> Doctl / Reset Mysql Auth Plugin doctl databases user reset <database_id> <user_name> <caching_sha2_password|mysql_native_password>