diff --git a/serverless/alpr_counts/README.md b/serverless/alpr_counts/README.md index 5c54136..c8e3d94 100644 --- a/serverless/alpr_counts/README.md +++ b/serverless/alpr_counts/README.md @@ -3,4 +3,4 @@ Counts total ALPRs reported in the OSM database, hourly. OSM's Overpass API is used to query for counts of all ALPRs and ALPRs in the United States. The counts are stored in a JSON file in an S3 bucket. ## Deploying -This Lambda uses a zip file, so from the `/terraform` directory, you can run `terraform apply` after making changes, and it should detect the changes, rebuild the zip, and update the Lambda's function code. +This Lambda uses a zip file, so from the `/terraform` directory, you can run `terraform apply -target=module.alpr_counts` after making changes, and it should detect the changes, rebuild the zip, and update the Lambda's function code. diff --git a/serverless/alpr_counts/src/alpr_counts.py b/serverless/alpr_counts/src/alpr_counts.py index a5f5389..618e66d 100644 --- a/serverless/alpr_counts/src/alpr_counts.py +++ b/serverless/alpr_counts/src/alpr_counts.py @@ -25,8 +25,9 @@ def fetch_alpr_surveillance_nodes(usOnly=True): def fetch_wins_count(): cms_url = "https://cms.deflock.me/items/RecentWins" + headers = {'User-Agent': 'deflock-alpr-counts/1.0'} - response = requests.get(cms_url) + response = requests.get(cms_url, headers=headers) if response.status_code == 200: response_json = response.json()