def update(bosslet_config): if console.confirm("Rebuild multilambda", default=True): pre_init(bosslet_config) update_lambda_code(bosslet_config) config = create_config(bosslet_config) config.update()
is not changed. load_lambdas_on_s3() zips spdb, bossutils, lambda, and lambda_utils as found in boss-manage's submodules and places it on the lambda build server. Next, makedomainenv is run on the lambda build server to create the virtualenv for the lambda function. Finally, the virutalenv is zipped and uploaded to S3. update_lambda_code() tells AWS to point the existing lambda function at the new zip in S3. """ import alter_path from lib import configuration from lib.lambdas import load_lambdas_on_s3, update_lambda_code if __name__ == '__main__': parser = configuration.BossParser( description='Script for updating lambda function code. ' + 'To supply arguments from a file, provide the filename prepended with an `@`.', fromfile_prefix_chars='@') parser.add_bosslet() parser.add_argument('--refresh-only', '-r', action='store_true', help='Tell AWS to just reload the lambdas from S3') args = parser.parse_args() if not args.refresh_only: load_lambdas_on_s3(args.bosslet_config) update_lambda_code(args.bosslet_config)