Managing secrets in AWS is not an everyday task that allows me to naturally remember the specifics when I need them, especially the `--name` and `--secret-id` CLI inconsistency. I found I was lacking some simple notes that would prevent me from having to search the web in the future, here they are.
## CLI
### Creating secrets
From a simple string:
``` shell
aws --profile common secretsmanager create-secret \
--name test-string \
--secret-string 'test'
```
From a text file:
``` shell
aws --profile common secretsmanager create-secret \
Using the datasource differs if it contains a `secret_string` or a `secret_binary`. In most cases you will know your secret data therefore know which one to use. If for some reason you do not, this might be one of the rare legitimate use cases for the [try function](https://developer.hashicorp.com/terraform/language/functions/try):