Friday, September 4, 2020

How to Login to AWS using CLI with AzureSSO through Azure Active Directory

Testing on Windows 10 Release 1909 

Prerequisite (Install Visual Studio Code and the AWS CLI if you don't have it already installed and your Azure Active Directory is already configured and processing authentication)

1. Install Node.Js

https://nodejs.org/en/

(Use the LTS Edition/Version)

2. Check the node version in PowerShell or Windows Terminal:

node --version && npm --version

3. npm install -g aws-azure-login

*install will take about 15-20 minutes. Be patient and let it finish. 

4. Configure your profile

aws-azure-login --configure --profile=<<Name of your profile>>

Example: 

aws-azure-login --configure --profile=migrationking

Pro Tip: It installs the profile on your machine under ~/.aws/config . You can edit the file with Visual Studio Code or Notepad++

#This will prompt to Enter the Azure AD details

*** Azure Tenant ID: << Enter the Azure AD Tenant ID from the Azure AD application configuration for the AWS Account to be accessed>> Azure Tenant ID URL: https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Properties

*** Azure App ID URI:  << Replace this with Azure App ID identifier from App Config>> Find it via the direct url: https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Overview/appId/

*** Default Username: << Replace this with your complete Azure AD Email Address FQDN (e.g. malcolm.shabazz@warrior4life.com>>

*** Stay logged in: skip authentication while refreshing aws credentials (true|false) (false) << Type in false>>

*** Default Role ARN (if multiple): <<Hit Return Key, the CLI will fetch the list of role ARN's when trying to login post configuration>>.

*** Default Session Duration Hours (up to 12): (1)

Profile saved.

If your using GovCloud make sure that you identify the region inside of your ~/.aws/config file

region=us-gov-east-1

Example:

cat ~/.aws/config

[profile migrationking]

region=us-gov-east-1

azure_tenant_id=1a11d111-1111x-111x-111x1-00000000x00001x

azure_app_id_uri=https://signin.amazonaws-us-gov.com/saml\#warrior4life

azure_default_username=malcolm.shabazz@warrior4life.com

azure_default_role_arn=

azure_default_duration_hours=1

azure_default_remember_me=false


5. If you want to login without a GUI prompt type

aws-azure-login --profile migrationking --no-sandbox --no-prompt

6. If you want to see the gui or your chasing errors

aws-azure-login --profile migrationking --no-sandbox --no-prompt --mode=gui


Reference: https://github.com/sportradar/aws-azure-login/blob/main/README.md

Correction Example: https://github.com/migrationking/aws-azure-login

Share:

Saturday, July 18, 2020

How to Switch Between AWS CLI Named Profiles

Create a named profile by opening your command line utility after installing the aws cli tools.

aws configure --profile hackbaby

Access ID
Secret Access Key

Now you have set a named profile (you can set multiple)

Now...to make switching back and forth without a headache. Set your environment variables:

Window$: setx AWS_PROFILE hackbaby

Linux: export AWS_PROFILE=hackbaby

Close your command line tool. Re-open and then get to work. Close and re-open to flip between CLI profiles.



Share:

Monday, June 1, 2020

How to Become AWS Solutions Architect - Associate Certified on The Latest SAA-C02 Exam

Amazon Web Services (AWS) is the King of the Cloud jungle. While Google Cloud Platform and Microsoft Azure are contenders, at the time of this writing and likely a few years into the future, AWS Certifications will put meat and potatoes or salad and fruits for you vege lovers on the table for you and your family for years to come. 

Google Cloud Platform is going full-steam ahead though!

AWS simply is in much higher demand because it is in most enterprises, schools, businesses, government agencies and healthcare throughout the world, not just the United States.

The links below are a practical one-stop shop of where to start. You MUST have hands-on. Do not waist your time or listen to anyone trying to use Brian Dumps, cheat or some other way to try to go around the cold, hard, long and enduring process of actually LEARNING what your doing to be able to support a company and to future proof your career or start and run your own business (ever heard of AWS IQ?)!

Being a Paper Tiger or Cheater will NOT make you successful and eventually you will be exposed by your lack of experience and inability to work or answer complex technical questions. Do not cheat! Take the time to learn!!!

Those of us that have been working in technology, Datacenters and IT for years that go through the ranks and make it into IT Management or IT Director roles will smell, see a cheater from a mile away. You cannot do the work if you cannot understand the technology if you have not actually learned and done it!!! 

For the rest of us, be willing to turn off NetFlix, Hulu or Star-Trek on the CBS app or close YouTube from the latest funny video. The reward is greatness. Get your certifications. Get your education. Work hard and then play hard. (When you do get your money...don't waste it splurging!! Invest in something everyone on earth needs...a home/place to call their own: Real Estate (pandemic friendly!). I'm not going to sit here creating URL's for you. Copy and paste them! 🤣

Here you go:

#########
# FAQs  #
##############################################################################################
# Answers in FAQ's may be on the exam since it is something commonly questioned by customers #
##############################################################################################
https://pages.awscloud.com/Exam_Preparation_2020_Solutions_Architect_Associate.html
https://pages.awscloud.com/rs/112-TZM-766/images/AWS_Well-Architected_Framework.pdf
https://aws.amazon.com/ec2/faqs/
https://aws.amazon.com/s3/faqs/
https://aws.amazon.com/vpc/faqs/
https://aws.amazon.com/route53/faqs/
https://aws.amazon.com/rds/faqs/
https://aws.amazon.com/sqs/faqs/
https://d1.awsstatic.com/training-and-certification/docs-sa-assoc/AWS-Certified-Solutions-Architect-Associate_Exam-Guide.pdf

####################################
# You must have hands-on experience!!   #
####################################

https://learn.cantrill.io/p/aws-certified-solutions-architect-associate-saa-c02 ($40 USD - Latest SAA-C02 Content!!) - Finish the whole course and all labs

https://portal.tutorialsdojo.com/courses/aws-certified-solutions-architect-associate-practice-exams/ ($15 USD) - Finish the whole course

https://www.aws.training/Details/Curriculum?id=20685 - Finish the whole course and take the AWS Practice Exam

https://aws.amazon.com/education/awseducate/ (Free)



https://go.aws/2AavkZ3 - AWS Get Certified PDF









https://go.aws/3eZ3bTp - AWS Certification Flyer (PDF)


https://go.aws/376zhKr - AWS Well Architected Framework



Share:

Monday, April 27, 2020

How to Install Zoom on Ubuntu 20.04 LTS

1. Download the latest .deb package from Zoom using Terminal

wget https://zoom.us/client/latest/zoom_amd64.deb

2. Install via the package manager

sudo dpkg -i zoom_amd64.deb 

3. Fix the dependency issues

sudo apt-get install -f

4. Click Zoom from the universal launcher or just type "zoom" from the command line
Share:

Wednesday, April 15, 2020

Understanding Hybrid, IAAS, PAAS and SAAS

Platform Model Control Types for Hybrid, IAAS, PAAS and SAAS

System Architecture Stack - What a company/user/agency controls in Cloud platforms.
This shared use stack also explains what your responsible for maintaining and managing in the Cloud.

  1. Hybrid: Datacenter/Server Room or agency controlled infrastructure
  2. IAAS: Infrastructure as a service (AWS, GCP, Azure, IBM, Rackspace, etc)
  3. PAAS: Platform as a Service (Lambda, Cloud Functions, AWS RDS)
  4. SAAS: Software as a Service (Office365, Google G-Suite, Salesforce) - Technology upgrades, enhancements, changes, etc are by the vendor only.
What do you actually control as a customer?

Platform Types

Share:

Wednesday, February 12, 2020

How To Upgrade Windows 2012/2016 to Windows 2019

1. Normally, i'm not a fan of in-place upgrades, but...it depends on organization requirements. A clean install with scripted configurations is always better.

2. Here is the lazy way for those who have no choice...

3. Snapshot the VM (VMware, Hyper-V, KVM...whatever it is).

4. Add the iSO to the VM (Don't bother booting from the BIOS and running the ISO that way). It will just tell you to boot into the OS anyway. (thank you Microlazy)

5. Open a CMD or Powershell as an administrator.

6. Adprep is now located under "support\adrep\" on the 2019 disk. (Domain Controllers Only)

 

7. From the CLI run the following: adprep.exe /forestprep and then click "C"

8. Domain prep: adprep.exe /domainprep /domain yourdomain.com

9. Next upgrade the GPO Domains: adprep.exe /domainprep /gpprep /domain yourdomain.com

10. Now run the upgrade installer or relaunch it and "Continue where I left off"

11. If it barks about space. Don't add. Reduce. Run this command to wipe out and clean all of the logs: for /F "tokens=*" %1 in ('wevtutil.exe el') DO wevtutil.exe cl "%1"

12. Delete data in the C:\Windows\WinSxS folder over 2 years old (watch GB's drop off!) (FYI. this is the Windows Update folder. You don't need 1/2 of the crap on here) PRO NOTE: You should be doing this for your VM templates before you start using them.

13. c:\dism.exe /Online /Cleanup-Image /AnalyzeComponentStore




14. c:\dism.exe /Online /Cleanup-image /StartcomponentCleanup

15. Post upgrade. You will be prompted for the new MAK Key. Run the following from the command line first as administrator: slmgr -rearm and reboot the server with shutdown /r /t 00 (takes it down and reboots it immediately). Then activate with slmgr -ipk "XXX-The MAK Key"

16. If you get an error. Clear the registry of the key, clear the OS and then reboot the OS. After that activation should work fine via the activation GUI.



17. Commands:

slmgr -cpky && slmgr -upk && slmgr -rearm

shutdown /r /t 00 (shutdown and reboot now)
Reference for WinSxS Cleanup: https://www.saotn.org/windows-server-disk-cleanup/
Share: