Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkapuscik2/aws-secrets-demo
https://github.com/jkapuscik2/aws-secrets-demo
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jkapuscik2/aws-secrets-demo
- Owner: jkapuscik2
- Created: 2021-04-18T14:19:26.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-18T14:35:04.000Z (over 3 years ago)
- Last Synced: 2024-11-07T04:43:57.466Z (about 2 months ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sample usage of AWS SSM Parameter Store and Secret Manager
More details can be found [here](https://j-kapuscik2.medium.com/how-to-store-secretes-on-aws-3e2f5881cd5b)
Create Simple System Manager Parameter Store secrets:
```
aws ssm put-parameter --cli-input-json \
'{
"Name": "/SampleApp/uat/db/postgres/password",
"Value": "secret-password",
"Type": "SecureString",
"Tags": [
{
"Key": "env",
"Value": "UAT"
},
{
"Key": "app",
"Value": "SampleApp"
}
]
}'
aws ssm put-parameter --cli-input-json \
'{
"Name": "/SampleApp/uat/db/postgres/endpoint",
"Value": "secret-enpoint.net",
"Type": "SecureString",
"Tags": [
{
"Key": "env",
"Value": "UAT"
},
{
"Key": "app",
"Value": "SampleApp"
}
]
}'
aws ssm get-parameters-by-path --path "/SampleApp/uat/db/postgres" --with-decryption
```Create Secret Manager Secrets
```
aws secretsmanager create-secret \
--name /SampleApp/uat/db/postgres/password \
--secret-string "secret-password" \
--tags Key=env,Value=UAT Key=app,Value=SampleAppaws secretsmanager create-secret \
--name /SampleApp/uat/db/postgres/endpoint \
--secret-string "secret-enpoint.net" \
--tags Key=env,Value=UAT Key=app,Value=SampleApp
aws secretsmanager list-secrets \
--filters Key=name,Values=/SampleApp/uat/db/postgres
```