How should I pass my s3 credentials to Python lambda function on AWS?
问题 I'd like to write a file to S3 from my lambda function written in Python. But I’m struggling to pass my S3 ID and Key. The following works on my local machine after I set my local Python environment variables AWS_SHARED_CREDENTIALS_FILE and AWS_CONFIG_FILE to point to the local files I created with the AWS CLI. session = boto3.session.Session(region_name='us-east-2') s3 = session.client('s3', config=boto3.session.Config(signature_version='s3v4')) And the following works on Lambda where I hand