Running ActiveDirectory Module for Powershell in Lambda

1

We are trying to see if it is possible to run powershell scripts inside of Lambdas functions that are able to create users and groups and update passwords. Is it possible to import Microsoft's AD module into a Lambda? https://docs.microsoft.com/en-us/powershell/module/activedirectory/?view=windowsserver2022-ps Thanks!

Vincent
질문됨 2년 전1344회 조회
4개 답변
0

While the ActiveDirectory module technically imports in PowerShell 6+, most cmdlets unfortunately require Windows so this is not currently possible

AWS
Trent
답변함 일 년 전
0

I have not tried this on Lambda, but I have used the PowerShell module https://github.com/jformacek/S.DS.P to successfully interact with ActiveDirectory from pwsh7 on Mac and Linux. It will not work on pwsh6 because of a dependency in the underlying .NET Framework in the pwsh 7.3 release.

답변함 일 년 전
0

Is it still impossible to use ActiveDirectory Tools with Lambda?

https://aws.amazon.com/de/blogs/compute/extending-powershell-on-aws-lambda-with-other-services/

Mike
답변함 5달 전
-1

Yes, it is possible to run PowerShell scripts inside of Lambdas functions. The document [1] explain how common programming patterns and core concepts apply when you author Lambda function code in PowerShell.

Kindly refer to the document [2] that describes how to create a new IAM group and a new IAM user and then add the user to the group using the AWS Tools for PowerShell. Document [3] provides instructions to Set an Initial Password for an IAM User. This document explains the user creation with respect to IAM service.

Please refer to the document [4] which explains that, SAML support in the AWS Tools for PowerShell lets you provide your users federated access to AWS services. SAML is an XML-based, open-standard format for transmitting user authentication and authorization data between services; in particular, between an identity provider (such as Active Directory Federation Services), and a service provider (such as AWS). For more information about SAML and how it works, see SAML on Wikipedia, or SAML Technical Specifications at the Organization for the Advancement of Structured Information Standards (OASIS) website. SAML support in the AWS Tools for PowerShell is compatible with SAML 2.0.


References

[1] Building Lambda functions with PowerShell - https://docs.aws.amazon.com/lambda/latest/dg/lambda-powershell.html

[2] Create New IAM Users and Groups - https://docs.aws.amazon.com/powershell/latest/userguide/pstools-iam-new-user-group.html

[3] Set an Initial Password for an IAM User - https://docs.aws.amazon.com/powershell/latest/userguide/pstools-iam-set-pw.html

[4] Configuring Federated Identity with the AWS Tools for PowerShell - https://docs.aws.amazon.com/powershell/latest/userguide/saml-pst.html

profile pictureAWS
Ann
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠