Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
A command line tool for managing accounts within an AWS organization. Easy to integrate into AWS Deployment Framework
!IMPORTANT! - The code has not been tested properly yet in production and no unit/integration testing have been implemented. Use at your own risk.
This repository contains code that manages the process around AWS account creation. It assumes you are working with the AWS Deployment Framework for managing deployments in a multi-account AWS organization.
Current Features
Not supported due to AWS Organization API limitations
Note we are only supporting python3.6 and up, I really like my f-strings..
Install the package using pip
pip3 install awsaccountmgr
Next define configuration files for the accounts you would like to manage. You can have multiple configuration files for logical separation. The script will iterate and validate each file before sequentially creating/updating the defined accounts.
Here is an example file
Accounts:
# Account with only mandatory parameters
- AccountFullName: playgroundaccount
OrganizationalUnitPath: playground/
Email: playgroundaccount@moorspots.com
# Delete the default VPC for this account
- AccountFullName: usdevaccount
OrganizationalUnitPath: us/dev
Email: usdevaccount@moorspots.com
DeleteDefaultVPC: True
# Account with all available parameters
- AccountFullName: myrootaccount
OrganizationalUnitPath: /
Email: myrootaccount@moorspots.com
DeleteDefaultVPC: True
AllowDirectMoveBetweenOU: True
Alias: IDontWantMyAliasToBeTheSameAsTheAccountFullName
AllowBilling: False
AlternateContacts:
Operations:
Email: myops@moorspots.com
Name: myname
Title: Doctor
PhoneNumber: +31307161111
Security:
Email: mysecurity@moorspots.com
Name: myname
Title: Doctor
PhoneNumber: +31307161111
Billing:
Email: mybilling@moorspots.com
Name: myname
Title: Doctor
PhoneNumber: +31307161111
Tags:
- CostCenter: 123456789
To create new accounts or move accounts to a different OU you only have to update the relevant account configuration file and re-run the script.
The OU name is the name of the direct parent of the account. If you want to move an account to the root you can provide the AWS organization id (eg "r-abc1"). If you are dealing with nested organizational units you can seperate them with a / (see examples above).
If you provide the 'AlternateContacts' key, all three alternate contact types will be fully updated with the declared configuration. If you for instance only provide an Operations contact entry, it will try to remove the Security and Billing contact information.
Once the configuration files are defined you can start the script locally with:
awsaccountmgr <root_ou_id> <config folder path>
You will have to have AWS credentials stored (using AWS CLI or environment variables) on your machine. If the assumed role is not resided in the master account the script will try to assume the OrganizationAccountAccessRole role in the master account. This is useful for people using the AWS Deployment Framework to run this script from a pipeline in the deployment account.
To see all available command line options, run awsaccountmgr --help
Thanks to @deltagarrett for testing!
FAQs
A command line tool for managing accounts within an AWS organization. Easy to integrate into AWS Deployment Framework
We found that awsaccountmgr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.