Skip to content

Commit

Permalink
Fix clean command for output folder (#452)
Browse files Browse the repository at this point in the history
* Fix `clean` command for `output` folder

---------

Co-authored-by: Oleksii Olchedai <[email protected]>
  • Loading branch information
RenckelAlexOlche and Oleksii Olchedai authored Dec 3, 2024
1 parent 816a063 commit 209afc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ of each other or without specifying a specific platform (using default platform
- Fixed an issue related to locking the state
- Added empty deployment package handling for lambda layer
- Fixed bug when meta output processor process the resource name incorrectly
- Fix `clean` command for `output` folder to correctly resolve ARN for Lambda and properly process and remove the `outputs` folder if Lambda is part of the deployment

# [1.14.1] - 2024-10-08
- Added support lambda layers with runtime DotNet
Expand Down
5 changes: 3 additions & 2 deletions syndicate/core/resources/lambda_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -1208,6 +1208,7 @@ def remove_lambdas(self, args):
@retry()
def _remove_lambda(self, arn, config):
# can't describe lambda event sources with $LATEST version in arn
original_arn = arn
arn = arn.replace(':$LATEST', '')
lambda_name = config['resource_name']
event_sources_meta = config['resource_meta'].get('event_sources', [])
Expand All @@ -1220,11 +1221,11 @@ def _remove_lambda(self, arn, config):
if lambda_name == each.split('/')[-1]:
self.cw_logs_conn.delete_log_group_name(each)
_LOG.info('Lambda %s was removed.', lambda_name)
return {arn: config}
return {original_arn: config}
except ClientError as e:
if e.response['Error']['Code'] == 'ResourceNotFoundException':
_LOG.warn('Lambda %s is not found', lambda_name)
return {arn: config}
return {original_arn: config}
else:
raise e

Expand Down

0 comments on commit 209afc0

Please sign in to comment.