Reputation: 141
I'm trying to install azure-cli on aws lambda for integration purpose. Size of azure-cli seems to be huge for aws lambda and unable to upload the zip file.
I want to create a service principal (client secret) in azure using lambda using python. The only way to create service principal is through azure-cli.
Is there any other way to create client secret? or can we handle azure-cli package size to upload in aws lambda?
I have gone through many blogs online, but azure-cli is required to create client secret.
Upvotes: 1
Views: 1059
Reputation: 7483
install azure-cli on aws lambda
Do you mean pip install
Python package within AWS Lambda?
If so, One of the great things about using Python is the availability of a huge number of libraries that helps you implement fast solutions without having to code all classes and functions from scratch. As mentioned before, Amazon Lambda offers a list of Python libraries that you can import into your function. The problem starts when you have to use libraries that are not available. One way to do it is to install the library locally inside the same folder you have your lambda_function.py file, zip the files and upload it to your Amazon Lambda console. This process can be a laborious and inconvenient task to install libraries locally and upload it every time you have to create a new Lambda function.
To make your life easier, Amazon offers the possibility for us to upload our libraries as AWS Lambda layers, which consists of a file structure where you store your libraries, load it independently to Amazon Lambda, and use them on your code whenever needed. Once you create a Lambda Layer it can be used by any other new Lambda Function.
There are the steps of getting started with AWS Lambda Layers for Python.
Upvotes: 1