Looking at the boto3 authentication scheme it seems like it uses a configuration file based authentication approach.
This link suggests that to authenticate with Lambda you can simply upload your code (zipped) after installing boto3 locally. Running python with boto2 as an AWS Lambda function
I was hoping there was something simpler I could do from within the aws lambda web interface to log in.
This is the code I'm running which returns "An error occurred (AccessDeniedException) when calling the GetFunction operation"
import json
import boto3
def lambda_handler(event, context):
client = boto3.client('lambda',region_name='us-east-2')
response = client.get_function(FunctionName='jims_first_function')
return {
'statusCode': 200,
'body': json.dumps(response)
}
question from:
https://stackoverflow.com/questions/65623484/how-to-get-boto3-authorization-on-aws-lambda-without-uploading-a-zip-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…