## AWS STUFF ### Setup AWS-CLI V2 https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html then create credentials for yourself and auth your aws-cli https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html ### Get env vars: #### Beanstalk To get env variables from any of the Elastic bean stalk apps just fill in required info here and run on your cmd ``` aws elasticbeanstalk describe-configuration-settings --environment-name <Env name> --application-name <Application-name> | grep EnvironmentVariables -A1 ``` So for `Feedback service` in `Dev` this would be: ``` aws elasticbeanstalk describe-configuration-settings --environment-name AdminPortal-Dev --application-name AdminPortal-Dev | grep EnvironmentVariables -A1 ``` result: ``` "OptionName": "EnvironmentVariables", "Value": "MONGO_URI=mongodb+srv://NasAcademy:NasAcademy@development-x5038.mongodb.net/feedback_service_prod?retryWrites=true&w=majority" ``` #### Amplify Similar to Beanstalk you can also get the Environment variables for Amplify, but here you need the AppId. So first fetch the list of apps: then fetch that apps details: ``` aws amplify list-apps ``` And get the id from the response or check the UI for the ID. eg. for cops-portal: ``` aws amplify get-app --app-id d2sou8fjwjnjyx ``` output: ``` { "app": { "appId": "d2sou8fjwjnjyx", "appArn": "arn:aws:amplify:ap-southeast-1:222816104937:apps/d2sou8fjwjnjyx", "name": "NasAcademyPortal", "tags": {}, "repository": "https://github.com/The-Nas-Company/academy-learning-portal", "platform": "WEB", "createTime": "2020-07-24T08:50:17.133000+02:00", "updateTime": "2021-09-03T15:51:46.497000+02:00", "environmentVariables": { "REACT_APP_AUTH_SERVER_URL": "https://dev.api.nasacademy.com", "REACT_APP_BACKEND_STATIC_DATA_SEVER": "https://static-dev.nasacademy.com", "REACT_APP_BOOKING_SERVER_URL": "https://booking-backend-dev.nasacademy.com", "REACT_APP_COURSE_ASSET_BASE_URL": "https://d2oi1rqwb0pj00.cloudfront.net/na-portal", "REACT_APP_ENV": "development", "REACT_APP_FB_APP_ID": "774878856488964", "REACT_APP_GOOGLE_ANALYTICS_ID": "UA-173470066-2", "REACT_APP_GOOGLE_CLIENT_ID": "656317264365-16monjge9otbgoneq64niqt2jq67bnaa.apps.googleusercontent.com", "REACT_APP_GTM_ID": "GTM-5FKJRPS", "REACT_APP_MAIN_WEBSITE_URL": "https://dev.nasacademy.com", "REACT_APP_NAS_ACADEMY_DOMAIN": "https://learn-dev.nasacademy.com", "REACT_APP_PAYMENT_SERVER_URL": "https://main-website-dev.nasacademy.com", "REACT_APP_REDEEM_FORM_LINK": "https://docs.google.com/forms/d/e/1FAIpQLSctIEj5N2HrZSDhLNfOIm7TkC9M_rCOj2llOP2YS8ZVFjAXWg/viewform", "REACT_APP_REFERRAL_BASE_URL": "https://dev.nasacademy.com", "REACT_APP_REFER_FREIND_LINK": "https://nasacademy.com/refer-a-friend", "REACT_APP_SENTRY_DSN_KEY": "https://3cfc33765d0d4053863efbab767c2e32@o384530.ingest.sentry.io/5465848", "REACT_APP_ZOOM_API_KEY": "******************" }, "defaultDomain": "d2sou8fjwjnjyx.amplifyapp.com", "enableBranchAutoBuild": false, ```