Skip to content

Commit

Permalink
Merge pull request #31 from awslabs/1.4.2
Browse files Browse the repository at this point in the history
1.4.2
### Added
* CloudTrail tags to show that the trail is created by Assisted Log Enabler for AWS.

### Changed
* CloudTrail name to be more descriptive that it's created by Assisted Log Enabler for AWS.
  • Loading branch information
hackersifu authored Sep 20, 2021
2 parents d485364 + 8392f7d commit ef32e78
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,12 @@
## [1.4.1b] - 2021-08-24

### Added
* Condition statements for if no options were selected during Dry Run and Cleanup modes.
* Condition statements for if no options were selected during Dry Run and Cleanup modes.

## [1.4.2] - 2021-09-20

### Added
* CloudTrail tags to show that the trail is created by Assisted Log Enabler for AWS.

### Changed
* CloudTrail name to be more descriptive that it's created by Assisted Log Enabler for AWS.
13 changes: 12 additions & 1 deletion subfunctions/ALE_single_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,24 @@ def check_cloudtrail(account_number, unique_end):
if cloudtrail_status["trailList"][0]["Name"] == "":
logging.info("CreateTrail API Call")
cloudtrail_activate = cloudtrail.create_trail(
Name='aws-cloudtrail-em-' + account_number,
Name='assisted-log-enabler-ct-' + account_number,
S3BucketName="aws-log-collection-" + account_number + "-" + region + "-" + unique_end,
S3KeyPrefix='cloudtrail',
IsMultiRegionTrail=True,
EnableLogFileValidation=True
)
cloudtrail_name = cloudtrail_activate["Name"]
cloudtrail_arn = cloudtrail_activate["TrailARN"]
logging.info("AddTags API Call")
cloudtrail_tags = cloudtrail.add_tags(
ResourceId=cloudtrail_arn,
TagsList=[
{
'Key': 'workflow',
'Value': 'assisted-log-enabler'
},
]
)
logging.info("StartLogging API Call")
cloudtrail_on = cloudtrail.start_logging(
Name=cloudtrail_name
Expand Down

0 comments on commit ef32e78

Please sign in to comment.