Skip to content

Helps developers profile secret data with newlines in AWS Secrets Manager. This aims to solve the issue of AWS Secrets Manager UI not being able to properly preserve newlines when adding a large dataset from files with newlines

License

Notifications You must be signed in to change notification settings

megablend/aws_profile_secret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

profile_aws_secret

This script helps provision secret data file on AWS, create new secrets and update existing keys or add new ones using CLI.

Usage

Below are the various functionalities this script provides:

Download secret key details as file

This allows you to modify existing configuration, makes changes to it locally and re-upload using the upload-secret-data command. See command below:

  ./profile.sh download-secret --secret-id <YOUR_AWS_SECRET_ID> --secret-key <THE_KEY_TO_BE_DOWNLOADED_AS_FILE> --ext <THE_DESIRED_FILE_EXTENSION> --profile <YOUR_AWS_PROFILE>

Example:

  ./profile.sh download-secret --secret-id app_secret_id --secret-key some/secrets --ext rb --profile aws_profile

Add/Update file details to a specific AWS secret key

See command below:

  ./profile.sh update-secret-data --secret-id <YOUR_AWS_SECRET_ID> --secret-key <THE_KEY_FOR_FILE_DATA> --data-file <ABSOLUTE_PATH_OF_DATA> --profile <YOUR_AWS_PROFILE>

Example:

  ./profile.sh update-secret-data --secret-id app_secret_id --secret-key some/secrets --data-file /path/to/file --profile aws_profile

Add/Update secret value of a key

See command below:

  ./profile.sh update-secret-value --secret-id <YOUR_AWS_SECRET_ID> --secret-key <THE_KEY_TO_ADD_OR_UPDATE> --secret-value <THE_NEW_VALUE> --profile <YOUR_AWS_PROFILE>

Example:

  ./profile.sh update-secret-value --secret-id app_secret_id --secret-key database_password --secret-value password --profile aws_profile

Provision new secret values for a new service

See command below:

  ./profile.sh new-secret --secret-id <YOUR_AWS_SECRET_ID> --json-file <THE_JSON_FILE_WITH_THE_KEY_VALUE_PAIR> --profile <YOUR_AWS_PROFILE>

Example:

  ./profile.sh new-secret --secret-id app_secret_id --json-file /app/test.json --profile aws_profile

About

Helps developers profile secret data with newlines in AWS Secrets Manager. This aims to solve the issue of AWS Secrets Manager UI not being able to properly preserve newlines when adding a large dataset from files with newlines

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages