
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
aws-get-secret-lambda
Advanced tools
This is a utility much like the awesome gcp-get-secret from Binx.io. You can wrap it around your application that consumes environment variables containing secrets. By calling aws-get-secret -- [your-cli] [--your-args]
it will call your cli command (server, serverless, etc.) and fill any environment variable that starts with the aws:///
format documented below.
Note: use any libary dealing with secrets with great care. Actions you can take to prevent impact:
If you miss functionality, feel free to fork the repository & optionally send Pull Requests to contribute back.
First, set some environment variables that define where to get the secret:
export FIRST_SECRET=aws:///arn:aws:secretsmanager:eu-central-1:1234567:secret:First-ABCDEF
export OTHER_SECRET=aws:///arn:aws:secretsmanager:eu-central-1:1234567:secret:Other-ABCDEF
You can define query parameters on the aws:///
uri just like with binxio/gcp-get-secret:
default
to set a default value if there is no valuetemplate
to pick values from a JSON secret or to wrap the value with other datadestination
and chmod
to write to a file instead of using the environmentThen wrap your executable with this tool:
# quick example:
./aws-get-secret sh -c 'echo Something $SECRET;'
# NodeJS server:
./aws-get-secret node dist/server.js
# Python server server:
./aws-get-secret python3 server.py
Call this tool as a Lambda extension script (wrapperscript) to preload secret manager secrets to environment variables.
To use this wrapper script, create a Layer including the go binary of this repository.
Then include the binary in another layer and invoke it by setting AWS_LAMBDA_EXEC_WRAPPER=/opt/aws-get-secret
on your lambda.
Alternatively, you can use the NodeJS CDK-compatible package which does this for you.
npm i aws-get-secret-lambda
Then wrap your Lambda like this (if you're using CDK):
import { wrapLambdasWithSecrets } from "aws-get-secret-lambda"
export class SomeStack extends Stack {
constructor(scope: Construct) {
super(scope, 'SomeStack');
wrapLambdasWithSecrets(this.getAllFunctions());
}
}
FAQs
Installs a AWS Lambda layer via CDK
The npm package aws-get-secret-lambda receives a total of 1 weekly downloads. As such, aws-get-secret-lambda popularity was classified as not popular.
We found that aws-get-secret-lambda demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.