aws-parameter-store

Amazon ECS - Permission denied when using IAM role on Docker entrypoint

人走茶凉 提交于 2021-02-08 05:31:18
问题 I'm looking for a way to inject secrets/certificates into Amazon ECS containers. In my case, it's a simple nginx container. I've been following this post, using AWS Parameter Store: https://aws.amazon.com/blogs/compute/managing-secrets-for-amazon-ecs-applications-using-parameter-store-and-iam-roles-for-tasks/ Here's the basic gist: On my Dockerfile, I attach a script on entrypoint which installs the AWS client and fetches the keys from AWS parameter store. Dockerfile FROM nginx:1.16.0 ...

How to access the aws parameter store from a lambda using node.js and aws-sdk

余生颓废 提交于 2021-01-21 08:36:32
问题 I've created a lambda and cloud formation template which grants a lambda access to the parameter store and secrets manager. When I test the lambda I have the following functions outside of the export.handler function: function getParameterFromStore(param){ let promise = new Promise(function(resolve, reject){ console.log('++ ' + param.Path); servmgr.getParametersByPath(param, function(err, data){ if(err){ reject(console.log('Error getting parameter: ' + err, err.stack)); } else { resolve(data)

How to access the aws parameter store from a lambda using node.js and aws-sdk

半城伤御伤魂 提交于 2021-01-21 08:36:29
问题 I've created a lambda and cloud formation template which grants a lambda access to the parameter store and secrets manager. When I test the lambda I have the following functions outside of the export.handler function: function getParameterFromStore(param){ let promise = new Promise(function(resolve, reject){ console.log('++ ' + param.Path); servmgr.getParametersByPath(param, function(err, data){ if(err){ reject(console.log('Error getting parameter: ' + err, err.stack)); } else { resolve(data)

Saving a url to AWS parameter store with aws-cli

六眼飞鱼酱① 提交于 2020-08-27 06:01:33
问题 Alright, so I'm trying to programmatically store my Serverless generated API endpoint in parameter store for another project to ingest. Just for an example, I'm going to try to store google.com. aws ssm put-parameter --name /dev/someStore --value https://google.com --type String This fails, understandably so. Error parsing parameter '--value': Unable to retrieve https://google.com: received non 200 status code of 301 However, if I wrap the URL in quotes... aws ssm put-parameter --name /dev

How to export parameters from aws parameter store and import into another account

拟墨画扇 提交于 2020-05-29 03:59:46
问题 on my first aws account I have parameters specified in the following manner: /config/a => value1 /config/b => value2 /config/c/a => value31 /config/c/b => value32 I want to move these to my second aws account. I created these parameters in the parameter store manually. How could I easily copy these values from one account to the other? Using aws ssm get-parameters --names "<param-name>" would be a bit too difficult, since I have way too many parameters. 回答1: May be get-parameters-by-path

NestJs TypeORM configuration using AWS Parameter Store

无人久伴 提交于 2019-12-24 07:45:25
问题 new to NestJS and have come across an issue. For our deployments we need to get our configuration from AWS Parameter Store (Systems Manager), including the database connection string. I have a ConfigModule and ConfigService which retrieves all the parameter store entries for my environment based on the param store path: Here is my config service: import * as dotenv from 'dotenv'; import * as fs from 'fs'; import * as AWS from 'aws-sdk'; export class ConfigService { private readonly envConfig: