Get temporary OpenSearch credentials ΒΆ
Use the nais-cli to get temporary credentials for an OpenSearch instance. This is useful for debugging, accessing the dashboard, or connecting from outside Nais.
shell
nais opensearch credentials <instance> \
--team <team> \
--environment <environment> \
--permission <access-level> \
--ttl <duration>where
-
<instance>is the name of the OpenSearch instance. A list of your team's instances can be found in Nais Console. -
<team>is the name of the team that owns the instance. -
<environment>is the environment where the instance runs (e.g.dev,prod). -
<duration>is how long the credentials should be valid (e.g.1d,7d, max30d).
The credentials are returned directly to stdout as environment variables. They expire automatically when the TTL runs out.