How to use config values stored in AWS
Introduction
This tutorial will provide a walkthrough on setting up and using configuration values located in AWS for configuration in your Gremlin agent installation.
Prerequisites
Before you begin this tutorial, you'll need the following:
- An active AWS account
- A Gremlin account (sign up for a free trial)
- A Gremlin agent installation
- AWS credentials setup on the host running the Gremlin agent
Step 1a - Create config value in AWS SSM
To create a parameter in AWS SSM:
- Navigate to the SSM console (us-west-2 example).
- Navigate to 'Parameter Store' on the left side and click 'Create parameter'.
- Create a name for your parameter, and set the type to be either 'String' or 'SecureString', then enter your config value in the value field. When satisifed with the settings, create the parameter.
Step 1b - Create config value in AWS Secrets Manager
To create a secret in AWS Secrets Manager:
Step 2 - Setup permissions for credentials
Whatever credentials you will have the Gremlin agent use will need the corresponding IAM permissions associated with them.
- For SSM parameters, the <span class="code-class-custom">ssm:GetParameter</span> action on the parameter resource is required.
- For Secrets Manager secrets, the <span class="code-class-custom">secretsmanager:GetSecretValue</span> action on the secret resource is required.
- If any of these values are encrypted with a KMS key, the <span class="code-class-custom">kms:Decrypt</span> action is required on the KMS key resource.
Step 3 - Set Gremlin config values to use ARN
Now in your gremlin configuration, you can set some of the configuration values to use the AWS ARN of the AWS resource you created. When the agent starts, it will reach out to AWS to retrieve the value stored there, and keeps it in memory. Here is an example configuration file with AWS ARNs used to store sensitive values:
Note: When using the Gremlin Helm Chart, you can pass these values like you would with raw secret values (requires chart version 0.12.0 or later):
Conclusion
You've setup your Gremlin agent to use remote configuration values, increasing the security of your configuration! Refer to the agent configuration to read all the supported values you can use an AWS ARN for.
Avoid downtime. Use Gremlin to turn failure into resilience.
Gremlin empowers you to proactively root out failure before it causes downtime. See how you can harness chaos to build resilient systems by requesting a demo of Gremlin.