Open pcgeek86 opened 3 years ago
Hi @pcgeek86,
Good morning.
Please use Provide feedback
at the bottom of the page to submit missing documentation feedback. That being said, I don't think PowerShell is supported by default in Lambda containers. I will try to get more information on this issue and may be check with developer as well.
Thanks, Ashish
We haven't built a PowerShell base image yet for Lambda. I like the idea and hope we can we prioritize it. So anybody else that wants this feature please +1 this issue.
Out of curiosity for PowerShell users, is requiring Docker for a PowerShell Lambda experience a significant hurdle to using PowerShell on Lambda?
Out of curiosity for PowerShell users, is requiring Docker for a PowerShell Lambda experience a significant hurdle to using PowerShell on Lambda?
No, it's not a significant hurdle. Publishing PowerShell Lambda functions is fairly straightforward with the AWSLambdaPSCore
.
That being said, I would love to NOT have to worry about installing this module separately, and simply build a standard Dockerfile
, just like every other programming language.
+1 a standard module would be ideal, especially the boilerplate since the current implementation is basically just a C# application that calls a powershell script, rather than a first-party powershell implementation.
Out of curiosity for PowerShell users, is requiring Docker for a PowerShell Lambda experience a significant hurdle to using PowerShell on Lambda?
@normj significant hurdle. PSWSMan (required by ExchangeOnlineManagement) attempts to overwrite shared object files on the read only volume. At this point, our best option is to build our own container image, and it would be nice to have a starting point.
After attempting to implement this myself I think I understand why there isn't a container image ready to go. There are some drawbacks to simply running a vanilla powershell process and I suspect there is a lot happening during the compilation of the zip along with optimizations in the runtime to account for those drawbacks. I'll plan on using this until something better comes along, https://github.com/nickadam/powershell-lambda. 🤞
Out of curiosity for PowerShell users, is requiring Docker for a PowerShell Lambda experience a significant hurdle to using PowerShell on Lambda?
@normj significant hurdle. PSWSMan (required by ExchangeOnlineManagement) attempts to overwrite shared object files on the read only volume. At this point, our best option is to build our own container image, and it would be nice to have a starting point.
While not fixing the issue, the latest Exchange preview module 2.0.6 proxies a ton of new commands through HTTPS, no pssession needed. https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-online-powershell-v2-module-preview-now-more-secure/ba-p/2922946
I was going through the documentation for AWS Lambda and noticed that there isn't any documentation for PowerShell Containers on Lambda. According to the Lambda Containers announcement, all Lambda runtimes are supported with containers. Is that true for PowerShell?
I also tried to run
pwsh
from the "dotnet" container image on the AWS public ECR gallery. It doesn't appear to be installed in the dotnet image, so how would I package up a PowerShell container for Lambda?Notice how the documentation for Lambda Containers skips over PowerShell, but exists for other languages, in the following screenshot.