billions-forest-38488
02/12/2020, 10:07 AMpulumi_aws.lambda_.*Function*()
and getting the error:
aws:lambda:Function (AlarmLambda):
error: filename or s3_* attributes must be set
My 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!