exo Verified current stable Not installed? Cloud Infrastructure

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 -

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

Back to syntax
$
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.