Migrating AWS Organization Configuration Code to a Container
ACM.387 Moving existing organization configuration code to the related resource folder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
⚙️ Check out my series on Automating Cybersecurity Metrics | Code
🔒 Related Stories: AWS Organizations | Secure Code | Container Security
💻 Free Content on Jobs in Cybersecurity | ✉️ Sign up for the Email List
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the last post I covered the resource I think I need to create to redeploy my organization with my new deployment container.
In this post I want to clean up my organization deployment.
Organizational Settings
To migrate my organizational settings I migrate this file over:
resources/organizations/organization/organization_functions.sh
Within this file I see that I have this function:
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*sU4szi0DcIh9Itqi7XIjLg.png)
That is no longer applicable since I have a new way to deploy or import an organization in my deploy/rootadmin/deploy_organization.sh file. But really that code is specific to the organization resource so I move that code into the create organization function (truncated):
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*_pmRxlcmfjdd5tzunVKkNQ.png)
I source the organization functions file:
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*dqkwzkJ3IxMmUosnm3nXkg.png)
Let’s see what I have in my organization deploy script in my POC code:
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*IJzgDawyh-LReShdOi90uw.png)
I can just copy those four functions now over to my rootadmin deploy_organization.sh script and they will get called from the organization_functions.sh file. I test and it works.
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*8IO-uloOPR9EdiToITHG9w.png)
Just a short post to migrate and clean up some existing organizations code.
The other thing I want to configure for my organization are the delegated administrators, but before I can configure those I need the related accounts.
Follow for updates.
Teri Radichel | © 2nd Sight Lab 2023
About Teri Radichel:
~~~~~~~~~~~~~~~~~~~~
⭐️ Author: Cybersecurity Books
⭐️ Presentations: Presentations by Teri Radichel
⭐️ Recognition: SANS Award, AWS Security Hero, IANS Faculty
⭐️ Certifications: SANS ~ GSE 240
⭐️ Education: BA Business, Master of Software Engineering, Master of Infosec
⭐️ Company: Penetration Tests, Assessments, Phone Consulting ~ 2nd Sight Lab
Need Help With Cybersecurity, Cloud, or Application Security?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
🔒 Request a penetration test or security assessment
🔒 Schedule a consulting call
🔒 Cybersecurity Speaker for Presentation
Follow for more stories like this:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
❤️ Sign Up my Medium Email List
❤️ Twitter: @teriradichel
❤️ LinkedIn: https://www.linkedin.com/in/teriradichel
❤️ Mastodon: @teriradichel@infosec.exchange
❤️ Facebook: 2nd Sight Lab
❤️ YouTube: @2ndsightlab
![](https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*H9Ew1KCl-29nZiPR.jpeg)