Skip to content

Commit 9e9e627

Browse files
saving event source as environment variable
1 parent f1f8677 commit 9e9e627

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

stac_updater/cli.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ def update_collection(name, root, long_poll, concurrency):
4646
def modify_kickoff(type, bucket_name):
4747
if type == 's3':
4848
kickoff_func = resources.lambda_s3_trigger('kickoff', bucket_name)
49-
49+
else:
50+
kickoff_func = None
51+
52+
if kickoff_func:
53+
# Add kickoff source event to environment
54+
kickoff_func.update({'environment': {
55+
'EVENT_SOURCE': type
56+
}})
5057
with open(sls_config_path, 'r') as f:
5158
sls_config = yaml.unsafe_load(f)
5259
sls_config['functions']['kickoff'].update(kickoff_func)

0 commit comments

Comments
 (0)