https://github.com/alexandredavi/openssl-lambda-layer
A layer for AWS Lambda that allows your functions to use OpenSSL binaries
https://github.com/alexandredavi/openssl-lambda-layer
Last synced: about 1 month ago
JSON representation
A layer for AWS Lambda that allows your functions to use OpenSSL binaries
- Host: GitHub
- URL: https://github.com/alexandredavi/openssl-lambda-layer
- Owner: alexandredavi
- License: mit
- Created: 2020-01-09T13:36:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-26T18:43:34.000Z (about 1 year ago)
- Last Synced: 2024-11-02T06:34:13.964Z (6 months ago)
- Language: Shell
- Homepage:
- Size: 47.9 KB
- Stars: 49
- Watchers: 4
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
- awesome-layers - `alexandredavi/openssl-lambda-layer` - lambda](https://api.globadge.com/v1/badgen/aws/lambda/layer/latest-version/us-east-1/034541671702/openssl-lambda) | (Layers / Utilities)
README
# OpenSSL binaries for AWS Lambda
A [layer](https://aws.amazon.com/about-aws/whats-new/2018/11/aws-lambda-now-supports-custom-runtimes-and-layers/)
for AWS Lambda that allows your functions to use `openssl` binaries.## Getting Started
You can add this layer to any Lambda function you want.
`PATH` already includes `/opt/bin` in Lambda, which is where it will be mounted.Click on Layers and choose "Add a layer", and "Provide a layer version
ARN" and enter the following ARN (replace `us-east-1` with the region of your Lambda):```
arn:aws:lambda:us-east-1:034541671702:layer:openssl-lambda:1
```
Then click Add, save your lambda and test it out!

## Simple example on Node.js
```js
const { execSync } = require('child_process')exports.handler = async(event) => {
execSync(' openssl genrsa -out testCert.key 2048', { encoding: 'utf8', stdio: 'inherit' })
}
```