https://github.com/awslabs/aws-lambda-powershell-runtime
This new PowerShell custom runtime for AWS Lambda makes it even easier to run Lambda functions written in PowerShell to process events.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.8%) to scientific vocabulary
Keywords
Repository
This new PowerShell custom runtime for AWS Lambda makes it even easier to run Lambda functions written in PowerShell to process events.
Basic Info
Statistics
- Stars: 62
- Watchers: 14
- Forks: 20
- Open Issues: 14
- Releases: 0
Topics
Metadata Files
README.md
PowerShell Runtime for AWS Lambda
This PowerShell custom runtime for AWS Lambda enables running Lambda functions written in PowerShell to process events.
Your code runs in an Amazon Linux environment that includes AWS credentials from an AWS Identity and Access Management (IAM) role that you manage.
Overview
Lambda has supported running PowerShell since 2018. However, the existing solution uses the .NET Core runtime implementation for PowerShell. It uses the additional AWSLambdaPSCore modules for deployment and publishing, which require compiling the PowerShell code into C# binaries to run on .NET. This adds additional steps to the development process.
This runtime uses Lambda's custom runtime functionality based on the provided.al2023 runtime.
PowerShell custom runtime benefits
Native PowerShell. This runtime uses native PowerShell.
- The function runtime environment matches a standard PowerShell session, which simplifies the development and testing process.
- No compilation step required and no hosting on the .NET runtime.
- Allows additional functionality, such as
Add-Typeto provide richer context information.
Code visibility. You can view and edit PowerShell code within the Lambda console's built-in code editor when using .zip archive functions (not container images). You can embed PowerShell code within an AWS CloudFormation template, or other infrastructure as code tools.
Output. This custom runtime returns everything placed on the pipeline as the function output, including the output of
Write-Output.This gives you more control over the function output, error messages, and logging. With the previous .NET runtime implementation, your function returns only the last output from the PowerShell pipeline. Unhandled exceptions are caught by the runtime, then they are logged to the log stream and a error result is returned to the caller.
Development Requirements
- PowerShell 7.0 or later for development and testing
- Download from: https://github.com/PowerShell/PowerShell/releases
- Required for development tools and test suite
Testing
The runtime includes unit tests and integration tests:
- Unit Tests: Automated tests covering runtime functions and build processes
- Integration Tests: Manual tests with real AWS Lambda functions for end-to-end validation
See powershell-runtime/tests/README.md for testing documentation and commands.
Building and Deploying
You can build the custom runtime using AWS SAM or other infrastructure-as-code tools. Deploy the example demo-runtime-layer-function to explore how the runtime works.
See powershell-runtime/README.md for detailed deployment instructions.
Project Structure
- powershell-runtime/ - Custom runtime implementation and deployment methods
- powershell-modules/ - Pre-built PowerShell modules (AWS Tools, VMware PowerCLI)
- examples/ - Demo applications showing runtime functionality
Examples
| Example | Description | |:---|:---| |demo-runtime-layer-function|Complete runtime layer with AWS Tools and multiple handler options | |demo-s3-lambda-eventbridge|Event-driven application processing S3 files with EventBridge | |demo-container-image-all-aws-sdk|Container image deployment with full AWS SDK | |demo-container-images-shared|Shared container layers for multiple functions |
Runtime Information
See the PowerShell-runtime documentation for detailed information on runtime variables, handler options, context objects, module support, logging, and error handling.
Acknowledgements
This custom runtime builds on the work of Norm Johanson, Kevin Marquette, Andrew Pearce, Afroz Mohammed, and Jonathan Nunn.
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Owner
- Name: Amazon Web Services - Labs
- Login: awslabs
- Kind: organization
- Location: Seattle, WA
- Website: http://amazon.com/aws/
- Repositories: 914
- Profile: https://github.com/awslabs
AWS Labs
GitHub Events
Total
- Issues event: 7
- Watch event: 1
- Issue comment event: 9
- Push event: 3
- Pull request review event: 12
- Pull request review comment event: 9
- Pull request event: 7
- Fork event: 1
Last Year
- Issues event: 7
- Watch event: 1
- Issue comment event: 9
- Push event: 3
- Pull request review event: 12
- Pull request review comment event: 9
- Pull request event: 7
- Fork event: 1
Issues and Pull Requests
Last synced: almost 2 years ago
All Time
- Total issues: 22
- Total pull requests: 10
- Average time to close issues: about 1 month
- Average time to close pull requests: 7 days
- Total issue authors: 16
- Total pull request authors: 5
- Average comments per issue: 4.32
- Average comments per pull request: 0.8
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 10
- Pull requests: 6
- Average time to close issues: 22 days
- Average time to close pull requests: 6 days
- Issue authors: 8
- Pull request authors: 3
- Average comments per issue: 3.5
- Average comments per pull request: 1.0
- Merged pull requests: 4
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- austoonz (4)
- sean-r-williams (3)
- swordfish291 (3)
- sdunnedeloitte (2)
- sholland-bamboohealth (2)
- juancrl (1)
- alexandroivaldez (1)
- pharindoko (1)
- yobyot (1)
- asherber (1)
- fv-ian (1)
- alagappan-al (1)
- liacha1986 (1)
- mtboren (1)
- gw-bcharboneau (1)
Pull Request Authors
- austoonz (9)
- briantist (2)
- andyhopp (2)
- fv-ian (1)
- sholland-bamboohealth (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- public.ecr.aws/lambda/provided al2023 build
- 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-modules-aws-tools latest build
- 978558897928.dkr.ecr.us-east-1.amazonaws.com/powershell-runtime latest build
- public.ecr.aws/lambda/provided al2023 build
- public.ecr.aws/lambda/provided al2023 build
- public.ecr.aws/lambda/provided al2023 build