Skip to content

Commit

Permalink
Merge pull request #214 from ASFHyP3/develop
Browse files Browse the repository at this point in the history
RELEASE: fix get_files key error
  • Loading branch information
Jlrine2 authored Aug 7, 2020
2 parents 8234e64 + 4699c1d commit ae447db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.3.7]
### Fixed
- `get-files` get expiration only from product

## [0.3.6]
### Fixed
- `get-files` step functions AMI roles for tags
Expand Down
4 changes: 3 additions & 1 deletion step-function/get-files/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def lambda_handler(event, context):
files = []
browse_images = []
thumbnail_images = []
expiration = None

for item in response['Contents']:
download_url = get_download_url(bucket, item['Key'])
Expand All @@ -49,9 +50,10 @@ def lambda_handler(event, context):
'filename': basename(item['Key']),
}
files.append(file)
expiration = get_expiration_time(bucket, item['Key'])

return {
'expiration_time': get_expiration_time(bucket, response['Contents'][0]['Key']),
'expiration_time': expiration,
'files': files,
'browse_images': browse_images,
'thumbnail_images': thumbnail_images,
Expand Down

0 comments on commit ae447db

Please sign in to comment.