File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -46,5 +46,20 @@ awslocal lambda create-function-url-config \
46
46
--function-name update_docker_hub_image_stats \
47
47
--auth-type NONE
48
48
49
+ awslocal events put-rule \
50
+ --name update_docker_hub_image_stats-scheduled-rule \
51
+ --schedule-expression ' rate(1 minute)'
52
+
53
+ awslocal lambda add-permission \
54
+ --function-name update_docker_hub_image_stats \
55
+ --statement-id update_docker_hub_image_stats-scheduled-event \
56
+ --action ' lambda:InvokeFunction' \
57
+ --principal events.amazonaws.com \
58
+ --source-arn arn:aws:events:eu-west-1:000000000000:rule/update_docker_hub_image_stats-scheduled-rule
59
+
60
+ awslocal events put-targets \
61
+ --rule update_docker_hub_image_stats-scheduled-rule \
62
+ --targets file://bin/targets.json
63
+
49
64
lambda_url=$( awslocal lambda list-function-url-configs --function-name update_docker_hub_image_stats | jq -r ' .FunctionUrlConfigs[0].FunctionUrl' )
50
65
curl -v $lambda_url
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "Id" : " 1" ,
4
+ "Arn" : " arn:aws:lambda:eu-west-1:000000000000:function:update_docker_hub_image_stats"
5
+ }
6
+ ]
You can’t perform that action at this time.
0 commit comments