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.
Apache License 2.0
59 stars 20 forks source link

Installing modules example #29

Closed alexandroivaldez closed 3 months ago

alexandroivaldez commented 8 months ago

Would it be possible to add a walkthrough or example of how to add PowerShell modules, for example "Exchange Online PowerShell V3" module?

ghost commented 6 months ago

hi @alexandroivaldez , I just work on this one for my project, you can check and use powershell-modules/AWSToolsforPowerShell/AWS.Tools.S3EventBridge/build-AWSToolsLayer.ps1 as example, replace the url in this file to the url to download your module you want,

And in your lambda function, you have to point directly to the file psm1, in this case this is "/opt/modules/netCore/ExchangeOnlineManagement.psm1".