Hi All, Quick question: I'm using Python, `pulumi...
# aws
b
Hi All, Quick question: I'm using Python,
pulumi_aws.lambda_.*Function*()
and getting the error:
Copy code
aws:lambda:Function (AlarmLambda):
    error: filename or s3_* attributes must be set
My code:
Copy code
def generate_zip():
    zf = zipfile.ZipFile('lambda.zip', mode='w')
    zf.writestr('index.py', data='''def lambda_handler(event, context): \n\treturn "Hello, world!"''')
    zf.close()
    return zf.fp    


alarm_lambda = aws_lambda.Function(
        'AlarmLambda',
        name=f'{Env}-alarm-consumer',
        description='CloudWatch alarm consumer',
        environment={
            'Variables': {
                'LOGLEVEL': 'INFO'
            }
        },
        code=generate_zip(),
        handler='index.handler',
        role=alarm_lambda_role.arn,
        runtime='python3.6',
        timeout=60
    )
In the docs I do not see a param called
filename
and I'd rather not use the s3_* bits - any thoughts? Thanks!