JON BONSO AND ADRIAN FORMARAN AWS CERTIFIED SOLUTIONS ARCHITECT ASSOCIATE Tutorials Dojo Study Guide and Cheat Sheets T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran TABLEOFCONTENTS INTRODUCTION 6 AWSCERTIFIEDSOLUTIONSARCHITECTASSOCIATEEXAMOVERVIEW 7 AWSCERTIFIEDSOLUTIONSARCHITECTASSOCIATEEXAM-STUDYGUIDEANDTIPS 11 SAA-C02StudyMaterials 11 CoreAWSServicestoFocusOnfortheSAA-C02Exam 13 CommonExamScenarios 15 ValidateYourKnowledge 18 SomeNotesRegardingYourSAA-C02Exam 25 CLOUDCOMPUTINGBASICS 27 CLOUDCOMPUTINGCONCEPTS 29 AWSBASICS 32 AWSOverview 32 AdvantagesofAWSCloudComputing 32 AWSGlobalInfrastructure 33 AWSSecurityandCompliance 35 AWSPricing 36 AWSWell-ArchitectedFramework-FivePillars 36 BestPracticeswhenArchitectingintheCloud 38 DisasterRecoveryinAWS 43 DeepDiveonAWSServices 44 AmazonEC2 44 ComponentsofanEC2Instance 44 TypesofEC2Instances 45 StoragewithHighestIOPSforEC2Instance 46 InstancePurchasingOptions 47 ComparisonofDifferentTypesofEC2HealthChecks 50 EC2PlacementGroups 51 SecurityGroupsAndNetworkAccessControlLists 51 AmazonEC2AutoScaling 55 HorizontalScalingandVerticalScaling 55 ComponentsofanAWSEC2AutoScalingGroup 56 https://portal.tutorialsdojo.com/ 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran TypesofEC2AutoScalingPolicies 59 EC2AutoScalingLifecycleHooks 68 ConfiguringNotificationsforLifecycleHooks 72 SuspendingandResumingScalingProcesses 77 SomeLimitationstoRememberforAmazonEC2AutoScalingGroup 77 AmazonElasticContainerService 79 AmazonECSContainerInstanceRolevsTaskExecutionRolevsTaskRole 79 ECSNetworkModeComparison 81 ECSTaskPlacementStrategies 87 AmazonElasticKubernetesService 89 RemainCloudAgnosticwithKubernetes 89 AWSLambda 90 ConcurrencyLimits 90 MaximumMemoryAllocationandTimeoutDuration 91 Lambda@EdgeComputing 92 ConnectingYourLambdaFunctionToYourVPC 93 AmazonSimpleStorageService(S3) 94 S3StandardvsS3Standard-IAvsS3OneZone-IAvsS3IntelligentTiering 94 AccessingS3BucketsPubliclyandPrivately 94 AmazonS3BucketFeatures 97 AmazonS3PricingDetails 100 AmazonS3EncryptionMethods 101 AmazonS3Glacier 102 AmazonS3GlaciervsAmazonS3GlacierDeepArchive 102 AWSStorageGateway 103 MovingDataFromAWSStorageGatewaytoAmazonS3Glacier 103 IntegratingAWSStorageGatewaytoanActiveDirectory 104 AmazonElasticBlockStore(EBS) 105 SSDvsHDDTypeVolumes 105 AmazonEBSMulti-AttachFeature 109 AmazonEBSCopySnapshots 111 AmazonElasticFileSystem(EFS) 113 HowToMountAnAmazonEFSFileSystem 113 EFS-to-EFSRegionalDataTransfer 117 AmazonEFSStorageLifecycle 119 AmazonFSx 121 AmazonFSxforLustrevsAmazonFSxforWindowsFileServer 121 https://portal.tutorialsdojo.com/ 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRelationalDatabaseService(RDS) 123 AmazonRDSHighAvailabilityandFaultTolerance 123 AmazonRDSSecurity 124 AmazonAurora 127 AuroraServerlessScaling 127 HighAvailabilityforAmazonAurora 128 AmazonAuroraGlobalDatabaseandReplicas 129 AmazonDynamoDB 131 AmazonDynamoDBTransactions 131 AWSLambdaIntegrationwithAmazonDynamoDBStreams 131 AmazonDynamoDBReplication 133 CachingwithDynamoDBDAX 134 AmazonRedshift 136 AmazonRedshiftHighAvailability,FaultToleranceandDisasterRecovery 136 AmazonRedshiftSpectrum 137 AWSBackup 139 BackupRetentionPeriodTooShort? 139 AmazonVPC 142 Non-VPCServices 142 SecurityGroupvsNACL 143 NATGatewaysandNATInstances 144 NATInstancevsNATGateway 144 VPCPeeringSetup 146 UtilizingTransitGatewayforMulti-VPCConnection 148 AddingCIDRBlockstoyourVPC 148 AmazonRoute53 150 Route53forDNSandDomainRouting 150 DomainRegistration 150 DNSManagement 150 TrafficManagement 152 AvailabilityMonitoring 152 LatencyRoutingvsGeoproximityRoutingvsGeolocationRouting 154 Active-ActiveFailoverandActive-PassiveFailover 156 Route53DNSSEC 158 AWSElasticLoadBalancing 159 AWSELBRequestRoutingAlgorithms 159 ELBIdleTimeout 160 https://portal.tutorialsdojo.com/ 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ELBHealthChecksvsRoute53HealthChecksForTargetHealthMonitoring 161 ApplicationLoadBalancervsNetworkLoadBalancervsClassicLoadBalancervsGatewayLoad Balancer 163 ApplicationLoadBalancerListenerRuleConditions 164 AmazonCloudFront 167 CustomDNSNameswithDedicatedSSLCertificatesforyourCloudFrontDistribution 167 RestrictingContentAccesswithSignedURLsandSignedCookies 170 OriginAccessIdentityinCloudFront 171 HighAvailabilitywithCloudFrontOriginFailover 173 AWSDirectConnect 175 LeveragingAWSDirectConnect 175 HighResiliencyWithAWSDirectConnect 176 AWSGlobalAccelerator 179 ConnectingMultipleALBsinVariousRegions 179 AWSIAM 179 Identity-basedPoliciesandResource-basedPolicies 180 IAMPermissionsBoundary 181 IAMPolicyStructureandConditions 182 IAMPolicyEvaluationLogic 183 AWSKeyManagementService 185 AWSKMSCustomerMasterKey 185 CustomKeyStore 186 AWSKMSCMKKeyRotation 186 AWSWebApplicationFirewall 189 AWSWAFRuleStatementsToFilterWebTraffic 189 AmazonCloudwatch 190 MonitoringAdditionalMetricswiththeCloudwatchAgent 190 CloudwatchAlarmsforTriggeringActions 191 CloudwatchEvents(AmazonEventBridge)forSpecificEventsandRecurringTasks 192 AWSCloudTrail 193 What’sNotMonitoredByDefaultinCloudTrailandHowToStartMonitoringThem 193 ReceivingCloudTrailLogsfromMultipleAccountsandSharingLogsToOtherAccounts 195 AmazonSimpleNotificationService 196 AmazonSNSMessageFiltering 196 AmazonSNSTopicTypes,MessageOrderingandDeduplication 197 InvokeLambdaFunctionsUsingSNSSubscription 198 AmazonSimpleQueueService(AmazonSQS) 201 https://portal.tutorialsdojo.com/ 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran TheDifferentSQSQueues 201 SQSLongPollingandShortPolling 202 ScalingOutEC2InstancesBasedOnSQS 204 AmazonKinesis 205 KinesisScaling,ReshardingandParallelProcessing 205 KinesisDataStreamsvsKinesisDataFirehosevsKinesisDataAnalyticsvsKinesisVideoStreams 205 AWSGlue 206 AWSGlueETLProcess 207 ComparisonofAWSServicesandFeatures 208 AWSCloudTrailvsAmazonCloudWatch 208 AWSDataSyncvsStorageGateway 209 S3TransferAccelerationvsDirectConnectvsVPNvsSnowballEdgevsSnowmobile 210 AmazonEBSvsEC2InstanceStore 214 AmazonS3vsEBSvsEFS 216 AWSGlobalAcceleratorvsAmazonCloudFront 218 InterfaceEndpointvsGatewayEndpointvsGatewayLoadBalancerEndpoint 219 AmazonKinesisvsAmazonSQS 221 LatencyBasedRoutingvsAmazonCloudFront 222 AmazonEFSvs.AmazonFSxforWindowsFileServervs.AmazonFSxforLustre 223 AmazonRDSvsDynamoDB 225 Redis(clustermodeenabledvsdisabled)vsMemcached 227 AWSWAFvsAWSShieldBasicvsAWSShieldAdvanced 228 AWSKMSvsAWSCloudHSM 230 RDSReadReplicavsRDSMulti-AZvsVerticalScalingvsElasticache 231 ScalingDynamoDBRCUvsDynamoDBAccelerator(DAX)vsSecondaryIndexesvsElastiCache 232 FINALREMARKSANDTIPS 234 ABOUTTHEAUTHORS 235 https://portal.tutorialsdojo.com/ 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran INTRODUCTION Asmoreandmorebusinessesmigratetheiron-premisesworkloadstoAmazonWebServices(AWS),the demandforhighlyskilledandcertifiedAWSProfessionalswillcontinuetoriseoverthecomingyearsahead. Companiesarenowleveragingonthepowerofcloudcomputingtosignificantlylowertheiroperatingcosts anddynamicallyscaletheirresourcesbasedondemand. Gonearethedaysofover-provisioningyourresourcesthatturnouttobeunderutilizedovertime.WithAWS, companiescannoweasilyprovisionthenumberofresourcesthattheyactuallyneedandpayonlythe computingresourcestheyconsume.AWShelpscustomerstosignificantlyreduceupfrontcapitalinvestment andreplaceitwithlowervariablecosts.Youcanopttopayyourcloudresourcesusinganon-demandpricing optionwithnolong-termcontractsorup-frontcommitments.Youcaneasilydiscontinueyouron-demand cloudresourcesifyoudon’tneedthemtostopanyrecurringoperationalcosts,therebyreducingyouroperating expenses. Thisflexibilityisn’tavailableinatraditionalon-premisesenvironmentwhereyouhavetomaintainandpayfor theresourcesevenifyouaren’tusingthem.Moreover,companiescansimplylaunchnewAWSresourcesin secondstoscaleandaccommodatethesurgeofincomingrequeststotheirenterpriseapplications.Theseare thefinancialandtechnicalbenefits,andthereasonwhythousandsofcompaniesarehiringskilledIT professionalstomigratetheirworkloadtothecloud.Conversely,thisisalsooneofthereasonswhythereisa demandforcertifiedAWSprofessionals. TheAWSSolutionsArchitectAssociatecertificationhasbeenconsistentlyregardedasoneofthe highest-payingcertificationsintheITIndustrytoday.ThiseBookcontainsessentialinformationabouttheAWS CertifiedSolutionsArchitectAssociateexam,aswellasthetopicsyouhavetoreviewinordertopassit.You willlearnthebasicsoftheAWSGlobalInfrastructureandtherelevantAWSservicesrequiredtobuildahighly availableandfault-tolerantcloudarchitecture. Note:Wetookextracaretocomeupwiththesestudyguidesandcheatsheets,however,thisismeanttobe justasupplementaryresourcewhenpreparingfortheexam.Wehighlyrecommendworkingonh ands-on sessionsandp racticeexamstofurtherexpandyourknowledgeandimproveyourtesttakingskills. https://portal.tutorialsdojo.com/ 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSCERTIFIEDSOLUTIONSARCHITECTASSOCIATEEXAMOVERVIEW In2013,AmazonWebServices(AWS)begantheGlobalCertificationProgramwiththeprimarypurposeof validatingthetechnicalskillsandknowledgeforbuildingsecureandreliablecloud-basedapplicationsusing theAWSplatform.BysuccessfullypassingtheAWSexam,individualscanprovetheirAWSexpertisetotheir currentandfutureemployers.TheAWSCertifiedSolutionsArchitect-AssociateexamwasthefirstAWS certificationthatwaslaunchedfollowedbytheothertworole-basedcertifications:SystemsOperations (SysOps)AdministratorandDeveloperAssociatelaterthatyear. AWShascontinuouslyexpandedthecertificationprogramsincethen,launchingtheProfessionaland Specialty-levelcertificationsthatcovervariousdomainssuchasmachinelearning,dataanalytics,networking, andmanyothers.AsAWSservicescontinuetoevolve,anewandupdatedversionoftheAWScertification examsarereleasedonaregularbasistoreflecttheservicechangesandtoincludenewknowledgeareas. Afteralmost5yearssinceitsinitialrelease,anupdatedversionoftheAWSCertifiedSolutionsArchitect- AssociatecertificationwaslaunchedinFebruary2018withanexamcodeofSAA-C01.Andaftertwoyears,in March2020,AWSreleasedyetanotherversionoftheexam(SAA-C02). ExamDetails TheAWSCertifiedSolutionsArchitect-AssociatecertificationisintendedforITProfessionalswhoperforma SolutionsArchitectorDevOpsroleandhavesubstantialyearsofhands-onexperiencedesigningavailable, cost-efficient,fault-tolerant,andscalabledistributedsystemsontheAWSplatform.Itiscomposedof scenario-basedquestionsthatcanbeeitherinmultiple-choiceormultipleresponseformats.Thefirstquestion typehasonecorrectanswerandthreeincorrectresponses,whilethelatterhastwoormorecorrectresponses outoffiveormoreoptions.Youcantaketheexamfromalocaltestingcenteroronlinefromthecomfortsof yourhome. ExamCode: SAA-C02 ReleaseDate: March2020 Prerequisites: None No.ofQuestions: 65 ScoreRange: 100/1000 Cost: 150USD(Practiceexam:20USD) PassingScore: 720/1000 TimeLimit: 2hours10minutes(130minutes) Format: Scenario-based.Multiplechoice/multipleanswers. DeliveryMethod: Testingcenteroronlineproctoredexam https://portal.tutorialsdojo.com/ 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Don’tbeconfusedifyouseeinyourPearsonVuebookingthatthedurationis140minutessincetheyincluded anadditional10minutesforreadingtheNon-DisclosureAgreement(NDA)atthestartoftheexamandthe surveyattheendofit.IfyoubookedinPSI,theexamdurationtimethatyouwillseeis130minutes. ExamDomains TheAWSCertifiedSolutionsArchitect-Associate(SAA-C02)examhas4differentdomains,eachwith correspondingweightandtopiccoverage.Theexamdomainsareasfollows:D esignResilientArchitectures (30%),D esignHigh-PerformingArchitectures(28%),D esignSecureApplicationsandArchitectures(24%),and DesignCost-OptimizedArchitectures(18%). Domain1:DesignResilientArchitectures(30%) 1.1Designamulti-tierarchitecturesolution 1.2Designhighlyavailableand/orfault-tolerantarchitectures 1.3DesigndecouplingmechanismsusingAWSservices 1.4Chooseappropriateresilientstorage Domain2:DesignHigh-PerformingArchitectures(28%) 2.1Identifyelasticandscalablecomputesolutionsforaworkload 2.2Selecthigh-performingandscalablestoragesolutionsforaworkload 2.3Selecthigh-performingnetworkingsolutionsforaworkload https://portal.tutorialsdojo.com/ 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 2.4Choosehigh-performingdatabasesolutionsforaworkload Domain3:DesignSecureApplicationsandArchitectures(24%) 3.1DesignsecureaccesstoAWSresources 3.2Designsecureapplicationtiers 3.3Selectappropriatedatasecurityoptions Domain4:DesignCost-OptimizedArchitectures(18%) 4.1Identifycost-effectivestoragesolutions 4.2Identifycost-effectivecomputeanddatabaseservices 4.3Designcost-optimizednetworkarchitectures ExamScoringSystem Youcangetascorefrom100to1,000withaminimumpassingscoreof7 20whenyoutaketheAWSCertified SolutionsArchitect-Associateexam.AWSisusingascaledscoringmodeltoequatescoresacrossmultiple examtypesthatmayhavedifferentdifficultylevels.Thecompletescorereportwillbesenttoyoubyemail afterafewdays.Rightafteryoucompletedtheactualexam,you’llimmediatelyseeapassorfailnotification onthetestingscreen.A“ Congratulations!Youhavesuccessfullypassed...”messagewillbeshownifyou passedtheexam. IndividualswhounfortunatelydonotpasstheAWSexammustwait14daysbeforetheyareallowedtoretake theexam.Fortunately,thereisnohardlimitonexamattemptsuntilyoupasstheexam.Takenotethatoneach attempt,thefullregistrationpriceoftheAWSexammustbepaid. Within5businessdaysofcompletingyourexam,yourAWSCertificationAccountwillhavearecordofyour completeexamresults.Thescorereportcontainsatableofyourperformanceateachsection/domain,which indicateswhetheryoumetthecompetencylevelrequiredforthesedomainsornot.AWSisusinga compensatoryscoringmodel,whichmeansthatyoudonotnecessarilyneedtopasseachandeveryindividual section,onlytheoverallexamination.Eachsectionhasaspecificscoreweightingthattranslatestothenumber ofquestions;hence,somesectionshavemorequestionsthanothers.TheScorePerformancetablehighlights yourstrengthsandweaknessesthatyouneedtoimproveon. https://portal.tutorialsdojo.com/ 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ExamBenefits IfyousuccessfullypassedanyAWSexam,youwillbeeligibleforthefollowingbenefits: ● ExamDiscount-You’llgeta50%discountvoucherthatyoucanapplyforyourrecertificationorany otherexamyouplantopursue.Toaccessyourdiscountvouchercode,gotothe“Benefits”sectionof yourAWSCertificationAccount,andapplythevoucherwhenyouregisterforyournextexam. ● FreePracticeExam-Tohelpyouprepareforyournextexam,AWSprovidesanothervoucherthatyou canusetotakeanyofficialAWSpracticeexamforfree.Youcanaccessyourvouchercodefromthe “Benefits”sectionofyourAWSCertificationAccount. ● AWSCertifiedStore-AllAWScertifiedprofessionalswillbegivenaccesstoexclusiveAWSCertified merchandise.Youcangetyourstoreaccessfromthe“Benefits”sectionofyourAWSCertification Account. ● CertificationDigitalBadges -Youcanshowcaseyourachievementstoyourcolleaguesandemployers withdigitalbadgesonyouremailsignatures,Linkedinprofile,oronyoursocialmediaaccounts.You canalsoshowyourDigitalBadgetogainexclusiveaccesstoCertificationLoungesatAWSre:Invent, regionalAppreciationReceptions,andselectAWSSummitevents.Toviewyourbadges,simplygoto the“DigitalBadges”sectionofyourAWSCertificationAccount. ● EligibilitytojoinAWSIQ-W iththeAWSIQprogram,youcanmonetizeyourAWSskillsonlineby providinghands-onassistancetocustomersaroundtheglobe.AWSIQwillhelpyoustaysharpandbe well-versedonvariousAWStechnologies.Youcanworkatthecomfortsofyourhomeanddecidewhen orwhereyouwanttowork.InterestedindividualsmustbebasedintheUS,haveanAssociate, Professional,orSpecialtyAWSCertificationandbeover18ofage. YoucanvisittheofficialAWSCertificationFAQpagetoviewthefrequentlyaskedquestionsaboutgettingAWS CertifiedandotherinformationabouttheAWSCertification:h ttps://aws.amazon.com/certification/faqs/. https://portal.tutorialsdojo.com/ 1 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSCERTIFIEDSOLUTIONSARCHITECTASSOCIATEEXAM-STUDY GUIDEANDTIPS TheAWSCertifiedSolutionsArchitectAssociateSAA-C02exam,orSAAforshort,isoneofthemostsought aftercertificationsintheCloudindustry.ThiscertificationatteststoyourknowledgeoftheAWSCloudand buildingawell-architectedinfrastructureinAWS. AsaSolutionsArchitect,itisyourresponsibilitytobefamiliarwiththeservicesthatmeetyourcustomer requirements.Asidefromthat,youshouldalsohavetheknowledgetocreateanefficient,secure,reliable,fault tolerant,andcost-effectiveinfrastructureoutoftheseservices.YourAWSSAAssociateexamwillbebased uponthesetopics. Whitepapers,FAQs,andtheAWSDocumentationwillbeyourprimarystudymaterialsforthisexam.Experience inbuildingsystemswillalsobehelpful,sincetheexamconsistsofmultiplescenariotypequestions.Youcan learnmoredetailsonyourexamthroughtheofficialSAA-C02ExamGuidehere.Doaquickreadonittobe awareofhowtoprepareandwhattoexpectontheexamitself. SAA-C02StudyMaterials FortheAWSCertifiedSolutionsArchitectAssociateexam,werecommendgoingthroughtheFREEAWSExam Readinessvideocourse,officialAWSsamplequestions,AWSwhitepapers,FAQs,AWScheatsheets,andAWS practiceexams. https://portal.tutorialsdojo.com/ 1 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Werecommendthatyoureadthefollowingwhitepapersforyourreview.Theycontainalotofconceptsand strategieswhichareimportantforyoutoknow. Werecommendthatyoureadthefollowingwhitepapersforyourreview.Theycontainalotofconceptsand strategieswhichareimportantforyoutoknow. 1. OverviewofAmazonWebServices:ThispaperprovidesagoodintroductiononCloudComputing,the AWSGlobalInfrastructure,andtheavailableAWSServices.Readingthiswhitepaperbeforeproceeding totheotherwhitepapersbelowwillclearupmanyjargonsfoundonthesucceedingmaterials. 2. AWSWellArchitectedFramework:Thispaperisthemostimportantonetoread.ItdiscussestheFive PillarsofaWellArchitectedFramework,witheachpillarhavingawhitepaperofitsown,andcanallbe foundonthisw ebpage.Besuretounderstandwellarchitectedframeworknotjustconceptually,but alsoinactualpracticeandapplication. 3. AWSBestPractices:Thispaperteachesyouthebestpracticestoperformwhenrunningyour applicationsinAWS.ItpointsouttheadvantagesofCloudovertraditionalhostinginfrastructuresand howyoucanimplementthemtokeepyourapplicationsupandrunningallthetime.TheSAAssociate examwillincludequestionsthatwilltestyourknowledgeonthebestpracticesthroughdifferent examplescenarios. 4. UsingAmazonWebServicesforDisasterRecovery:Thispaperexplainsthedifferenttypesofdisaster recoveryplansthatyoucanperforminAWS.ItisyourresponsibilityasaSolutionsArchitecttomitigate anypotentialdowntimewhendisasterstrikes.DependingonyourRPOandRTO,aproperdisaster recoveryplanwillbeadecidingfactorbetweenbusinesscontinuityandrevenueloss. https://portal.tutorialsdojo.com/ 1 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AdditionalSAA-C02Whitepapers 1. AWSSecurityPractices:ThispapersupplementsyourstudyontheAWSservicesandfeaturessuchas IAM,SecurityGroups,nACLs,etc.Youshouldreadthispapersincesecurityspecificquestions occasionallypopupintheexam. 2. AWSStorageServicesOverview: ThispapersupplementsyourstudyonthedifferentAWSStorage optionssuchasS3,EBS,EFS,Glacier,etc.Itcontainsagooddetailofinformationandcomparisonfor eachstorageservice,whichiscrucialinknowingthebestservicetouseforasituation. 3. BuildingFault-TolerantApplicationsonAWS:Thispaperdiscussesthemanywaysyoucanensureyour applicationsarefault-tolerantinAWS.Italsocontainsmultiplescenarioswherethepracticesare appliedandwhichAWSserviceswerecrucialforthescenario. Fortheexamversion(SAA-C02),youshouldalsoknowthefollowingservices: ● AWSGlobalAccelerator ● ElasticFabricAdapter(EFA) ● ElasticNetworkAdapter(ENA) ● AWSParallelCluster ● AmazonFSx ● AWSDataSync ● AWSDirectoryService ● HighPerformanceComputing ● AuroraServerless ...plusafewmoreservicesandnewSAA-C02topicsthatwehaverecentlyaddedtoourA WSCertified SolutionsArchitectAssociatePracticeExams. Formoreinformation,checkouttheSAA-C02officialexamguideh ere. CoreAWSServicestoFocusOnfortheSAA-C02Exam 1. EC2-AsthemostfundamentalcomputeserviceofferedbyAWS,youshouldknowaboutEC2inside out. 2. Lambda-Lambdaisthecommonserviceusedforserverlessapplications.Studyhowitisintegrated withotherAWSservicestobuildafullstackserverlessapp. 3. ElasticLoadBalancer-Loadbalancingisveryimportantforahighlyavailablesystem.Studyaboutthe differenttypesofELBs,andthefeatureseachofthemsupports. 4. AutoScaling-StudywhatservicesinAWScanbeautoscaled,whattriggersscaling,andhowauto scalingincreases/decreasesthenumberofinstances. 5. ElasticBlockStore-AstheprimarystoragesolutionofEC2,studyonthetypesofEBSvolumes available.Alsostudyhowtosecure,backupandrestoreEBSvolumes. 6. S3/Glacier-AWSoffersmanytypesofS3storagedependingonyourneeds.Studywhatthesetypes areandwhatdiffersbetweenthem.AlsoreviewonthecapabilitiesofS3suchashostingastatic https://portal.tutorialsdojo.com/ 1 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran website,securingaccesstoobjectsusingpolicies,lifecyclepolicies,etc.LearnasmuchaboutS3as youcan. 7. StorageGateway-ThereareoccasionalquestionsaboutStorageGatewayintheexam.Youshould understandwhenandwhichtypeofStorageGatewayshouldbeusedcomparedtousingserviceslike S3orEBS.YoushouldalsoknowtheusecasesanddifferencesbetweenDataSyncandStorage Gateway. 8. EFS-EFSisaservicehighlyassociatedwithEC2,muchlikeEBS.UnderstandwhentouseEFS, comparedtousingS3,EBSorinstancestore.ExamquestionsinvolvingEFSusuallyaskthetradeoff betweencostandefficiencyoftheservicecomparedtootherstorageservices. 9. RDS/Aurora-KnowhoweachRDSdatabasediffersfromoneanother,andhowtheyaredifferentfrom Aurora.DeterminewhatmakesAuroraunique,andwhenitshouldbepreferredfromotherdatabases(in termsoffunction,speed,cost,etc).Learnaboutparametergroups,optiongroups,andsubnetgroups. 10. DynamoDB-TheexamincludeslotsofDynamoDBquestions,soreadasmuchaboutthisserviceas youcan.ConsiderhowDynamoDBcomparestoRDS,ElasticacheandRedshift.Thisserviceisalso commonlyusedforserverlessapplicationsalongwithLambda. 11. Elasticache-FamiliarizeyourselfwithElasticacheredisanditsfunctions.Determinetheareas/services whereyoucanplaceacachingmechanismtoimprovedatathroughput,suchasmanagingsession stateofanELB,optimizingRDSinstances,etc. 12. VPC/NACL/SecurityGroups-StudyeveryservicethatisusedtocreateaVPC(subnets,routetables, internetgateways,natgateways,VPNgateways,etc).Also,reviewonthedifferencesofnetworkaccess controllistsandsecuritygroups,andduringwhichsituationstheyareapplied. 13. Route53-StudythedifferenttypesofrecordsinRoute53.Studyalsothedifferentroutingpolicies. Knowwhathostedzonesanddomainsare. 14. IAM-ServicessuchasIAMUsers,Groups,PoliciesandRolesarethemostimportanttolearn.Study howIAMintegrateswithotherservicesandhowitsecuresyourapplicationthroughdifferentpolicies. AlsoreadonthebestpracticeswhenusingIAM. 15. CloudWatch-StudyhowmonitoringisdoneinAWSandwhattypesofmetricsaresenttoCloudWatch. AlsoreaduponCloudwatchLogs,CloudWatchAlarms,andthecustommetricsmadeavailablewith CloudWatchAgent. 16. CloudTrail-FamiliarizeyourselfwithhowCloudTrailworks,andwhatkindsoflogsitstoresas comparedtoCloudWatchLogs. 17. Kinesis-ReadaboutKinesisshardingandKinesisDataStreams.Haveahighlevelunderstandingof howeachtypeofKinesisStreamworks. 18. CloudFront-StudyhowCloudFronthelpsspeedupwebsites.KnowwhatcontentsourcesCloudFront canservefrom.AlsocheckthekindsofcertificatesCloudFrontaccepts. 19. SQS-GatherinfoonwhySQSishelpfulindecouplingsystems.Studyhowmessagesinthequeuesare beingmanaged(standardqueues,FIFOqueues,deadletterqueues).Knowthedifferencesbetween SQS,SNS,SES,andAmazonMQ. 20. SNS-StudythefunctionofSNSandwhatservicescanbeintegratedwithit.Alsobefamiliarwiththe supportedrecipientsofSNSnotifications. https://portal.tutorialsdojo.com/ 1 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 21. SWF/CloudFormation/OpsWorks-Studyhowtheseservicesfunction.Differentiatethecapabilities andusecasesofeachofthem.Haveahighlevelunderstandingofthekindsofscenariostheyare usuallyusedin. Basedonourexamexperience,youshouldalsoknowwhentousethefollowing: ● AWSDataSyncvsStorageGateway ● FSx(ColdandHotStorage) ● Cross-RegionReadReplicasvs.Multi-AzRDS-whichdatabaseprovideshigh-availability ● AmazonObjectkeyvsObjectMetadata ● DirectConnectvs.Site-to-SiteVPN ● AWSConfigvsAWSCloudTrail ● SecurityGroupvsNACL ● NATGatewayvsNATInstance ● Geolocationroutingpolicyvs.GeoproximityroutingpolicyonRoute53 TheAWSDocumentationandFAQswillbeyourprimarysourceofinformation.YoucanalsovisitT utorials Dojo’sAWSCheatSheetstogainaccesstoarepositoryofthoroughcontentonthedifferentAWSservices mentionedabove.Lastly,tryouttheseservicesyourselfbysigningupinAWSandperformingsomelab exercises.Experiencingthemonyourownwillhelpyougreatlyinrememberingwhateachserviceiscapable of. Alsocheckoutthisarticle:T op5FREEAWSReviewMaterials. CommonExamScenarios Scenario Solution Domain1 :D esignR esilientA rchitectures SetupasynchronousdatareplicationtoanotherRDS DBinstancehostedinanotherAWSRegion CreateaReadReplica Aparallelfilesystemfor“hot”(frequentlyaccessed) data AmazonFSxForLustre Implementsynchronousdatareplicationacross AvailabilityZoneswithautomaticfailoverinAmazon RDS. EnableMulti-AZdeploymentinAmazonRDS. Needsastorageservicetohost“cold”(infrequently accessed)data AmazonS3Glacier https://portal.tutorialsdojo.com/ 1 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Setuparelationaldatabaseandadisasterrecovery planwithanRPOof1secondandRTOoflessthan1 minute. UseAmazonAuroraGlobalDatabase. Monitordatabasemetricsandsendemail notificationsifaspecificthresholdhasbeen breached. CreateanSNStopicandaddthetopicinthe CloudWatchalarm. SetupaDNSfailovertoastaticwebsite. UseRoute53withthefailoveroptiontoastaticS3 websitebucketorCloudFrontdistribution. ImplementanautomatedbackupforalltheEBS Volumes. UseAmazonDataLifecycleManagertoautomate thecreationofEBSsnapshots. MonitortheavailableswapspaceofyourEC2 instances InstalltheCloudWatchagentandmonitorthe SwapUtilizationmetric. Implementa90-daybackupretentionpolicyon AmazonAurora. UseAWSBackup Domain2 :D esignH igh-PerformingA rchitectures Implementafanoutmessaging. CreateanSNStopicwithamessagefilteringpolicy andconfiguremultipleSQSqueuestosubscribeto thetopic. Adatabasethathasareadreplicationlatencyofless than1second. UseAmazonAurorawithcross-regionreplicas. AspecifictypeofElasticLoadBalancerthatusesUDP UseNetworkLoadBalancerforTCP/UDPprotocols. astheprotocolforcommunicationbetweenclients andthousandsofgameserversaroundtheworld. Monitorthememoryanddiskspaceutilizationofan EC2instance. InstallAmazonCloudWatchagentontheinstance. RetrieveasubsetofdatafromalargeCSVfilestored intheS3bucket. PerformanS3Selectoperationbasedonthe bucket'snameandobject'skey. Upload1TBfiletoanS3bucket. UseAmazonS3multipartuploadAPItouploadlarge objectsinparts. Improvetheperformanceoftheapplicationby reducingtheresponsetimesfrommillisecondsto microseconds. UseAmazonDynamoDBAccelerator(DAX) https://portal.tutorialsdojo.com/ 1 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran RetrievetheinstanceID,publickeys,andpublicIP addressofanEC2instance. Accesstheurl: http://169.254.169.254/latest/meta-data/usingthe EC2instance. Routetheinternettraffictotheresourcesbasedonthe UseRoute53GeolocationRoutingpolicy. locationoftheuser. Domain3 :D esignS ecureA pplicationsa ndA rchitectures EncryptEBSvolumesrestoredfromtheunencrypted EBSsnapshots Copythesnapshotandenableencryptionwitha newsymmetricCMKwhilecreatinganEBSvolume usingthesnapshot. Limitthemaximumnumberofrequestsfromasingle IPaddress. Createarate-basedruleinAWSWAFandsetthe ratelimit. Grantthebucketownerfullaccesstoalluploaded objectsintheS3bucket. Createabucketpolicythatrequiresuserstosetthe object'sACLtobucket-owner-full-control. ProtectobjectsintheS3bucketfromaccidental deletionoroverwrite. EnableversioningandMFAdelete. Accessresourcesonbothon-premisesandAWS SetupSAML2.0-BasedFederationbyusinga usingon-premisescredentialsthatarestoredinActive MicrosoftActiveDirectoryFederationService. Directory. SecurethesensitivedatastoredinEBSvolumes EnableEBSEncryption Ensurethatthedata-in-transitanddata-at-restofthe AmazonS3bucketisalwaysencrypted EnableAmazonS3Server-SideoruseClient-Side Encryption Securethewebapplicationbyallowingmultiple domainstoserveSSLtrafficoverthesameIP address. UseAWSCertificateManagertogenerateanSSL certificate.Associatethecertificatetothe CloudFrontdistributionandenableServerName Indication(SNI). ControltheaccessforseveralS3bucketsbyusinga CreateanendpointpolicyfortrustedS3buckets. gatewayendpointtoallowaccesstotrustedbuckets. Enforcestrictcompliancebytrackingallthe configurationchangesmadetoanyAWSservices. SetuparuleinAWSConfigtoidentifycompliant andnon-compliantservices. Provideshort-livedaccesstokensthatactsas UseAWSSecurityTokenService temporarysecuritycredentialstoallowaccesstoAWS resources. https://portal.tutorialsdojo.com/ 1 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Encryptandrotateallthedatabasecredentials,API keys,andothersecretsonaregularbasis. UseAWSSecretsManagerandenableautomatic rotationofcredentials. Domain4 :D esignC ost-OptimizedA rchitectures Acost-effectivesolutionforover-provisioningof resources. ConfigureatargettrackingscalinginASG. Theapplicationdataisstoredinatapebackup UseAWSStorageGatewaytobackupthedata solution.Thebackupdatamustbepreservedforupto directlytoAmazonS3GlacierDeepArchive. 10years. Acceleratethetransferofhistoricalrecordsfrom on-premisestoAWSovertheInternetina cost-effectivemanner. UseAWSDataSyncandselectAmazonS3Glacier DeepArchiveasthedestination. Globallydeliverthestaticcontentsandmediafilesto customersaroundtheworldwithlowlatency. StorethefilesinAmazonS3andcreatea CloudFrontdistribution.SelecttheS3bucketasthe origin. AnapplicationmustbehostedtotwoEC2instances andshouldcontinuouslyrunforthreeyears.TheCPU utilizationoftheEC2instancesisexpectedtobe stableandpredictable. DeploytheapplicationtoaReservedinstance. Implementacost-effectivesolutionforS3objectsthat CreateanAmazonS3lifecyclepolicytomovethe areaccessedlessfrequently. objectstoAmazonS3Standard-IA. MinimizethedatatransfercostsbetweentwoEC2 instances. DeploytheEC2instancesinthesameRegion. ImporttheSSL/TLScertificateoftheapplication. ImportthecertificateintoAWSCertificateManager oruploadittoAWSIAM. ValidateYourKnowledge Whenyouarefeelingconfidentwithyourreview,itisbesttovalidateyourknowledgethroughsampleexams. Youcantaket hispracticeexamfromAWSforfreeasadditionalmaterial,butdonotexpectyourrealexamto beonthesamelevelofdifficultyasthispracticeexamontheAWSwebsite.T utorialsDojooffersaveryuseful andwell-reviewedsetofpracticetestsforAWSSolutionsArchitectAssociateSAA-C02takersh ere.Eachtest containsuniquequestionsthatwillsurelyhelpverifyifyouhavemissedoutonanythingimportantthatmight appearonyourexam.YoucanpairourpracticeexamswiththisstudyguideeBookt ofurtherhelpinyourexam preparations. https://portal.tutorialsdojo.com/ 1 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran IfyouhavescoredwellontheT utorialsDojoAWSCertifiedSolutionsArchitectAssociatepracticetestsand youthinkyouareready,thengoearnyourcertificationwithyourheadheldhigh.Ifyouthinkyouarelackingin certainareas,bettergoreviewthemagain,andtakenoteofanyhintsinthequestionsthatwillhelpyouselect thecorrectanswers.Ifyouarenotthatconfidentthatyou’llpass,thenitwouldbebesttorescheduleyour examtoanotherday,andtakeyourtimepreparingforit.Intheend,theeffortsyouhaveputinforthiswill surelyrewardyou. SampleSAA-C02PracticeTestQuestions: Question1 Acompanyhostedane-commercewebsiteonanAutoScalinggroupofEC2instancesbehindanApplication LoadBalancer.TheSolutionsArchitectnoticedthatthewebsiteisreceivingalargenumberofillegitimate externalrequestsfrommultiplesystemswithIPaddressesthatconstantlychange.Toresolvetheperformance issues,theSolutionsArchitectmustimplementasolutionthatwouldblocktheillegitimaterequestswith minimalimpactonlegitimatetraffic. https://portal.tutorialsdojo.com/ 1 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Whichofthefollowingoptionsfulfillsthisrequirement? 1. CreatearegularruleinAWSWAFandassociatethewebACLtoanApplicationLoadBalancer. 2. CreateacustomnetworkACLandassociateitwiththesubnetoftheApplicationLoadBalancerto blocktheoffendingrequests. 3. Createarate-basedruleinAWSWAFandassociatethewebACLtoanApplicationLoadBalancer. 4. CreateacustomruleinthesecuritygroupoftheApplicationLoadBalancertoblocktheoffending requests. CorrectAnswer:3 AWSWAFistightlyintegratedwithAmazonCloudFront,theApplicationLoadBalancer(ALB),AmazonAPI Gateway,andAWSAppSync–servicesthatAWScustomerscommonlyusetodelivercontentfortheir websitesandapplications.WhenyouuseAWSWAFonAmazonCloudFront,yourrulesruninallAWSEdge Locations,locatedaroundtheworldclosetoyourend-users.Thismeanssecuritydoesn’tcomeattheexpense ofperformance.Blockedrequestsarestoppedbeforetheyreachyourwebservers.WhenyouuseAWSWAFon regionalservices,suchasApplicationLoadBalancer,AmazonAPIGateway,andAWSAppSync,yourrulesrun intheregionandcanbeusedtoprotectInternet-facingresourcesaswellasinternalresources. https://portal.tutorialsdojo.com/ 2 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Arate-basedruletrackstherateofrequestsforeachoriginatingIPaddressandtriggerstheruleactiononIPs withratesthatgooveralimit.Yousetthelimitasthenumberofrequestsper5-minutetimespan.Youcanuse thistypeofruletoputatemporaryblockonrequestsfromanIPaddressthat'ssendingexcessiverequests. Basedonthegivenscenario,therequirementistolimitthenumberofrequestsfromtheillegitimaterequests withoutaffectingthegenuinerequests.Toaccomplishthisrequirement,youcanuseAWSWAFwebACL. TherearetwotypesofrulesincreatingyourownwebACLrule:regularandrate-basedrules.Youneedto selectthelattertoaddaratelimittoyourwebACL.AftercreatingthewebACL,youcanassociateitwithALB. Whentheruleactiontriggers,AWSWAFappliestheactiontoadditionalrequestsfromtheIPaddressuntilthe requestratefallsbelowthelimit. https://portal.tutorialsdojo.com/ 2 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Hence,thecorrectansweris:C reatearate-basedruleinAWSWAFandassociatethewebACLtoan ApplicationLoadBalancer. Theoptionthatsays:CreatearegularruleinAWSWAFandassociatethewebACLtoanApplicationLoad Balancerisincorrectbecausearegularruleonlymatchesthestatementdefinedintherule.Ifyouneedtoadd aratelimittoyourrule,youshouldcreatearate-basedrule. Theoptionthatsays:CreateacustomnetworkACLandassociateitwiththesubnetoftheApplicationLoad Balancertoblocktheoffendingrequestsisincorrect.AlthoughNACLscanhelpyoublockincomingtraffic,this optionwouldn'tbeabletolimitthenumberofrequestsfromasingleIPaddressthatisdynamicallychanging. Theoptionthatsays:CreateacustomruleinthesecuritygroupoftheApplicationLoadBalancertoblockthe offendingrequestsisincorrectbecausethesecuritygroupcanonlyallowincomingtraffic.Rememberthatyou can'tdenytrafficusingsecuritygroups.Inaddition,itisnotcapableoflimitingtherateoftraffictoyour applicationunlikeAWSWAF. References: https://docs.aws.amazon.com/waf/latest/developerguide/waf-rule-statement-type-rate-based.html https://aws.amazon.com/waf/faqs/ CheckoutthisAWSWAFCheatSheet: https://tutorialsdojo.com/aws-waf/ Question2 AnAI-poweredForextradingapplicationconsumesthousandsofdatasetstotrainitsmachinelearningmodel. Theapplication’sworkloadrequiresahigh-performance,parallelhotstoragetoprocessthetrainingdatasets concurrently.Italsoneedscost-effectivecoldstoragetoarchivethosedatasetsthatyieldlowprofit. WhichofthefollowingAmazonstorageservicesshouldthedeveloperuse? 1. UseAmazonFSxForLustreandAmazonEBSProvisionedIOPSSSD(io1)volumesforhotandcold storagerespectively. 2. UseAmazonFSxForLustreandAmazonS3forhotandcoldstoragerespectively. 3. UseAmazonElasticFileSystemandAmazonS3forhotandcoldstoragerespectively. 4. UseAmazonFSxForWindowsFileServerandAmazonS3forhotandcoldstoragerespectively. CorrectAnswer:2 https://portal.tutorialsdojo.com/ 2 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Hotstoragereferstothestoragethatkeepsfrequentlyaccesseddata(hotdata).W armstoragereferstothe storagethatkeepslessfrequentlyaccesseddata(warmdata).C oldstoragereferstothestoragethatkeeps rarelyaccesseddata(colddata).Intermsofpricing,thecolderthedata,thecheaperitistostore,andthe costlieritistoaccesswhenneeded. AmazonFSxForLustreisahigh-performancefilesystemforfastprocessingofworkloads.Lustreisapopular open-sourceparallelfilesystemwhichstoresdataacrossmultiplenetworkfileserverstomaximize performanceandreducebottlenecks. AmazonFSxforWindowsFileServerisafullymanagedMicrosoftWindowsfilesystemwithfullsupportfor theSMBprotocol,WindowsNTFS,MicrosoftActiveDirectory(AD)Integration. AmazonElasticFileSystemisafully-managedfilestorageservicethatmakesiteasytosetupandscalefile storageintheAmazonCloud. AmazonS3isa nobjectstorageservicethatoffersindustry-leadingscalability,dataavailability,security,and performance.S3offersdifferentstoragetiersfordifferentusecases(frequentlyaccesseddata,infrequently accesseddata,andrarelyaccesseddata). Thequestionhastworequirements: 1. High-performance,parallelhotstoragetoprocessthetrainingdatasetsconcurrently. 2. Cost-effectivecoldstoragetokeepthearchiveddatasetsthatareaccessedinfrequently https://portal.tutorialsdojo.com/ 2 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Inthiscase,wecanuseA mazonFSxForLustref orthefirstrequirement,asitprovidesahigh-performance, parallelfilesystemforhotdata.Onthesecondrequirement,wecanuseAmazonS3forstoringthecolddata. AmazonS3supportsacoldstoragesystemviaAmazonS3Glacier/GlacierDeepArchive. Hence,thecorrectansweris:U seAmazonFSxForLustreandAmazonS3forhotandcoldstorage respectively. UsingAmazonFSxForLustreandAmazonEBSProvisionedIOPSSSD(io1)volumesforhotandcoldstorage respectivelyisincorrectbecausetheProvisionedIOPSSSD(io1)volumesaredesignedasahotstorageto meettheneedsofI/O-intensiveworkloads.EBShasastorageoptioncalledColdHDDbutitisnotusedfor storingcolddata.Inaddition,EBSColdHDDisalotmoreexpensivethanusingAmazonS3Glacier/Glacier DeepArchive. UsingAmazonElasticFileSystemandAmazonS3forhotandcoldstoragerespectivelyisincorrectbecause althoughEFSsupportsconcurrentaccesstodata,itdoesnothavethehigh-performanceabilitythatisrequired formachinelearningworkloads. UsingAmazonFSxForWindowsFileServerandAmazonS3forhotandcoldstoragerespectivelyisincorrect becauseAmazonFSxForWindowsFileServerdoesnothaveaparallelfilesystem,unlikeLustre. References: https://aws.amazon.com/fsx/ https://docs.aws.amazon.com/whitepapers/latest/cost-optimization-storage-optimization/aws-storage-servic es.html https://aws.amazon.com/blogs/startups/picking-the-right-data-store-for-your-workload/ CheckoutthisAmazonFSxCheatSheet: https://tutorialsdojo.com/amazon-fsx/ Clickh ereformoreA WSCertifiedSolutionsArchitectAssociatepracticeexamquestions. CheckoutourotherAWSpracticetestcoursesh ere: https://portal.tutorialsdojo.com/ 2 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AdditionalSAA-C02TrainingMaterials:HighQualityVideoCoursesfortheAWSCertifiedSolutionsArchitect AssociateExam Thereareafewtop-ratedAWSCertifiedSolutionsArchitectAssociateSAA-C02videocoursesthatyoucan checkoutaswell,whichcancomplementyourexampreparationsespeciallyifyouarethetypeofpersonwho canlearnbetterthroughvisualcoursesinsteadofreadinglongwhitepapers: 1. AWSCertifiedSolutionsArchitect-AssociatebyAdrianCantrill 2. AWSCertifiedSolutionsArchitect-AssociatebyDolfinEd Basedonthefeedbackofthousandsofourstudentsino urpracticetestcourse,thecombinationofanyof thesevideocoursesplusourpracticetestsandthisstudyguideeBookw ereenoughtopasstheexamand evengetagoodscore. SomeNotesRegardingYourSAA-C02Exam TheAWSSolutionsArchitectAssociate(SAA-C02)examlovestoendquestionsthataskforhighlyavailableor cost-effectivesolutions.Besuretounderstandthechoicesprovidedtoyou,andverifythattheyhavecorrect details.Somechoicesareverymisleadingsuchthatitseemsitisthemostappropriateanswertothequestion, butcontainsanincorrectdetailofsomeservice. Whenunsureofwhichoptionsarecorrectinamulti-selectquestion,trytoeliminatesomeofthechoicesthat youbelievearefalse.Thiswillhelpnarrowdownthefeasibleanswerstothatquestion.Thesamegoesfor multiplechoicetypequestions.Beextracarefulaswellwhenselectingthenumberofanswersyousubmit. Checkoutthetipsmentionedinthisa rticleformoreinformation. Asmentionedinthisreview,youshouldbeabletodifferentiateservicesthatbelonginonecategorywithone another.Commoncomparisonsinclude: ● EC2vsECSvsLambda ● S3vsEBSvsEFS ● CloudFormationvsOpsWorksvsElasticBeanstalk ● SQSvsSNSvsSESvsMQ ● SecurityGroupvsnACLs ● ThedifferentS3storagetypesvsGlacier ● RDSvsDynamoDBvsElasticache ● RDSenginesvsAurora TheT utorialsDojoComparisonofAWSServicescontainsexcellentcheatsheetscomparingtheseseemingly similarserviceswhicharecrucialtosolvingthetrickyscenario-basedquestionsintheactualexam.By knowingeachservice’scapabilitiesandusecases,youcanconsiderthesetypesofquestionsalready half-solved. https://portal.tutorialsdojo.com/ 2 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Lastly,beonthelookoutfor“keyterms”thatwillhelpyourealizetheanswerfaster.Wordssuchasmillisecond latency,serverless,managed,highlyavailable,mostcosteffective,faulttolerant,mobile,streaming,object storage,archival,polling,pushnotifications,etcarecommonlyseenintheexam.Timemanagementisvery importantwhentakingAWScertificationexams,sobesuretomonitorthetimeyouconsumeforeach question. https://portal.tutorialsdojo.com/ 2 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran CLOUDCOMPUTINGBASICS Cloudcomputingisapieceoftechnologythattheindustryhasembracedtobeastrongdriverofinnovation. Havingresourcesavailableatyourfingertipsmakesworkjustwayeasierandfastertoaccomplish.With virtuallyunlimitedcomputepowerandstoragethatonecanprovisionon-demandfromanywherewithinternet access,companiescanshifttheirfocustodeliveringtheirproductsandservicestotheircustomers,andreach theirhighestpotential.Ratherthanowningtheseinfrastructures,theycanrentthemasaserviceandpayonly forwhattheyconsume. Cloudcomputingallowscompaniesandmerchantstocreateapredictableandcontrollablebudgetplanthat theycanallocateandmaximizeinanywaytheyseefit.Bestofall,asmorepeopleusethecloud,themorethe costofusingcloudservicesdrops,thankstoeconomiesofscale. Theconceptofcloudcomputinghasbeenthereforquitealongtimealready,butithasonlygainedtraction recentlywhenmoreandmorecompaniesbegantoadoptthesecloudproviderssuchasAmazonWeb Services.Itisnotasecretthatitwastoughtobuildsuchlargescalesofinfrastructureandgainthetrustof customerstoruntheirapplicationsonthesesharedspaces.Onlyin2006didAmazonWebServices(AWS) beginofferingITinfrastructureservicestobusinessesintheformofwebservices,whichisnowknownas cloudcomputing.Eventhoughthecloudproviderisstillfairlyyoung,AWShasbeenaninitiatorandaconstant leaderindeliveringwhatcloudcomputingpromisestoitscustomers–fast,cheapandreliableinfrastructure andsoftwareservices. Servicesinthecloudcanbecategorizedintodifferentmodelsdependingonhowtheywork.Themost commonmodelsinclude: 1. IaaS–whichstandsfor“infrastructure-as-a-service”.Thesecloudcomputingservicesarethe counterpartofpurchasingyourownhardwareon-premises,minusthepurchasingpart.Yourentthem fromthecloudproviderandusethemasiftheywereyourowncomputeandstoragedevices. 2. PaaS–whichstandsfor“platform-as-a-service”.TheseservicesareabitsimilarwithIaaS,butoffer moreutilityandconvenienceforthecustomer.Oneexampleisawebhostingservice,whereyouwon’t needtoworryabouttheunderlyinghardwareyourwebsiteisrunningon,soyoucanfocusonyour websitedeploymentandmanagementinstead. 3. SaaS–whichstandsfor“software-as-a-service”.Theseservicestotallyremovetheinfrastructurepart fromtheequation.Youusetheseservicesaccordingtothefeaturesandutilitytheyoffertoyou.Agood exampleisemail. Thereareothermodelsthatyoumightencounterhereandthere,suchasDBaaS,whichmeans “database-as-a-service,butforthesakeofthisstudyguide,wewillbefocusingprimarilyonthethreeabove. Aswitheverypieceoftechnology,thereareprosandconstousingcloudcomputing.C loudcomputingisnot foreveryone.Itisnotalwaysthecasethatmovingtothecloudlowersyouroverallexpenses,orgivesyouthat https://portal.tutorialsdojo.com/ 2 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran competitiveedgeagainstyourcompetitors.Ittakescarefulplanningforonetocommittothecloud.Youmight rashlyboardontothecloudspace,onlytorealizelaterthatitisnotworkingoutforyoufinanciallyand functionally.Movingoutofthecloudcanbeasharda ndasexpensivea smovingintothecloud.Therefore,you mustproperlyevaluatethebenefitsthatyouwanttoachievewithcloudcomputingvshavingthingsrun on-premises. https://portal.tutorialsdojo.com/ 2 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran CLOUDCOMPUTINGCONCEPTS Beforewejumpintothenitty-grittyofAWS,let’sfirstgothroughsomeofthegeneralconceptsofcloud computing. 1. PublicCloud Asthenamesuggests,publiccloudisthetypeofcloudcomputingthatthemajorityareusingright now.ThisiswhatyoumayknowasAWS,Azure,GoogleCloudandmanymore.Thepubliccloudoffers alotofbenefitstoitsusersgiventhattheirinfrastructurescommonlyspanmultiplelocations,which arecontinuouslyimprovedandhavededicatedsupport.Thepubliccloud,therefore,hasenough capacitytosupportalargenumberofcustomerssimultaneously,andisoftenthego-toforfuture companieslookingintocloudtechnology. 2. PrivateCloud Privatecloudisatypeofcloudcomputingdeploymentmodelthatonlyspanswithinthenetworkofa companyoracorporation.Thecompanymanagesthehardwareandthenetworkthatithas,whilestill enjoyingsomeofthebenefitsofthecloud.Aninternalteamthendecideshowtoallocateanddistribute theirresourcesamongsttheirdeveloperssothatthereislesssecurityrisk.Companiesthathavestrict compliancesagainstpubliccloudservicesuseprivatecloudinsteadtoensurethattheiroperationscan operatewithenoughcapacityandminimaldowntime.Thecatchisthat,withthislevelofinfrastructure, theexpensescanbecomemuchhigherand/oritwillnotbeasgloballyextensiveasthepubliccloud providers. 3. HybridCloud Hybridcloudislikeabuffet.Youtakeapieceofthisandapieceofthat,butthewholepointofitisyou eathappilyintheend.Hybridcloudmeansyouarenotcommittingeverythingintothepublicorprivate cloud.Youcanhaveamixofoperationsrunninginthepubliccloud,whileallyourdataiskept on-premises.Oryoucanalsohavedifferentcloudprovidershandlingdifferentprojects,dependingon thestrengthsandweaknessesofthesecloudproviders.Thereisnorulestatingthatyoushouldputall youreggsinonebasket.Bycarefullydecidinghowyouwanttobuildyouroperations,younotonly achievethedesiredefficiencyofyourprojects,butalsogainthebestvalueforyourmoney. 4. HighAvailability Highavailabilitymeanshavingredundantcopiesofanobjectorresourcetomakesurethatanothercan takeitsplacewhensomethinghappenstoit.Highavailabilitycanapplytoalmostanything:compute servers,datastorage,databases,networks,etc.Highavailabilityisoneofthemainsellingpointsof usingthecloud.Itmightbeexpensive,butcompaniesthatcannotriskhavingdowntimenordataloss shouldbuildhighlyavailableinfrastructuresinthecloudtoprotecttheirassets.Furthermore,because thedatacentersinthecloudaregeographicallydistributedandareusuallyfarapartfromoneanother, incaseoneofthesedatacentersgooffline,otherdatacentersarenotaffectedandcancontinue servingyou. https://portal.tutorialsdojo.com/ 2 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 5. FaultTolerance Faulttoleranceisdifferentfromhighavailability.Faulttolerancemeansthatasystemcancontinue operatingevenifoneormorecomponentsbegintodegradeandfail.Oftentimes,faulttolerancecanbe attributedtoredundancyaswell.Whenacomponentbeginstofail,thesystemdetectsthisand replacesthefaultycomponenttorestoreworkingoperations.Othertimes,faulttolerancecanmean propererrorhandling.Whenacomponentbeginstofail,thesystemdetectsthisandreroutesthe operationtosomewhereelsethatishealthy.Aproperlybuiltinfrastructureiscapableofwithstanding componentdegradationandeventualfailure,andifpossible,repairitselfaswell. 6. Elasticity Elasticityistheabilitytoquicklyprovisionresourceswhenyouneedthem,andreleasethemonceyou don’tneedthemanymore.Unliketraditionalinfrastructure,inthecloud,youshouldtreatserversand storageasdisposable.Theyshouldnotbekeptbeyondtheirusefulness.Computepowerandstorage spacecanbeeasilyacquiredanywaywhenyouneedit,sobecost-effectivewithyourbudget,useonly whatyouneedanddon’tkeepthemidle.Elasticityisanothermajorsellingpointofthecloud,sinceyou donothavehardwareownership.Youdon’tneedtoworryaboutpurchasingnewhardwaretomeetyour requirementsandthinkabouthowtogetyourmoneybackonceitisbeyonditslifespan. 7. Scalability Scalabilityistheconceptofprovisioningadditionalresourcestoincreaseperformanceandsupport highdemand,andreducingthemoncedemandisnotashighanymore.Scalabilityisanimportant practicethatyoumustapplytokeepyourusershappy.Imagineifyourwebsitesuddenlyreceivesahigh numberoftraffic,andyoudon’thaveenoughcomputepowertoservecontenttoallyourcustomers. Thenegativeimpactoncustomersatisfactionwillgreatlyaffectyourreputationandyourprofits.When scalingaresource,likeawebsiteforexample,makesurethatitisstatelesssothatyouwon’tloseany importantdataonceitscalesdown.Youshouldalsouseappropriatemetricsasabasisofyourscaling activity. 8. Redundancy Redundancyisamixofallthethingsabove.Itisimportantthatyoupracticeredundancyinthecloud, asitcanprotectyoufromallsortsofissuesthatarenotastolerableinanon-premisessetup.Thereare alotofthingsinthecloudthatyoucana ndmusta pplyredundancy.It'snotjustserversanddatabases, butalsofilestorages,securityapplications,networks,monitoringtoolsandevenpersonnel.Byhaving additionallayersofsafeguards,youlessentheriskofthingsgoinghaywireandcostingyoumorethana fewbucksofextraservers. 9. DisasterRecovery Disasterrecoveryisthepracticeofensuringthatyouhaveastandardizedplanonhowtorecoveryour operationsincaseoftotalfailure.Usually,thismeanshavingacopyofyourinfrastructurerunningina differentlocation,sothatifyourprimaryexperiencesadisaster,youcanquicklyfailovertoyour secondary.Yourdisasterrecoveryplandependsontheamountoftimethatyouhavetobringbackup https://portal.tutorialsdojo.com/ 3 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran youroperations(RTO),andtheamountofdatalossthatyourbusinesscantolerate(RPO).Havinga disasterrecoveryplaniscrucialespeciallyforliveproductiondatabases.WehaveanumberofDR strategiesthatmeetdifferentRTOandRPOobjectives,whichwewilldiscussinmoredetaillateron. 10. Serverless Serverlessisacloudcomputingmodelwhereinthecloudproviderhandlestheserverandall maintenance,whileyoujustputyourcodein.Theterm“Serverless”confusesabunchofpeoplewho thinkthatthereareliterallynoserversinvolvedinthismodel.That’snottrue.Serverlessisstillusing serversinthebackend,butittakesawayfromyoutheresponsibilityofprovisioningandmaintaining one,soyoucandedicateeverythingtoyourcodeandnothavetoworryaboutscalability,patching,etc. Serverlessinvolvesawholenewdynamicofwritingcodeandbuildingapplications,soitmaynotfit everyone’sbill.Thetechnologycansaveyoualotofcostduetoitslowerpricingthanthoseof traditionalservermodels,butitmayalsointroduceadditionalcomplexitytoyourcodeduetoits distributednature.Youalsolosealotofcontroloveryourenvironmentifyouusuallymanageyourown runtimes,etc.Serverlessfunctionsarealsoevent-driven.Ifyou’reaNodeJSdeveloper,getreadyfora lotofcallbackswiththisone. https://portal.tutorialsdojo.com/ 3 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSBASICS ThereismuchforustoknowaboutAmazonWebServices.Whatistheircloudcomputingmodel?What advantagesdotheybringtoususers?Aretheysecureenoughforustotrustthemwithourapplications? Thesearejustsomeofthequestionsthatwewillbetacklinginthissection. AWSOverview In2006,AWSstartedofferingITinfrastructureservicestobusinessesaswebservices.Theintentionwasto solvecommoninfrastructuretroublesthatbusinessesoftenencounterinatraditionalsetup.Withthecloud, businessesnolongerneedtoplanforandprocureserversandotherITinfrastructureinadvance.InAWS,they caninstantlyprovisionhundredstothousandsofserversinafewminutesanddeliverresultsfaster.Today, AWSprovidesahighlyreliable,scalable,low-costinfrastructureplatforminthecloudthatsupportsmultiple businessesaroundtheglobe. AdvantagesofAWSCloudComputing ● ● ● ● ● ● Tradecapitalexpenseforvariableexpense–Theprincipleofcloudis,payforwhatyouuse,andhow muchyouuseit.Youdon’tneedtoallocateahugechunkofyourcapitaljustsoyoucanpurchase additionalserversoradditionalstoraget hatyouthinkyoumightneedandleavethemidlecollecting dust.That’swhyinthecloud,youshouldtreatresourcesassomethingeasilyattainable,aswellas somethingeasilydisposable. Benefitfrommassiveeconomiesofscale–Byusingcloudcomputing,youcanachievealower variablecostthanyoucangetonyourown.ManycustomersadoptAWSastheircloudprovider,and thenumberincreaseseachday.ThemorecustomersuseAWS,themoreAWScanachievehigher economiesofscale,whichlowerspayas-you-goprices. Stopguessingcapacity–NotknowinghowmuchcapacityyouneedisalrightinAWS.AWScaneasily scalecomputeandstorageasmuchasyouneeditto.Thatiswhyitisalsoagreatideatodosome benchmarkinginthecloud,sinceyoudonothavetoworryaboutrunningoutofresources.Onceyou haveabaseline,youcanadjustyourscalingmetricsandrunningresourcestosaveoncost. Increasespeedandagility–Inacloudcomputingenvironment,newresourcescanbeprovisionedina singleclickofabutton.Thecloudbringsalotofconveniencetoyourdeveloperssinceitreducesthe timeneededtoobtainadditionalresources.Inreturn,yougainadramaticincreaseinagilityforthe organization,sincethecostandtimeittakestoexperimentandinnovateissignificantlylower. Stopspendingmoneyrunningandmaintainingdatacenters–Cloudcomputingletsyoufocusonyour owncustomers,ratherthanonthephysicalmaintenanceofyourservers.Useyourtimeandmoneyon yourprojects,onyourapplicationsandonyourpeople.Youcansaveuponhugecapitalifyouremove thephysicalaspectfromtheequation. Goglobalinminutes–Youcaneasilydeployyourapplicationinmultipleregionsaroundtheworldwith justafewclicksthankstothewidecoverageofAWSdatacenters.Bystrategicallychoosingwhich https://portal.tutorialsdojo.com/ 3 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran regionsandlocationsyoudeployyourapplicationsin,youcanprovidelowerlatencyandabetter experienceforyourcustomersatminimalcost. AWSGlobalInfrastructure Regionsprovidemultiple,physicallyseparatedandisolatedA vailabilityZoneswhichareconnectedwithlow latency,highthroughput,andhighlyredundantnetworking. AvailabilityZonesofferhighlyavailability,faulttolerance,andscalability. ● Theyconsistofoneormorediscretedatacenters,eachwithredundantpower,networking,and connectivity,housedinseparatefacilities. ● AnAvailabilityZoneisrepresentedbyar egioncodefollowedbyaletteridentifier;forexample, us-east-1a. ● AvailabilityZonecodesareusedalmosteverywhere,especiallyifyouareinteractingwithAWS programmatically. https://portal.tutorialsdojo.com/ 3 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AnA WSLocalRegionisasingledatacenterdesignedtocomplementanexistingAWSRegion.AnA WSLocal ZoneplacesAWScompute,storage,database,andotherselectservicesclosertolargepopulation,industry, andITcenters,whichmakesitidealforusecasessuchascontentcreation,real-timegaming,livevideo streaming,andmore. Todeliverlow-latencycontenttousersaroundtheglobe,AWShasplacedP ointsofPresence,whichareeither edgelocationsoredgecaches.ThesepointsareusedbyCloudfrontandLambda@Edgeservices. EdgelocationsaresitesthatCloudFrontusestocachecopiesofyourcontentforfasterdeliverytoyourusers. https://portal.tutorialsdojo.com/ 3 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran YoucanalsoviewtheInteractiveAWSGlobalInfrastructureMaph ere. AWSSecurityandCompliance SincealotofcustomersrelyonAWSfortheirinfrastructureneeds,naturallyitisTHEPRIORITYofAWSto makesuretheirsecurityisofthehighestlevel.AWSoffersmultiplelayersofprotectiontoensurethattheir hardwareiswell-protectedandtheircustomerdataarefullysecured.Theyalsomakesuretokeepeverything well-maintainedandupdated,bothhardwareandsoftware.Havingmultipletenantssharingthesameserver rackcancausealotofbusinesseshugeworriesovertheirdataprivacyanddatasecurity.Itisonlythrough tightsecuritychecksandcomplianceauditscanpubliccloudproviderssuchasAWSgainthetrustoftheir customers. AsanAWScustomer,youinheritallthebestpracticesofAWSpolicies,architecture,andoperationalprocesses builttosatisfytherequirementsoftheirmostsecurity-sensitivecustomers.Inthecloud,theresponsibilityof securityisasharedone.AWSsecureswhattheycanontheirend,whileyousecurewhatyoucanonyourend. Onlythiswaycaneveryoneprotecttheirvaluabledata.Andtherefore,AWShasdevelopedmultipletoolsand servicestohelpyouachieveyoursecurityobjectives.Youcanalsoreviewthenumerousauditsand certificationsthatthird-partyauditorshaveconductedonAWS,sothatwheneveryouneedtofulfillstrict compliancewiththeuseofaservice,youcansimplyverifyitsstatusthroughthecatalog. https://portal.tutorialsdojo.com/ 3 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSPricing ● ● ● ● ● ● TherearethreefundamentaldriversofcostwithAWS: ○ Compute ○ Storage ○ Outbounddatatransfer. AWSofferspay-as-you-goforpricing. ForcertainserviceslikeA mazonEC2,AmazonEMR,andA mazonRDS,youcaninvestinreserved capacity.WithReservedInstances,youcansaveupto75%overequivalenton-demandcapacity.When youbuyReservedInstances,thelargertheupfrontpayment,thegreaterthediscount. ○ WiththeA llUpfrontoption,youpayfortheentireReservedInstancetermwithoneupfront payment.ThisoptionprovidesyouwiththelargestdiscountcomparedtoOn-Demandinstance pricing. ○ WiththeP artialUpfrontoption,youmakealowupfrontpaymentandarethenchargeda discountedhourlyratefortheinstanceforthedurationoftheReservedInstanceterm. ○ TheN oUpfrontoptiondoesnotrequireanyupfrontpaymentandprovidesadiscountedhourly rateforthedurationoftheterm. Therearealsovolume-baseddiscountsforservicessuchasA mazonS3. Fornewaccounts,AWSFreeTierisavailable. ○ FreeTierofferslimitedusageofAWSproductsatnochargefor12monthssincetheaccount wascreated.Moredetailsath ttps://aws.amazon.com/free/. YoucanestimateyourmonthlyAWSbillusingA WSPricingCalculator. AWSWell-ArchitectedFramework-FivePillars Havingwell-architectedsystemsgreatlyincreasestheplausibilityofbusinesssuccesswhichiswhyAWS createdtheAWSWell-ArchitectedFramework.Thisframeworkiscomposedoffivepillarsthathelpyou understandtheprosandconsofdecisionsyoumakewhilebuildingcloudarchitecturesandsystemsonthe AWSplatform.Youwilllearnthearchitecturalbestpracticesfordesigningandoperatingreliable,efficient, cost-effectiveandsecuresystemsinthecloudbyusingtheframework.Italsoprovidesawaytoconsistently measureyourarchitecturesagainstbestpracticesandidentifyareasforimprovement. https://portal.tutorialsdojo.com/ 3 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● OperationalExcellence ○ Theabilitytosupportdevelopmentandrunworkloadseffectively,gaininsightintotheir operations,andtocontinuouslyimprovesupportingprocessesandprocedurestodeliver businessvalue. ○ DesignPrinciples ■ Performoperationsascode ■ Makefrequent,small,reversiblechanges ■ Refineoperationsproceduresfrequently ■ Anticipatefailure ■ Learnfromalloperationalfailures Security ○ Theabilitytoprotectdata,systems,andassetstotakeadvantageofcloudtechnologiesto improveyoursecurity. ○ DesignPrinciples ■ Implementastrongidentityfoundation ■ Enabletraceability ■ Applysecurityatalllayers https://portal.tutorialsdojo.com/ 3 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● ■ Automatesecuritybestpractices ■ Protectdataintransitandatrest ■ Keeppeopleawayfromdata ■ Prepareforsecurityevents Reliability ○ Theabilityofaworkloadtoperformitsintendedfunctioncorrectlyandconsistentlywhenit’s expectedto.Thisincludestheabilitytooperateandtesttheworkloadthroughitstotallifecycle. ○ DesignPrinciples ■ Automaticallyrecoverfromfailure ■ Testrecoveryprocedures ■ Scalehorizontallytoincreaseaggregateworkloadavailability ■ Stopguessingcapacity ■ Managechangeinautomation PerformanceEfficiency ○ Theabilitytousecomputingresourcesefficientlytomeetsystemrequirements,andtomaintain thatefficiencyasdemandchangesandtechnologiesevolve. ○ DesignPrinciples ■ Democratizeadvancedtechnologies ■ Goglobalinminutes ■ Useserverlessarchitectures ■ Experimentmoreoften ■ Considermechanicalsympathy CostOptimization ○ Theabilitytorunsystemstodeliverbusinessvalueatthelowestpricepoint. ○ DesignPrinciples ■ ImplementCloudFinancialManagement ■ Adoptaconsumptionmodel ■ Measureoverallefficiency ■ Stopspendingmoneyonundifferentiatedheavylifting ■ Analyzeandattributeexpenditure BestPracticeswhenArchitectingintheCloud ● Focusonscalability ○ ScalingHorizontally-anincreaseinthenumberofresources.Whenscalinghorizontally,you wantyourresourcestobestatelessandreceiveawell-distributedloadofwork. ○ ScalingVertically- anincreaseinthespecificationsofanindividualresource,suchastoa higherinstancetypeforEC2instances. https://portal.tutorialsdojo.com/ 3 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● DisposableResourcesInsteadofFixedServers ○ InstantiatingComputeResources-automatesettingupofnewresourcesalongwiththeir configurationandcodethroughmethodssuchasbootstrapping,Dockerimagesorgolden AMIs. ○ InfrastructureasCode-AWSassetsareprogrammable.Youcanapplytechniques,practices, andtoolsfromsoftwaredevelopmenttomakeyourwholeinfrastructurereusable,maintainable, extensible,andtestable. UseAutomation ○ ServerlessManagementandDeployment-beingserverlessshiftsyourfocustoautomationof yourcodedeployment.AWShandlesthemanagementtasksforyou. ○ InfrastructureManagementandDeployment-AWSautomaticallyhandlesdetails,suchas resourceprovisioning,loadbalancing,autoscaling,andmonitoring,soyoucanfocuson resourcedeployment. ○ AlarmsandEvents-AWSserviceswillcontinuouslymonitoryourresourcesandinitiateevents whencertainmetricsorconditionsaremet. ImplementLooseCoupling ○ Well-DefinedInterfaces-reduceinterdependenciesinasystembyallowingvarious componentstointeractwitheachotheronlythroughspecific,technologyagnosticinterfaces, suchasRESTfulAPIs. https://portal.tutorialsdojo.com/ 3 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ServiceDiscovery-applicationsthataredeployedasmicroservicesshouldbediscoverableand usablewithoutpriorknowledgeoftheirnetworktopologydetails.Apartfromhidingcomplexity, thisalsoallowsinfrastructuredetailstochangeatanytime. ○ AsynchronousIntegration-interactingcomponentsthatdonotneedanimmediateresponse andwhereanacknowledgementthatarequesthasbeenregisteredwillsuffice,shouldintegrate throughanintermediatedurablestoragelayer. ○ DistributedSystemsBestPractices-buildapplicationsthathandlecomponentfailureina gracefulmanner. Services,NotServers ○ ManagedServices-providebuildingblocksthatdeveloperscanconsumetopowertheir applications,suchasdatabases,machinelearning,analytics,queuing,search,email, notifications,andmore. ○ ServerlessArchitectures-allowyoutobuildbothevent-drivenandsynchronousservices withoutmanagingserverinfrastructure,whichcanreducetheoperationalcomplexityofrunning applications. AppropriateUseofDatabases ○ Choosetherightdatabasetechnologyforeachtypeofworkload. ○ RelationalDatabasesprovideapowerfulquerylanguage,flexibleindexingcapabilities,strong integritycontrols,andtheabilitytocombinedatafrommultipletablesinafastandefficient manner. ○ NoSQLDatabasestradesomeofthequeryandtransactioncapabilitiesofrelationaldatabases foramoreflexibledatamodelthatseamlesslyscaleshorizontally.Itusesavarietyofdata models,includinggraphs,key-valuepairs,andJSONdocuments,andarewidelyrecognizedfor easeofdevelopment,scalableperformance,highavailability,andresilience. ○ DataWarehousesareaspecializedtypeofrelationaldatabase,whichisoptimizedforanalysis andreportingoflargeamountsofdata. ○ GraphDatabasesusesgraphstructuresforqueries. ■ SearchFunctionalities ■ Searchisoftenconfusedwithquery.Aqueryisaformaldatabasequery,whichis addressedinformaltermstoaspecificdataset.Searchenablesdatasetstobe queriedthatarenotpreciselystructured. ■ Asearchservicecanbeusedtoindexandsearchbothstructuredandfreetext formatandcansupportfunctionalitythatisnotavailableinotherdatabases, suchascustomizableresultranking,facetingforfiltering,synonyms,and stemming. ManagingIncreasingVolumesofData ○ DataLake-anarchitecturalapproachthatallowsyoutostoremassiveamountsofdataina centrallocationsothatit'sreadilyavailabletobecategorized,processed,analyzed,and consumedbydiversegroupswithinyourorganization. RemovingSinglePointsofFailure ○ IntroducingRedundancy ○ ● ● ● ● https://portal.tutorialsdojo.com/ 4 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Standbyredundancy-whenaresourcefails,functionalityisrecoveredonasecondary resourcewiththefailoverprocess.Thefailovertypicallyrequiressometimebeforeit completes,andduringthisperiodtheresourceremainsunavailable.Thisisoftenused forstatefulcomponentssuchasrelationaldatabases. ■ Activeredundancy-requestsaredistributedtomultipleredundantcomputeresources. Whenoneofthemfails,therestcansimplyabsorbalargershareoftheworkload. ○ DetectFailure-usehealthchecksandcollectlogsallthetime. ○ DurableDataStorage ■ Synchronousreplication-onlyacknowledgesatransactionafterithasbeendurably storedinboththeprimarystorageanditsreplicas.Itisidealforprotectingtheintegrity ofdatafromtheeventofafailureoftheprimarynode. ■ Asynchronousreplication-decouplestheprimarynodefromitsreplicasattheexpense ofintroducingreplicationlag.Thismeansthatchangesontheprimarynodearenot immediatelyreflectedonitsreplicas. ■ Quorum-basedreplication-combinessynchronousandasynchronousreplicationby definingaminimumnumberofnodesthatmustparticipateinasuccessfulwrite operation. ○ AutomatedMulti-DataCenterResilience-utilizeAWSRegionsandAvailabilityZones(Multi-AZ Principle). ○ FaultIsolationandTraditionalHorizontalScaling-applyS huffleSharding. OptimizeforCost ○ RightSizing-AWSoffersabroadrangeofresourcetypesandconfigurationsformanyuse cases. ○ Elasticity-savemoneywithAWSbytakingadvantageoftheplatform’selasticity. ○ TakeAdvantageoftheVarietyofPurchasingOptions-ReservedInstancesvsSpotInstances vsOtherSavingsPlanoptions Caching ○ ApplicationDataCaching-storeandretrieveinformationfromfast,managed,in-memory caches. ○ EdgeCaching-servecontentbyinfrastructurethatisclosertoviewers,whichlowerslatency andgiveshigh,sustaineddatatransferratesnecessarytodeliverlargepopularobjectstoend usersatscale. Security ○ UseAWSFeaturesforDefenseinDepth-securemultiplelevelsofyourinfrastructurefrom networkdowntoapplicationanddatabase. ○ ShareSecurityResponsibilitywithAWS-AWShandlessecurityOFtheCloudwhilecustomers handlesecurityINtheCloud. ○ ReducePrivilegedAccess-implementPrincipleofLeastPrivilegecontrols. ○ SecurityasCode-firewallrules,networkaccesscontrols,internal/externalsubnets,and operatingsystemhardeningcanallbe capturedinatemplatethatdefinesaG olden Environment. ■ ● ● ● https://portal.tutorialsdojo.com/ 4 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ○ Real-TimeAuditing-implementcontinuousmonitoringandautomationofcontrolsonAWSto minimizeexposuretosecurityrisks. Sources: https://docs.aws.amazon.com/whitepapers/latest/aws-overview/introduction.html https://d1.awsstatic.com/whitepapers/AWS_Cloud_Best_Practices.pdf http://d0.awsstatic.com/whitepapers/architecture/AWS_Well-Architected_Framework.pdf https://portal.tutorialsdojo.com/ 4 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran DisasterRecoveryinAWS ● ● ● ● ● RTOorRecoveryTimeObjectiveisthetimeittakesafteradisruptiontorestoreabusinessprocessto itsservicelevel. RPOorRecoveryPointObjectiveistheacceptableamountofdatalossmeasuredintime. DisasterRecoveryMethods ○ BackupandRestore-asthenameimplies,youtakefrequentbackupsofyourmostcritical systemsanddataandstoretheminasecure,durable,andhighlyavailablelocation.Once disasterstrikes,yousimplyrestorethesebackupstorecoverdataquicklyandreliably.Backup andrestoreisusuallyconsideredthecheapestoption,butalsotakesthelongestRTO.YourRPO willdependonhowfrequentyoutakeyourbackups. ○ PilotLight-quickerrecoverytimethanbackupandrestorebecausecorepiecesofthesystem arealreadyrunningandarecontinuallykeptuptodate.Examplesareyoursecondaryproduction databasesthatareconfiguredwithdatamirroringordatareplicationtotheprimary.Datalossis veryminimalinthisscenarioforthecriticalparts,butfortheothers,youhavethesameRTOand RPOasbackupandrestore. ○ WarmStandby-ascaled-downversionofafullyfunctionalenvironmentthatisalwaysrunning. Forexample,youhaveasubsetofundersizedserversanddatabasesthathavethesameexact configurationasyourprimary,andareconstantlyupdatedalso.Oncedisasterstrikes,youonly havetomakeminimalreconfigurationstore-establishtheenvironmentbacktoitsprimarystate. WarmstandbyiscostlierthanPilotLight,butyouhavebetterRTOandRPO. ○ Multi-Site-runexactreplicasofyourinfrastructureinanactive-activeconfiguration.Inthis scenario,allyoushoulddoincaseofadisasteristoreroutetrafficontoanotherenvironment. Multi-siteisthemostexpensiveoptionofallsinceyouareessentiallymultiplyingyourexpenses withthenumberofenvironmentreplicas.ItdoesgiveyouthebestRTOandRPOhowever. Averyvaluablebenefitofthecloudisthatitenablesyoutosetupthetypeofdisasterrecoverysolution thatyouwant,withouthavingtoworryabouthardwareprocurementordatacenterfacilities.AWShasa largenumberofregions,andanevenlargersetofavailabilityzonesforyoutochoosefrom.By strategicallyplanninghowyouconstructyourdisasterrecoveryoperations,youcanachieveyourtarget RTOsandRPOswithoutpayingtoomuch. AWSalsopromotestheirdisasterrecoverytoolcalledC loudEndurewhichtheyaresuggestingtotheir customersasthepreferredsolutionfordisasterrecoveryworkloads.Althoughyoucanadoptthistoolif youwishto,itisstillimportantforyoutolearnaboutthedifferentDRsolutionsavailable. Sources: https://d1.awsstatic.com/whitepapers/aws-disaster-recovery.pdf https://aws.amazon.com/cloudendure-disaster-recovery/ https://portal.tutorialsdojo.com/ 4 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran DeepDiveonAWSServices TheSolutionsArchitectAssociateexamwilltestyourknowledgeonchoosingtherightservicefortheright situation.Therearemanycaseswhereintwoservicesmayseemapplicabletoasituation,butoneofthem fulfillstherequirementbetterortheotheroptionshaveincorrectstatements.Inthisdeepdivesection,we’llbe goingthroughdifferentscenariosthatyoumightencounterintheSAAexam.Thesescenarioscanberelated tothebehaviorofaservicefeature,integrationofdifferentservices,orhowyoushoulduseacertainservice. Wewillgoasdetailedaswecaninthissectionsothatyouwillnotonlyknowtheservice,butalsounderstand whatitiscapableof.WewillalsobeaddingofficialAWSreferencesand/ordiagramstosupplementthe scenarioswe’lldiscuss.Withoutfurtherado,let’sgetrightintoit. AmazonEC2 ComponentsofanEC2Instance YoumustknowthecomponentsofanEC2instance,sincethisisoneofthecoreAWSservicesthatyou’llbe encounteringthemostintheexam. 1) WhencreatinganEC2instance,youalwaysstartoffbychoosingab aseAMIorAmazonMachine Image.AnAMIcontainstheOS,settings,andotherapplicationsthatyouwilluseinyourserver.AWS hasmanypre-builtAMIsforyoutochoosefrom,andtherearealsocustomAMIscreatedbyotherusers whicharesoldontheAWSMarketplaceforyoutouse.IfyouhavecreatedyourownAMIbefore,itwill alsobeavailableforyoutoselect.AMIscannotbemodifiedafterlaunch. 2) AfteryouhavechosenyourAMI,youselecttheinstancetypeandsizeofyourEC2instance.Thetype andsizewilldeterminethephysicalpropertiesofyourinstance,suchasCPU,RAM,networkspeed,and more.Therearemanyinstancetypesandsizestochoosefromandtheselectionwilldependonyour workloadfortheinstance.Youcanfreelymodifyyourinstancetypeevenafteryou’velaunchedyour instance,whichiscommonlyknownas“rightsizing”. 3) OnceyouhavechosenyourAMIandyourhardware,youcannowconfigureyourinstancesettings. a) Ifyouareworkingontheconsole,thefirstthingyou’llindicateisthen umberofinstancesyou’d liketolaunchwiththesespecificationsyoumade. b) Youspecifywhetheryou’dliketolaunchs potinstancesoruseanotherinstancebillingtype (on-demandorreserved). c) YouconfigurewhichV PCandsubnettheinstanceshouldbelaunchedin,andwhetheritshould receiveap ublicIPaddressornot. d) Youchoosewhethertoincludetheinstanceinap lacementgroupornot. e) Youindicateiftheinstancewillbejoinedtooneofyourd omains/directories. f) NextistheI AMrolethatyou’dliketoprovidetoyourEC2instance.TheIAMrolewillprovidethe instancewithpermissionstointeractwithotherAWSresourcesindicatedinitspermission policy. https://portal.tutorialsdojo.com/ 4 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 4) 5) 6) 7) 8) g) Shutdownbehaviorletsyouspecifyiftheinstanceshouldonlybestoppedorshouldbe terminatedoncetheinstancegoesintoastoppedstate.Iftheinstancesupportsh ibernation, youcanalsoenablethehibernationfeature. h) Youcanenablethet erminationprotectionfeaturet oprotectyourinstancefromaccidental termination. i) IfyouhaveE FSfilesystemsthatyou’dliketoimmediatelymounttoyourEC2instance,youcan specifythemduringlaunch. j) Lastly,youcanspecifyifyouhavecommandsyou’dlikeyourEC2instancetoexecuteonceit haslaunched.Thesecommandsarewrittenintheu serdatasectionandsubmittedtothe system. Afteryouhaveconfiguredyourinstancesettings,younowneedtoadds toragetoyourEC2instance.A volumeisautomaticallycreatedforyousincethisvolumewillcontaintheOSandotherapplicationsof yourAMI.YoucanaddmorestorageasneededandspecifythetypeandsizeofEBSstorageyou’dlike toallocate.OthersettingsincludespecifyingwhichEBSvolumesaretobeincludedfortermination whentheEC2instanceisterminated,andencryption. Whenyouhaveallocatedthenecessarystorageforyourinstances,nextisaddingt agsforeasier identificationandclassification. Afteraddinginthetags,younowcreateoradds ecuritygroupstoyourEC2instance,whichwillserve asfirewallstoyourservers.Securitygroupswillmoderatetheinboundandoutboundtraffic permissionsofyourEC2instance.Youcanalsoadd,remove,andmodifyyoursecuritygroupsettings lateron. Lastly,theaccesstotheEC2instancewillneedtobesecuredusingoneofyourk eypairs.Makesure thatyouhaveacopyofthiskeypairsothatyou’llbeabletoconnecttoyourinstancewhenitis launched.Thereisnowaytoreassociateanotherkeypaironceyou’velaunchedtheinstance.Youcan alsoproceedwithoutselectingakeypair,butthenyouwouldhavenowayofdirectlyaccessingyour instanceunlessyouhaveenabledsomeotherloginmethodintheAMIorviaSystemsManager. Onceyouarehappywithyourinstance,proceedwiththelaunch.WaitforyourEC2instancetofinish preparingitself,andyoushouldbeabletoconnecttoitiftherearen’tanyissues. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html https://tutorialsdojo.com/amazon-elastic-compute-cloud-amazon-ec2/ TypesofEC2Instances 1. GeneralPurpose—Providesabalanceofcompute,memory,andnetworkingresources,andcanbe usedforavarietyofdiverseworkloads.InstancesundertheT-familyhaveburstableperformance capabilitiestoprovidehigherCPUperformancewhenCPUisunderhighload,inexchangeforCPU credits.Oncethecreditsrunout,yourinstancewillnotbeabletoburstanymore.Morecreditscanbe earnedatacertainrateperhourdependingontheinstancesize. https://portal.tutorialsdojo.com/ 4 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 2. ComputeOptimized—Idealforcomputeboundapplicationsthatbenefitfromhighperformance processors.Instancesbelongingtothisfamilyarewellsuitedforbatchprocessingworkloads,media transcoding,highperformancewebservers,highperformancecomputing,scientificmodeling, dedicatedgamingserversandadserverengines,machinelearninginferenceandothercompute intensiveapplications. 3. MemoryOptimized—Designedtodeliverfastperformanceforworkloadsthatprocesslargedatasets inmemory. 4. AcceleratedComputing—Useshardwareacceleratorsorco-processorstoperformfunctionssuchas floatingpointnumbercalculations,graphicsprocessing,ordatapatternmatchingmoreefficientlythan onCPUs. 5. StorageOptimized—Designedforworkloadsthatrequirehigh,sequentialreadandwriteaccessto verylargedatasetsonlocalstorage.Theyareoptimizedtodelivertensofthousandsoflow-latency, randomI/Ooperationspersecond(IOPS)toapplications. 6. Nitro-based—TheNitroSystemprovidesbaremetalcapabilitiesthateliminatevirtualizationoverhead andsupportworkloadsthatrequirefullaccesstohosthardware.WhenyoumountEBSProvisioned IOPSvolumesonNitro-basedinstances,youcanprovisionfrom100IOPSupto64,000IOPSper volumecomparedtojustupto32,000onotherinstances. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html https://tutorialsdojo.com/amazon-elastic-compute-cloud-amazon-ec2/ StoragewithHighestIOPSforEC2Instance WhentalkingaboutstorageandIOPSinEC2instances,thefirstthingthatpopsintothemindsofpeopleis AmazonEBSProvisionedIOPS.AmazonEBSProvisionedIOPSvolumesarethehighestperformingEBS volumesdesignedforyourcritical,I/Ointensiveapplications.ThesevolumesareidealforbothIOPS-intensive andthroughput-intensiveworkloadsthatrequireextremelylowlatency.AndsincetheyareEBSvolumes,your datawillalsopersistevenaftershutdownsorreboots.Youcancreatesnapshotsofthesevolumesandcopy themovertoyourotherinstances,andmuchmore. ButwhatifyourequirereallyhighIOPS,lowlatencyperformance,andthedatadoesn’tnecessarilyhaveto persistonthevolume?Ifyouhavethisrequirementthentheinstancestorevolumesonspecificinstancetypes mightbemorepreferablethanEBSProvisionedIOPSvolumes.EBSvolumesareattachedtoEC2instances virtually,sothereisstillsomelatencyinthere.InstancestorevolumesarephysicallyattachedtotheEC2 instancesthemselves,soyourinstancesareabletoaccessthedatamuchfaster.Instancestorevolumescan comeinHDD,SSDorNVMESSD,dependingontheinstancetypeyouchoose.Availablestoragespacewill dependontheinstancetypeaswell. Reference: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html https://portal.tutorialsdojo.com/ 4 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran InstancePurchasingOptions AWSoffersmultipleoptionsforyoutopurchasecomputecapacitythatwillbestsuityourneeds.Asidefrom pricingondifferentinstancetypesandinstancesizes,youcanalsospecifyhowyou’dliketopayforthe computecapacity.WithEC2instances,youhavethefollowingpurchaseoptions: 1) On-DemandInstances–Youpaybythehourortheseconddependingonwhichinstancesyourunfor eachrunninginstance.Ifyourinstancesareinastoppedstate,thenyoudonotincurinstancecharges. Nolongtermcommitments. 2) SavingsPlans–ReceivediscountsonyourEC2costsbycommittingtoaconsistentamountofusage, inUSDperhour,foratermof1or3years.Youcanachievehigherdiscountratesbypayingaportionof thetotalbillupfront,orpayingfullupfront.TherearetwotypesofSavingsPlansavailable: a) ComputeSavingsPlansprovidethemostflexibilitysinceitautomaticallyappliesyourdiscount regardlessofinstancefamily,size,AZ,region,OSortenancy,andalsoappliestoFargateand Lambdausage. b) EC2InstanceSavingsPlansprovidethelowestpricesbutyouarecommittedtousageof individualinstancefamiliesinaregiononly.Theplanreducesyourcostontheselectedinstance familyinthatregionregardlessofAZ,size,OS,ortenancy.Youcanfreelymodifyyourinstance sizeswithintheinstancefamilyinthatregionwithoutlosingyourdiscount. 3) ReservedInstances(RI)–SimilartoSavingPlansbutlessflexiblesinceyouaremakingacommitment toaconsistentinstanceconfiguration,includinginstancetypeandRegion,foratermof1or3years. Youcanalsopaypartialupfrontorfullupfrontforhigherdiscountrates.AReservedInstancehasfour instanceattributesthatdetermineitsprice: a) Instancetype b) Region c) Tenancy-shared(default)orsingle-tenant(dedicated)hardware. d) PlatformorOS ReservedInstancesareautomaticallyappliedtorunningOn-DemandInstancesprovidedthatthe specificationsmatch.AbenefitofReservedInstancesisthatyoucansellunusedStandardReserved InstancesintheAWSMarketplace.TherearealsodifferenttypesofRIsforyoutochoosefrom: a) StandardRIs-Providethemostsignificantdiscountratesandarebestsuitedforsteady-state usage. b) ConvertibleRIs-ProvideadiscountandthecapabilitytochangetheattributesoftheRIaslong astheresultingRIisofequalorgreatervalue. c) ScheduledRIs-Theseareavailabletolaunchwithinthetimewindowsyoureserve.Thisoption allowsyoutomatchyourcapacityreservationtoapredictablerecurringschedulethatonly requiresafractionofaday,aweek,oramonth. AppliestousageacrossallAvailabilityZonesinanAWS region StandardRI Yes ConvertibleRI Yes https://portal.tutorialsdojo.com/ 4 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Canbesharedbetweenmultipleaccountswithina consolidatedbillingfamily. Yes Yes ChangeAvailabilityZone,instancesize(forLinuxOS), networkingtype Yes Yes Changeinstancefamilies,operatingsystem,tenancy, andpaymentoption No Yes BenefitfromPriceReductions No Yes Canbebought/soldinMarketplace Yes No 4) SpotInstances–UnusedEC2instancesthatareavailableforacheapprice,whichcanreduceyour costssignificantly.ThehourlypriceforaSpotInstanceiscalledaSpotprice.TheSpotpriceofeach instancetypeineachAvailabilityZoneissetbyAmazonEC2,andisadjustedgraduallybasedonthe long-termsupplyofanddemandforSpotInstances.YourSpotInstancerunswhenevercapacityis availableandthemaximumpriceperhourthatyou’veplacedforyourrequestexceedstheSpotprice. WhentheSpotpricegoeshigherthanyourspecifiedprice,yourSpotInstancewillbestoppedor terminatedafteratwominutewarning.UseSpotInstancesonlywhenyourworkloadscanbe interrupted 5) DedicatedHosts–Youpayforaphysicalhostthatisfullydedicatedtorunningyourinstances,and bringyourexistingper-socket,per-core,orper-VMsoftwarelicensestoreducecosts.Supportfor multipleinstancesizesonthesameDedicatedHostisavailableforthefollowinginstancefamilies:c5, m5,r5,c5n,r5n,andm5n.DedicatedHostsalsooffersoptionsforupfrontpaymentforhigher discounts. 6) DedicatedInstances–Paybythehourforinstancesthatrunonsingle-tenanthardware.Dedicated InstancesthatbelongtodifferentAWSaccountsarephysicallyisolatedatahardwarelevel.Onlyyour computenodesruninsingle-tenanthardware;EBSvolumesdonot. DedicatedHosts DedicatedInstances Billing Per-hostbilling Per-instancebilling Visibilityofsockets,cores, andhostID Providesvisibilityonthenumberof socketsandphysicalcores Novisibility Hostandinstanceaffinity Allowsyoutoconsistentlydeploy yourinstancestothesamephysical serverovertime Notsupported Targetedinstanceplacement Providesadditionalvisibilityand Notsupported controloverhowinstancesareplaced https://portal.tutorialsdojo.com/ 4 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran onaphysicalserver Automaticinstancerecovery Supported Supported BringYourOwnLicense (BYOL) Supported Notsupported Instancesmustrunwithina VPC Yes Yes Canbecombinedwithother billingoptions On-demandDedicatedHosts, ReservedDedicatedHosts,Savings Plans On-demandInstances, ReservedDedicated Instances,Dedicated SpotInstances 7) CapacityReservations–AllowsyoutoreservecapacityforyourEC2instancesinaspecificAvailability Zoneforanyduration.Nocommitmentrequired. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html https://aws.amazon.com/ec2/pricing/ https://tutorialsdojo.com/amazon-elastic-compute-cloud-amazon-ec2/ https://portal.tutorialsdojo.com/ 4 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ComparisonofDifferentTypesofEC2HealthChecks Reference: https://tutorialsdojo.com/ec2-instance-health-check-vs-elb-health-check-vs-auto-scaling-and-custom-health-ch eck/ https://portal.tutorialsdojo.com/ 5 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran EC2PlacementGroups LaunchingEC2instancesinaplacementgroupinfluenceshowtheyareplacedinunderlyingAWShardware. Dependingonyourtypeofworkload,youcancreateaplacementgroupusingoneofthefollowingplacement strategies: ● Cluster–yourinstancesareplacedclosetogetherinsideanAvailabilityZone.Aclusterplacement groupcanspanpeeredVPCsthatbelonginthesameAWSRegion.Thisstrategyenablesworkloadsto achievelow-latency,highnetworkthroughputnetworkperformance. ● Partition–spreadsyourinstancesacrosslogicalpartitions,calledpartitions,suchthatgroupsof instancesinonepartitiondonotsharetheunderlyinghardwarewithgroupsofinstancesindifferent partitions.ApartitionplacementgroupcanhavepartitionsinmultipleAvailabilityZonesinthesame Region,withamaximumofsevenpartitionsperAZ.Thisstrategyreducesthelikelihoodofcorrelated hardwarefailuresforyourapplication. ● Spread–strictlyplaceseachofyourinstancesacrossdistinctunderlyinghardwarerackstoreduce correlatedfailures.Eachrackhasitsownnetworkandpowersource.Aspreadplacementgroupcan havepartitionsinmultipleAvailabilityZonesinthesameRegion,withamaximumofsevenrunningEC2 instancesperAZpergroup. Ifyoutrytoaddmoreinstancestoyourplacementgroupafteryoucreateit,orifyoutrytolaunchmorethan oneinstancetypeintheplacementgroup,youmightgetaninsufficientcapacityerror.Ifyoustopaninstance inaplacementgroupandthenstartitagain,itstillrunsintheplacementgroup.However,thestartfailsifthere isn'tenoughcapacityfortheinstance.Toremedythecapacityissue,simplyretrythelaunchuntilyousucceed. Somelimitationsyouneedtoremember: ● Youcan'tmergeplacementgroups. ● Aninstancecannotspanmultipleplacementgroups. ● YoucannotlaunchDedicatedHostsinplacementgroups. ● Aclusterplacementgroupcan'tspanmultipleAvailabilityZones. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html https://tutorialsdojo.com/amazon-elastic-compute-cloud-amazon-ec2/ SecurityGroupsAndNetworkAccessControlLists Security groups and network ACLs are your main lines of defense in protecting your VPC network. These services act as firewalls for your VPCsandcontrolinboundandoutboundtrafficbasedontherulesyouset. AlthoughbothofthemareusedforVPCnetworksecurity,theyservetwodifferentfunctionsandoperateina differentmanner. https://portal.tutorialsdojo.com/ 5 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Securitygroupsoperateontheinstancelayer.Theyserveasvirtualfirewallsthatcontrolinboundandoutbound traffictoyourVPCresources.NotallAWSservicessupportsecuritygroups,butthegeneralideaisthatifthe serviceinvolvesserversorEC2instancesthenitshouldalsosupportsecuritygroups.Examplesofthese servicesare: 1. AmazonEC2 2. AWSElasticBeanstalk 3. AmazonElasticLoadBalancing 4. AmazonRDS 5. AmazonEFS 6. AmazonEMR 7. AmazonRedshift 8. AmazonElasticache TocontroltheflowoftraffictoyourVPCresources,youdefinerulesinyoursecuritygroupwhichspecifythe typesoftrafficthatareallowed.Asecuritygroupruleiscomposedoftraffictype(SSH,RDP,etc),internet protocol(tcporudp),portrange,originofthetrafficforinboundrulesordestinationofthetrafficforoutbound rules,andanoptionaldescriptionfortherule.OriginsanddestinationscanbedefinedasdefiniteIPaddresses, IPaddressranges,orasecuritygroupID.IfyoureferenceasecuritygroupIDinyourrulethenallresourcesthat areassociatedwiththesecuritygroupIDarecountedintherule.ThissavesyouthetroubleofenteringtheirIP addressesonebyone. Youcanonlycreaterulesthatallowtraffictopassthrough.Trafficparametersthatdonotmatchanyofyour securitygrouprulesareautomaticallydenied.Bydefault,newlycreatedsecuritygroupsdonotallowany inboundtrafficwhileallowingalltypesofoutboundtraffictopassthrough.Securitygroupsarealsostateful, meaningifyousendarequestfromyourinstance,theresponsetrafficforthatrequestisallowedtoflowin regardlessofinboundrules.Responsestoallowedinboundtrafficareallowedtoflowout,regardlessof outboundrules.Onethingtorememberis,whenyouareaddingrulestoallowcommunicationbetweentwo VPCinstances,youshouldentertheprivateIPaddressofthoseinstancesandnottheirpublicIPorElasticIP address. Securitygroupsareassociatedwithnetworkinterfaces,andnottheinstancesthemselves.Whenyouchange thesecuritygroupsofaninstance,youarechangingthesecuritygroupsassociatedwithitsnetworkinterface. Bydefault,whenyoucreateanetworkinterface,it'sassociatedwiththedefaultsecuritygroupfortheVPC, unlessyouspecifyadifferentsecuritygroup.NetworkinterfacesandsecuritygroupsareboundtotheVPC theyarelaunchedin,soyoucannotusethemforotherVPCs.However,securitygroupsbelongingtoadifferent VPCcanbereferencedastheoriginanddestinationofasecuritygroupruleofpeeredVPCs. https://portal.tutorialsdojo.com/ 5 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran NetworkACLsoperateonthesubnetlayer,whichmeanstheyprotectyourwholesubnetratherthanindividual instances.Similartosecuritygroups,trafficismanagedthroughtheuseofrules.AnetworkACLruleconsists ofarulenumber,traffictype,protocol,portrange,sourceofthetrafficforinboundrulesordestinationofthe trafficforoutboundrules,andanallowordenysetting. InnetworkACL,rulesareevaluatedstartingwiththelowestnumberedrule.Assoonasarulematchestraffic, it'sappliedregardlessofanyhigher-numberedrulethatmightcontradictit.Andunlikesecuritygroups,youcan createallowrulesanddenypermissionsinNACLforbothinboundandoutboundrules.Perhapsyouwantto allowpublicuserstohaveHTTPaccesstoyoursubnet,exceptforafewIPaddressesthatyoufoundtobe malicious.YoucancreateaninboundHTTPallowrulethatallows0.0.0.0/0andcreateanotherinboundHTTP denyrulethatblocksthesespecificIPs.Ifnorulematchesatrafficrequestorresponsethenitisautomatically denied.NetworkACLsarealsostateless,sosourcesanddestinationsneedtobeallowedonbothinboundand outboundforthemtofreelycommunicatewiththeresourcesinyoursubnet. EveryVPCcomeswithadefaultnetworkACL,whichallowsallinboundandoutboundtraffic.Youcancreate yourowncustomnetworkACLandassociateitwithasubnet.Bydefault,eachcustomnetworkACLdeniesall inboundandoutboundtrafficuntilyouaddrules.Notethateverysubnetmustbeassociatedwithanetwork ACL.Ifyoudon'texplicitlyassociateasubnetwithanetworkACL,thesubnetisautomaticallyassociatedwith thedefaultnetworkACL.AnetworkACLcanbeassociatedwithmultiplesubnets.However,asubnetcanbe associatedwithonlyonenetworkACLatatime. https://portal.tutorialsdojo.com/ 5 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Onelastthingtonoteis,forsubnetsthathandlepublicnetworkconnections,youmightencountersome issuesifyoudonotaddanallowruleforyourephemeralports.Therangevariesdependingontheclient's operatingsystem.ANATgatewayusesports1024-65535forexample. References: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html https://tutorialsdojo.com/security-group-vs-nacl/ https://portal.tutorialsdojo.com/ 5 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonEC2AutoScaling HorizontalScalingandVerticalScaling Whenyouhaveinsufficientcapacityforaworkload,let’ssayforexampleservingawebsite,therearetwoways toscaleyourresourcestoaccommodatetheincreasingdemand:scalehorizontallyorscalevertically. Whenscalinghorizontally,youareaddingmoreserverstothesystem.Moreserversmeanthatworkloadis distributedtoagreaternumberofworkers,whichtherebyreducestheburdenoneachserver.Whenyouscale horizontally,youneedaservicesuchasEC2autoscalingtomanagethenumberofserversrunningatatime. YoualsoneedanElasticLoadBalancertointerceptanddistributethetotalincomingrequeststoyourfleetof autoscalingservers.Horizontalscalingisagreatwayforstatelessservers,suchaspublicwebservers,to meetvaryinglevelsofworkloads. Comparedtoscalinghorizontally,scalingverticallyreferstoincreasingordecreasingtheresourcesofasingle server,insteadofaddingnewserverstothesystem.Verticalscalingissuitedforresourcesthatarestatefulor haveoperationsdifficulttomanageinadistributedmanner,suchaswritequeriestodatabasesandIOPS sizinginstoragevolumes.Forexample,ifyourEC2instanceisperformingslowly,thenyoucanscaleupits instancesizetoobtainmorecomputeandmemorycapacity.OrwhenyourEBSvolumesarenothittingthe requiredIOPS,youcanincreasetheirsizeorIOPScapacitybymodifyingtheEBSvolume.Notethatforsome servicessuchasEC2andRDS,theinstanceneedstobestoppedbeforemodifyingtheinstancesize. https://portal.tutorialsdojo.com/ 5 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ComponentsofanAWSEC2AutoScalingGroup AnEC2AutoScalingGrouphastwopartstoit:alaunchconfigurationortemplatethatwilldefineyourauto scalinginstances,andtheautoscalingservicethatperformsscalingandmonitoringactions. CreatingalaunchconfigurationissimilartolaunchinganEC2instance.Eachlaunchconfigurationhasaname thatuniquelyidentifiesitfromyourotherlaunchconfigurations.YouprovidetheAMIthatitwillusetolaunch yourinstances.Youalsogettochoosetheinstancetypeandsizeforyourautoscalinginstances.Youcan requestspotinstancesorjustusethestandardon-demandinstances.Youcanalsoincludeaninstanceprofile thatwillprovideyourautoscalinginstanceswithpermissionstointeractwithyourotherservices. IfyouneedCloudwatchdetailedmonitoring,youcanenabletheoptionforacost.Asidefromthat,youcan includeuserdatawhichwillbeexecutedeverytimeanautoscalinginstanceislaunched.Youcanalsochoose whethertoassignpublicIPaddressestoyourinstancesornot.Lastly,youselectwhichsecuritygroupsyou’d liketoapplytoyourautoscalinginstances,andconfigureEBSstoragevolumesforeachofthem.Youalso specifythekeypairtobeusedtoencryptaccess. Alaunchtemplateissimilartoalaunchconfiguration,exceptthatyoucanhavemultipleversionsofa template.Also,withlaunchtemplates,youcancreateAutoScalingGroupswithmultipleinstancetypesand purchaseoptions. https://portal.tutorialsdojo.com/ 5 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 5 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Onceyouhavecreatedyourlaunchconfigurationorlaunchtemplate,youcanproceedwithcreatingyourauto scalinggroup.Tostartoff,selectthelaunchconfiguration/templateyou’dliketouse.Next,youdefinetheVPC andsubnetsinwhichtheautoscalinggroupwilllaunchyourinstancesin.YoucanusemultipleAvailability ZonesandletEC2AutoScalingbalanceyourinstancesacrossthezones.Youcanoptionallyassociateaload balancertotheautoscalinggroup,andtheservicewillhandleattachinganddetachinginstancesfromtheload balancerasitscales.Notethatwhenyoudoassociatealoadbalancer,youshouldusetheloadbalancer’s healthcheckforinstancehealthmonitoringsothatwhenaninstanceisdeemedunhealthyb ytheload balancer’shealthcheck,theloadbalancerwillinitiateascalingeventtoreplacethefaultyinstance. https://portal.tutorialsdojo.com/ 5 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Next,youdefinethesizeoftheautoscalinggroup—theminimum,desiredandthemaximumnumberof instancesthatyourautoscalinggroupshouldmanage.Specifyingaminimumsizeensuresthatthenumberof runninginstancesdonotfallbelowthiscountatanytime,andthemaximumsizepreventsyourautoscaling groupfromexplodinginnumber.Desiredsizejusttellstheautoscalinggrouptolaunchthisnumberof instancesafteryoucreateit.Sincethepurposeofanautoscalinggroupistoautoscale,youcanadd cloudwatchmonitoringrulesthatwilltriggerscalingeventsonceascalingmetricpassesacertainthreshold. Lastly,youcanoptionallyconfigureAmazonSNSnotificationswheneverascalingeventoccurs,andaddtags toyourautoscalinggroup. References: https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html https://tutorialsdojo.com/aws-auto-scaling/ TypesofEC2AutoScalingPolicies Amazon’sEC2AutoScalingprovidesaneffectivewaytoensurethatyourinfrastructureisabletodynamically respondtochanginguserdemands.Forexample,toaccommodateasuddentrafficincreaseonyourweb application,youcansetyourAutoScalinggrouptoautomaticallyaddmoreinstances.Andwhentrafficislow, haveitautomaticallyreducethenumberofinstances.Thisisacost-effectivesolutionsinceitonlyprovisions https://portal.tutorialsdojo.com/ 5 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran EC2instanceswhenyouneedthem.EC2AutoScalingprovidesyouwithseveraldynamicscalingpoliciesto controlthescale-inandscale-outevents. Inthisarticle,we’lldiscussthedifferencesbetweenasimplescalingpolicy,astepscalingpolicyandatarget trackingpolicy.Andwe’llshowyouhowtocreateanAutoScalinggroupwithstepscalingpolicyapplied. SimpleScaling Simplescalingreliesonametricasabasisforscaling.Forexample,youcansetaCloudWatchalarmtohavea CPUUtilizationthresholdof80%,andthensetthescalingpolicytoadd20%morecapacitytoyourAutoScaling groupbylaunchingnewinstances.Accordingly,youcanalsosetaCloudWatchalarmtohaveaCPUutilization thresholdof30%.Whenthethresholdismet,theAutoScalinggroupwillremove20%ofitscapacityby terminatingEC2instances. WhenEC2AutoScalingwasfirstintroduced,thiswastheonlyscalingpolicysupported.Itdoesnotprovideany fine-grainedcontroltoscalinginandscalingout. TargetTracking Targettrackingpolicyletsyouspecifyascalingmetricandmetricvaluethatyourautoscalinggroupshould maintainatalltimes.Let’ssayforexampleyourscalingmetricistheaverageCPUutilizationofyourEC2auto scalinginstances,andthattheiraverageshouldalwaysbe80%.WhenCloudWatchdetectsthattheaverage CPUutilizationisbeyond80%,itwilltriggeryourtargettrackingpolicytoscaleouttheautoscalinggroupto meetthistargetutilization.OnceeverythingissettledandtheaverageCPUutilizationhasgonebelow80%, anotherscaleinactionwillkickinandreducethenumberofautoscalinginstancesinyourautoscalinggroup. Withtargettrackingpolicies,yourautoscalinggroupwillalwaysberunninginacapacitythatisdefinedbyyour scalingmetricandmetricvalue. Alimitationthough–thistypeofpolicyassumesthatitshouldscaleoutyourAutoScalinggroupwhenthe specifiedmetricisabovethetargetvalue.Youcannotuseatargettrackingscalingpolicytoscaleoutyour AutoScalinggroupwhenthespecifiedmetricisbelowthetargetvalue.Furthermore,theAutoScalinggroup scalesoutproportionallytothemetricasfastasitcan,butscalesinmoregradually.Lastly,youcanuseAWS predefinedmetricsforyourtargettrackingpolicy,oryoucanuseotheravailableCloudWatchmetrics(native andcustom).Predefinedmetricsincludethefollowing: ● ● ● ● ASGAverageCPUUtilization–AverageCPUutilizationoftheAutoScalinggroup. ASGAverageNetworkIn–AveragenumberofbytesreceivedonallnetworkinterfacesbytheAuto Scalinggroup. ASGAverageNetworkOut–AveragenumberofbytessentoutonallnetworkinterfacesbytheAuto Scalinggroup. ALBRequestCountPerTarget–IftheautoscalinggroupisassociatedwithanALBtargetgroup,thisis thenumberofrequestscompletedpertargetinthetargetgroup. https://portal.tutorialsdojo.com/ 6 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran StepScaling StepScalingfurtherimprovesthefeaturesofsimplescaling.Stepscalingapplies“stepadjustments”which meansyoucansetmultipleactionstovarythescalingdependingonthesizeofthealarmbreach. Whenascalingeventhappensonsimplescaling,thepolicymustwaitforthehealthcheckstocompleteand thecooldowntoexpirebeforerespondingtoanadditionalalarm.Thiscausesadelayinincreasingcapacity especiallywhenthereisasuddensurgeoftrafficonyourapplication.Withstepscaling,thepolicycan continuetorespondtoadditionalalarmseveninthemiddleofthescalingevent. Hereisanexamplethatshowshowstepscalingworks: Inthisexample,theAutoScalinggroupmaintainsitssizewhentheCPUutilizationisbetween40%and60%. WhentheCPUutilizationisgreaterthanorequalto60%butlessthan70%,theAutoScalinggroupincreasesits capacitybyanadditional10%.Whentheutilizationisgreaterthan70%,anotherstepinscalingisdoneandthe capacityisincreasedbyanadditional30%.Ontheotherhand,whentheoverallCPUutilizationislessthanor equalto40%butgreaterthan30%,theAutoScalinggroupdecreasesthecapacityby10%.Andifutilization furtherdipsbelow30%,theAutoScalinggroupremoves30%ofthecurrentcapacity. Thiseffectivelyprovidesmultiplestepsinscalingpoliciesthatcanbeusedtofine-tuneyourAutoScaling groupresponsetodynamicallychangingworkload. CreatingaStepScalingPolicyforanAutoScalingGroup Basedonthestepscalingpolicydescribedabove,thefollowingguidewillwalkyouthroughtheprocessof applyingthispolicywhencreatingyourAutoScalinggroup. 1.First,createyourLaunchConfigurationforyourEC2instances.Checkt hisguideifyouhaven’tcreatedone yet. 2.GotoE C2>A utoScalingGroups>C reateAutoScalinggroup https://portal.tutorialsdojo.com/ 6 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 3.SelectyourL aunchConfigurationandclickN extStep. 4.ConfiguredetailsforyourAutoScalinggroup. Groupname–descriptivenameforthisASG. Groupsize–theinitialsizeofyourASG.Let’ssetthisto10forthisexample. Network–theVPCtouseforyourASG. Subnet–thesubnetsintheVPConwheretoplacetheEC2instances.It’srecommendedtoselect subnetsinmultipleavailabilityzonestoimprovethefaulttoleranceofyourASG. e. AdvancedDetails–inthissection,youcanchecktheL oadBalancingoptiontoselectwhichload balancertouseforyourASG.(Wewon’tconfigurealoadbalancerforthisexample).Youcanalsoset theH ealthCheckGracePeriodinthissection.ThisisthelengthoftimethatAutoScalingwaitsbefore checkingtheinstance’shealthstatus.We’llleavethedefaultto300secondsbutyoucanadjustthisif youknowyourEC2instancesneedmoreorlessthan5minutesbeforetheybecomehealthy. a. b. c. d. 5.ClickN ext:Configurescalingpoliciestoproceed. 6.Here,we’llconfigurethestepscalingpolicy.Selectthe“U sescalingpoliciestoadjustthecapacityofthis group”optionandthiswillshowanadditionalsectionfordefiningscalingpolicy.Forthisexample,let’sset5 and15astheminimumandmaximumsizeforthisAutoScalinggroup. https://portal.tutorialsdojo.com/ 6 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 7.IntheScaleGroupSizesection,youwillbeabletosetthescalingpolicyforthegroup.Butthisisonlyfor simplescalingsoyouhavetoclickthe“ ScaletheAutoScalinggroupusingsteporsimplescalingpolicies” linktoshowmoreadvancedoptionsforstepscaling.YoushouldseetheI ncreaseGroupSizeandD ecrease GroupSizesectionafterclickingit. https://portal.tutorialsdojo.com/ 6 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 8.Now,wecansetthestepscalingpolicyforscalingout. a. Setanameforyour“I ncreaseGroupSize”policy.Click“A ddanewalarm”toaddaCloudWatchruleon whentoexecutethepolicy. b. b.OntheC reateAlarmbox,youcansetanSNSnotification.(Wewon’tadditforthisexample). c. c.CreatearuleforwhenevertheA verageCPUUtilizationisgreaterthanorequalto60percentforat least1consecutiveperiodof5minutes.Setanameforyouralarm.ClickC reateAlarm. https://portal.tutorialsdojo.com/ 6 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran d. Forthe“T aketheaction”setting,we’llA dd10percentofthegroupwhenCPUUtilizationisgreaterthan orequalto6 0andlessthan70percent. e. Click“AddStep”toaddanotheraction,we’llA dd30percentofthegroupwhenCPUUtilizationis greaterthanorequalto7 0percent. f. Set1for“A ddinstancesinincrementsofatleast”.Thiswillensurethatatleast1instanceisadded whenthethresholdisreached. https://portal.tutorialsdojo.com/ 6 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran g. Setinstancesneed3 00secondstowarmupaftereachstep. Instancewarmup–thisspecifiesthetimeoutbeforetheinstance’sownmetriccanbeaddedtothegroup.Until thewarmuptimeexpires,theinstancemetric(CPUutilizationinthiscase)isnotcountedtowardthe aggregatedmetricofthewholeAutoScalinggroup. Whilescalingin,instancesthatareterminatingareconsideredaspartofthecurrentcapacityofthegroup. Therefore,itwon’tremovemoreinstancesfromtheAutoScalinggroupthannecessary. 9.Next,wecansetthestepscalingpolicyforthescalingin. a. Setanameforyour“D ecreaseGroupSize”policy.Click“A ddanewalarm”toaddaCloudWatchruleon whentoexecutethepolicy. b. OntheC reateAlarmbox,youcansetanSNSnotification.(Wewon’tadditforthisexample). c. CreatearuleforwhenevertheA verageCPUUtilizationislessthanorequalto40percentforatleast1 consecutiveperiodof5minutes.Setanameforyouralarm.ClickC reateAlarm. d. Forthe“T aketheaction”setting,we’llr emove10percentofthegroupwhenCPUUtilizationislessthan orequalto4 0andgreaterthan30. e. Click“AddStep”toaddanotheraction,we’llr emove30percentofthegroupwhenCPUUtilizationis lessthanore qualto30percent. https://portal.tutorialsdojo.com/ 6 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran f. Set1for“R emoveinstancesinincrementsofatleast”.Thiswillensurethatatleast1instanceis removedwhenthethresholdisreached. 10.ClickN ext:ConfigureNotificationstoproceed.Onthispart,youcanclick“A ddnotification”sothatyou canreceiveanemailwheneveraspecificeventoccurs.Here’sanexample: 11.ClickN ext:ConfigureTags.CreatetagsforinstancesinyourAutoScalinggroup. 12.ClickR eviewtogettothereviewpage. 13.Afterreviewingthedetails,clickC reateAutoScalinggroup. https://portal.tutorialsdojo.com/ 6 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran YourAutoScalinggroupwithstepscalingpoliciesshouldnowbecreated.Remember,theinitialdesiredsizeis 10,withaminimumof5andamaximumof15. Thescale-outrulewillhaveastepscalingpolicy,a10%increaseifCPUutilizationis60–70%,andwilladd 30%moreinstancesifutilizationismorethan70%. Thescale-inrulewillhaveastepscalingpolicy,a10%decreaseifCPUutilizationis30–40%,andwillremove 30%moreinstancesiftheutilizationislessthan30%. References: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html https://docs.aws.amazon.com/autoscaling/ec2/userguide/GettingStartedTutorial.html EC2AutoScalingLifecycleHooks AsyourAutoScalinggroupscale-outorscale-inyourEC2instances,youmaywanttoperformcustomactions beforetheystartacceptingtrafficorbeforetheygetterminated.AutoScalingLifecycleHooksallowyouto performcustomactionsduringthesestages. Forexample,duringthescale-outeventofyourASG,youwanttomakesurethatnewEC2instancesdownload thelatestcodebasefromtherepositoryandthatyourEC2userdatahascompletedbeforeitstartsaccepting traffic.Thisway,thenewinstanceswillbefullyreadyandwillquicklypasstheloadbalancerhealthcheckwhen theyareaddedastargets.Anotherexampleisthis–duringthescale-ineventofyourASG,supposeyour instancesuploaddatalogstoS3everyminute.Youmaywanttopausetheinstanceterminationforacertain amountoftimetoallowtheEC2touploadalldatalogsbeforeitgetscompletelyterminated. LifecycleHooksgiveyougreatercontrolofyourEC2duringthelaunchandterminateevents.Thefollowing diagramshowsthetransitionsbetweentheEC2instancestateswithlifecyclehooks. https://portal.tutorialsdojo.com/ 6 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 1. TheAutoScalinggrouprespondstoascale-outeventandprovisionsanewEC2instance. 2. ThelifecyclehookputsthenewinstanceonP ending:Waitstate.Theinstancestaysinthispausedstate untilyoucontinuewiththe“C ompleteLifecycleAction”operationorthedefaultwaittimeof3600 secondsisfinished.Forexample,youcancreateascriptthatrunsduringthecreationoftheinstanceto downloadandinstalltheneededpackagesforyourapplication.Thenthescriptcancallthe “CompleteLifecycleAction”operationtomovetheinstancetotheInServicestate.Oryoucanjustwait foryourconfiguredtimeoutandtheinstancewillbemovedtotheInServicestateautomatically. 3. TheinstanceisputtoInServicestate.IfyouconfiguredaloadbalancerforthisAutoScalinggroup,the instancewillbeaddedastargetsandtheloadbalancerwillbeginthehealthcheck.Afterpassingthe healthchecks,theinstancewillreceivetraffic. 4. TheAutoScalinggrouprespondstoascale-ineventandbeginsterminatinganinstance. 5. Theinstanceistakenoutoftheloadbalancertarget.Thelifecyclehookputstheinstanceon Terminating:Waitstate.Forexample,youcansetatimeoutof2minutesonthissectiontoallowyour instancetouploadanydatafilesinsideittoS3.Afterthetimeout,theinstanceismovedtothenext state. https://portal.tutorialsdojo.com/ 6 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 6. Autoscalinggroupcompletestheterminationoftheinstance. Duringthepausedstate(eitherlaunchorterminate),youcandomorethanjustruncustomscriptsorwaitfor timeouts.CloudWatchEvents(AmazonEventBridge)receivesthescalingactionandyoucandefinea CloudWatchEvents(AmazonEventBridge)TargettoinvokeaLambdafunctionthatcanperforma pre-configuredtask.Youcanalsoconfigureanotificationtargetforthelifecyclehooksothatyouwillreceivea messagewhenthescalingeventoccurs. ConfigureLifecycleHooksonyourAutoScalingGroups ThefollowingstepswillshowyouhowtoconfigurelifecyclehooksforyourAutoScalinggroup. 1. OntheAmazonEC2Console,underAutoScaling,chooseAutoScalingGroup. 2. SelectyourAutoScalinggroup. 3. Clickt heLifecyclehookstabthenclicktheCreateLifecycleHookbutton. 4. IntheCreateLifecycleHookbox,dothefollowing: https://portal.tutorialsdojo.com/ 7 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran LifecycleHookName–thennameforthislifecyclehook LifecycleTransition–choosewhetherthislifecyclehookisfor“InstanceLaunch”or“Instance Terminate”event.Ifyouneedalifecyclehookforbothevents,youneedtoaddanotherlifecycle hook. ○ Heartbeattimeout–theamountoftime(inseconds)fortheinstancetoremaininthewait state.Therangeisbetween30secondsto7200seconds. ○ DefaultResult–theactiontheAutoScalinggrouptakeswhenthelifecyclehooktimeout elapsesorifanunexpectederroroccurs. ■ IfyouchooseCONTINUEandtheinstanceislaunching,theAutoScalinggroupassumes thattheactionsaresuccessfulandproceedstoputtheinstancetoInServicestate.If youchooseCONTINUEandtheinstanceisterminating,theAutoScalinggroupwill proceedwithotherlifecyclehooksbeforetermination. ■ ChoosingABANDONoneitherstatewillterminatetheinstanceimmediately. ○ NotificationMetadata–additionalinformationtoincludeinmessagestothenotificationtarget. 5. ClickCreatetoapplythelifecyclehookforthisAutoScalinggroup. ○ ○ References: https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html https://docs.aws.amazon.com/cli/latest/reference/autoscaling/put-lifecycle-hook.html https://portal.tutorialsdojo.com/ 7 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ConfiguringNotificationsforLifecycleHooks WhenalifecyclehookoccursonanAutoScalinggroup,itsendseventlogstoAWSCloudWatchEvents (AmazonEventBridge),whichinturncanbeusedtosetuparuleandtargettoinvokeaLambdafunction. ThefollowingstepsassumethatyouhaveconfiguredyourAutoScalingLifecyclehookontheAWSConsole. RouteNotificationstoLambdausingCloudWatchEvents(AmazonEventBridge) 1. CreateyourLambdafunctionandtakenoteoftheARN.TocreateyourLambdafunction,s eethislink. 2. GotoAWSC loudWatch>E vents>R ulesandclickC reaterule. 3. Choosethef ollowingoptions: a. EventPattern–sinceyouwantthisruletofilterAWSevents b. ServiceName:AutoScaling–tofilterfromAutoScalingservice c. Eventtype:InstanceLaunchandTerminate–sincethelifecyclehookhappensonscale-outand scale-inevent d. SpecificInstanceevents–Selectthisandyoucanchoosewhetheryouwantthisruletotrigger forthe“Instance-launchLifecycleAction”orthe“Instance-terminateLifecycleAction” Yourruleshouldbelikethescreenshotbelowforthe“ Instance-launchLifecycleAction”. https://portal.tutorialsdojo.com/ 7 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Yourruleshouldbelikethescreenshotbelowforthe“ Instance-terminateLifecycleAction”. https://portal.tutorialsdojo.com/ 7 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 4. Clickon“ Addtarget”ontherightsideofthepagetoaddatargetforthisRule. 5. Select“ Lambdafunction”astargetandselectyourLambdafunctiononthe“ Function”field.Youcan alsoaddothertargetshereifyouneedto. Here’sascreenshotforreference: https://portal.tutorialsdojo.com/ 7 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 6. Click“Configuredetails”toproceedtothenextstep. 7. Addanametoyourruleandaddadescription.Youwanttomakesurethe“StateEnabled”ischecked. ClickC reateruletofinallycreateyourCloudWatchEvents(AmazonEventBridge)rule. That’sit,theCloudWatchpermissiontotriggertheLambdafunctionisautomaticallytakencareof.Now,when theAutoScalinggroupscales-outorscales-inwithalifecyclehook,theLambdafunctionistriggered. ReceiveNotificationusingAmazonSNS ToreceivelifecyclehooknotificationswithAmazonSNS,youcanusetheAWSCLItoaddalifecyclehook.The keypointhereisthatyouneedanSNStopicandanIAMroletoallowpublishingtothattopic. 1. CreateyourSNStopic.Let’sassumetheSNStopicARNis arn:aws:sns:ap-northeast-1:1234457689123:test-topic.Makesurethatyouremailissubscribedtothis topic. 2. CreateanIAMRolethatyouwillassociatetothelifecyclehook. a. GotoI AM>R ole>C reaterole b. SelectA WSServiceundertheS electtypeoftrustedentity. c. ClickE C2AutoScalingfromthelistundertheC hooseausecasesection. d. ChooseE C2AutoScalingontheS electyourusecasesection. e. ClickN ext:Permissionstoaddpermissionstothisrole.TheA utoScalingServiceRolePolicy shouldalreadybeadded. f. ClickN ext:Tagstoaddtagstothisrole. g. ClickN ext:Reviewtoaddanametothisrole h. ClickC reaterole. https://portal.tutorialsdojo.com/ 7 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 3. GettheARNofthisrole.Let’sassumetheARNis rn:aws:iam::123456789123:role/aws-service a role/autoscaling.amazonaws.com/AWSServiceRoleForAutoScaling_test 4. NowweneedtoaddalifecyclehookandanotificationtoyourAutoScalinggroup.Changethevalues insidethebracketsforthecorrectvalues. Forthescale-outactionlifecyclehook,usethefollowingp ut-lifecycle-hookcommand. awsautoscalingput-lifecycle-hook--lifecycle-hook-name[lifecyclehookname] --auto-scaling-group-name[autoscalinggroupname] --lifecycle-transition autoscaling:EC2_INSTANCE_LAUNCHING--notification-target-arn[putsnstopicarnhere]--role-arn[put iamrolearnhere] Forthescale-inactionlifecyclehook,usethefollowingp ut-lifecycle-hookcommand. awsautoscalingput-lifecycle-hook--lifecycle-hook-name[lifecyclehookname] --auto-scaling-group-name[autoscalinggroupname]--lifecycle-transition autoscaling:EC2_INSTANCE_TERMINATING--notification-target-arn[putsnstopicarnhere]--role-arn [putiamrolearnhere] https://portal.tutorialsdojo.com/ 7 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Onceconfigured,theSNStopicreceivesatestnotificationwiththefollowingkey-valuepair: "Event":"autoscaling:TEST_NOTIFICATION" That’sit.YourAutoScalinglifecyclehookisconfiguredwithanSNSnotificationthatwillsendoutanemailto youoncethescale-outorscale-ineventlifecyclehookputstheinstanceonthe“wait”state. References: https://docs.aws.amazon.com/autoscaling/ec2/userguide/configuring-lifecycle-hook-notifications.html SuspendingandResumingScalingProcesses AmazonEC2AutoScalinghastwoprimaryprocesstypes.ItwilleitherLaunchorTerminateanEC2instance. Otherprocesstypesarerelatedtospecificscalingfeatures: ● AddToLoadBalancer—Addsinstancestotheattachedloadbalancerortargetgroupwhentheyare launched. ● AlarmNotification—NotificationsfromCloudWatchalarmsthatareassociatedwiththegroup'sscaling policies. ● AZRebalance—BalancesthenumberofEC2instancesinthegroupevenlyacrossallofthespecified AvailabilityZoneswhenthegroupbecomesunbalanced. ● HealthCheck—MonitorsthehealthoftheinstancesandmarksaninstanceasunhealthyifAmazon EC2orAWSElasticLoadBalancingtellsAmazonEC2AutoScalingthattheinstanceisunhealthy. ● ReplaceUnhealthy—Terminatesinstancesthataremarkedasunhealthyandthenlaunchesnew instancestoreplacethem. ● ScheduledActions—Performsscheduledscalingactionsthatyoucreateorthatarecreatedby predictivescaling. Youcansuspend/resumeanyoftheprocesstypesaboveifyoudonotwantthemactiveinyourautoscaling group.Youwouldusuallyperformthisifyouaretroubleshootingascalingeventandyoudon’twanttoimpact systemperformance.Whenyoususpendaprimaryprocesstype,otherprocesstypesmayceasetofunction properly. Reference: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-suspend-resume-processes.html SomeLimitationstoRememberforAmazonEC2AutoScalingGroup KeepinmindthatautoscalinggroupsareregionalservicesanddonotspanmultipleAWSRegions.Youcan configurethemtospanmultipleAvailabilityZones,sincetheyweredesignedinthefirstplacetohelpyou https://portal.tutorialsdojo.com/ 7 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran achievehighavailabilityandfaulttolerance.However,ifyouneedtousemultipleRegionsforscaling horizontally,youwillneedtoimplementadifferentsolutiontoachievethisresult.Thesamegoesforlaunch configurationsandlaunchtemplatesyoucreate.TheyonlyexistwithintheRegionyoucreatedthemin.Ifyou needtocopyoveryourlaunchconfigurationsandtemplatestoanotherRegion,simplyrecreatetheminthe desiredtargetRegion.Anotherthingtorememberiswhenyou’veconfiguredyourEC2AutoScalingGroupto spreadyourinstancesacrossmultipleAvailabilityZones,youcannotuseclusterplacementgroupsin conjunctionwiththissetup,sinceclusterplacementgroupscannotspanmultipleAvailabilityZones. https://portal.tutorialsdojo.com/ 7 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonElasticContainerService AmazonECSContainerInstanceRolevsTaskExecutionRolevsTaskRole AnECSclusteristheveryfirstresourceyoucreateinAmazonECS.Youdefineyourcluster’sunderlying infrastructure,instanceprovisioningmodel(on-demandorspot),instanceconfiguration(AMI,type,size, volumes,keypair,numberofinstancestolaunch),clusternetworkandcontainerinstancerole.Thecontainer instanceroleallowstheAmazonECScontaineragentrunninginyourcontainerinstancestocallECSAPI actionsonyourbehalf.Thisroleattachesthee csInstanceRoleIAMpolicy. After creating yourECScluster,oneoftheveryfirstthingsyou’lldonextiscreateyourtaskdefinition.Atask definitionislikeaspecsheetfortheDockercontainersthatwillberunninginyourECSinstancesortasks.The followingaretheparametersthataredefinedinataskdefinition: ● TheDockerimagetousewitheachcontainerinyourtask ● CPUandmemoryallocationforeachtaskoreachcontainerwithinatask ● Thelaunchtypetouse(EC2orFargate) ● TheDockernetworkingmodetouseforthecontainersinyourtask ● Theloggingconfigurationtouse(bridge,host,awsvpc,ornone) ● Whetherthetaskshouldcontinuetorunifthecontainerfinishesorfails ● Thecommandthecontainerexecuteswhenitisstarted ● Volumesthatshouldbemountedonthecontainersinatask ● TheTaskExecutionIAMrolethatprovidesyourtaskspermissionstopullDockerimagesandpublish containerlogs. https://portal.tutorialsdojo.com/ 7 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Lastly,sincethecontainersrunninginyourECStasksmightneedtomakesomeAWSAPIcallsthemselves, theywillneedtheappropriatepermissionstodoso.Thetaskroleprovidesyourcontainerspermissionsto makeAPIrequeststoauthorizedAWSservices.InadditiontothestandardECSpermissionsrequiredtorun tasksandservices,IAMusersalsorequireiam:PassRolepermissionstouseIAMrolesfortasks.Assigninga taskroleisoptional. References: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_execution_IAM_role.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html https://tutorialsdojo.com/amazon-elastic-container-service-amazon-ecs/ https://portal.tutorialsdojo.com/ 8 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ECSNetworkModeComparison AmazonElasticContainerService(ECS)allowsyoutorunDocker-basedcontainersonthecloud.AmazonECS hastwolaunchtypesforoperation:EC2andFargate.TheEC2launchtypeprovidesEC2instancesashostsfor yourDockercontainers.FortheFargatelaunchtype,AWSmanagestheunderlyinghostssoyoucanfocuson managingyourcontainersinstead.Thedetailsandconfigurationonhowyouwanttorunyourcontainersare definedontheECSTaskDefinitionwhichincludesoptionsonnetworkingmode. Inthispost,we’lltalkaboutthedifferentnetworkingmodessupportedbyAmazonECSanddeterminewhich modetouseforyourgivenrequirements. ECSNetworkModes AmazonElasticContainerServicesupportsfournetworkingmodes:B ridge,H ost,a wsvpc,andN one.This selectionwillbesetastheDockernetworkingmodeusedbythecontainersonyourECStasks. https://portal.tutorialsdojo.com/ 8 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Bridgenetworkmode–Default Whenyouselectthe< default>networkmode,youareselectingtheB ridgenetworkmode.Thisisthedefault modeforLinuxcontainers.ForWindowsDockercontainers,the< default>networkmodeisN AT.Youmust select< default>ifyouaregoingtoregistertaskdefinitionswithWindowscontainers. BridgenetworkmodeutilizesDocker’sbuilt-invirtualnetworkwhichrunsinsideeachcontainer.Abridge networkisaninternalnetworknamespaceinthehostthatallowsallcontainersconnectedonthesamebridge networktocommunicate.Itprovidesisolationfromothercontainersnotconnectedtothatbridgenetwork.The Dockerdriverhandlesthisisolationonthehostmachinesothatcontainersondifferentbridgenetworks cannotcommunicatewitheachother. https://portal.tutorialsdojo.com/ 8 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Thismodecantakeadvantageofdynamichostportmappingsasitallowsyoutorunthesameport(ex:port 80)oneachcontainer,andthenmapeachcontainerporttoadifferentportonthehost.However,thismode doesnotprovidethebestnetworkingperformancebecausethebridgenetworkisvirtualizedandDocker softwarehandlesthetraffictranslationsontrafficgoinginandoutofthehost. Hostnetworkmode HostnetworkmodebypassestheDocker’sbuilt-invirtualnetworkandmapscontainerportsdirectlytoyour EC2instance’snetworkinterface.ThismodesharesthesamenetworknamespaceofthehostEC2instanceso yourcontainerssharethesameIPwithyourhostIPaddress.Thisalsomeansthatyoucan’thavemultiple containersonthehostusingthesameport.Aportusedbyonecontaineronthehostcannotbeusedby anothercontainerasthiswillcauseconflict. https://portal.tutorialsdojo.com/ 8 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ThismodeoffersfasterperformancethanthebridgenetworkmodesinceitusestheEC2networkstack insteadofthevirtualDockernetwork. awsvpcmode Thea wsvpcmodeprovidesanelasticnetworkinterfaceforeachtaskdefinition.Ifyouhaveonecontainerper taskdefinition,eachcontainerwillhaveitsownelasticnetworkinterfaceandwillgetitsownIPaddressfrom yourVPCsubnetIPaddresspool.ThisoffersfasterperformancethanthebridgenetworksinceitusestheEC2 networkstack,too.ThisessentiallymakeseachtaskactliketheirownEC2instancewithintheVPCwiththeir ownENI,eventhoughthetasksactuallyresideonanEC2host. https://portal.tutorialsdojo.com/ 8 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Awsvpcmodeisrecommendedifyourclusterwillcontainseveraltasksandcontainersaseachcan communicatewiththeirownnetworkinterface.ThisistheonlysupportedmodebytheECSFargateservice. Sinceyoudon’tmanageanyEC2hostsonECSFargate,youcanonlyuseawsvpcnetworkmodesothateach taskgetsitsownnetworkinterfaceandIPaddress. Nonenetworkmode ThismodecompletelydisablesthenetworkingstackinsidetheECStask.Theloopbacknetworkinterfaceis theonlyonepresentinsideeachcontainersincetheloopbackinterfaceisessentialforLinuxoperations.You can’tspecifyportmappingsonthismodeasthecontainersdonothaveexternalconnectivity. https://portal.tutorialsdojo.com/ 8 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Youcanusethismodeifyoudon’twantyourcontainerstoaccessthehostnetwork,orifyouwanttousea customnetworkdriverotherthanthebuilt-indriverfromDocker.Youcanonlyaccessthecontainerfrominside theEC2hostwiththeDockercommand. References: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#network_ mode https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html https://portal.tutorialsdojo.com/ 8 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ECSTaskPlacementStrategies ● ● ● At askplacementstrategyisanalgorithmforselectinginstancesfortaskplacementortasksfor termination.WhenataskthatusestheEC2launchtypeislaunched,AmazonECSmustdetermine wheretoplacethetaskbasedontherequirementsspecifiedinthetaskdefinition,suchasCPUand memory.Similarly,whenyouscaledownthetaskcount,AmazonECSmustdeterminewhichtasksto terminate. At askplacementconstraintisarulethatisconsideredduringtaskplacement. ○ YoucanuseconstraintstoplacetasksbasedonAvailabilityZoneorinstancetype. ○ Youcanalsoassociateattributes,whicharename/valuepairs,withyourcontainerinstances andthenuseaconstrainttoplacetasksbasedonattribute. Taskplacementstrategytypes: ○ Binpack– PlacetasksbasedontheleastavailableamountofCPUormemory.Thisminimizes thenumberofinstancesinuseandallowsyoutobecost-efficient.Forexample,youhave runningtasksinc5.2xlargeinstancesthatareknowntobeCPUintensivebutarenotmemory consuming.Youcanmaximizeyourinstances’memoryallocationbylaunchingtasksinthem insteadofspawninganewinstance. ○ Random– Placetasksrandomly.Youusethisstrategywhentaskplacementortermination doesnotmatter. https://portal.tutorialsdojo.com/ 8 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ○ Spread– Placetasksevenlybasedonthespecifiedvalue.Acceptedvaluesareattribute key-valuepairs,instanceId,orhost.Spreadistypicallyusedtoachievehighavailabilityby makingsurethatmultiplecopiesofataskarescheduledacrossmultipleinstances.S pread acrossAvailabilityZonesisthedefaultplacementstrategyusedforservices. ● ● ● ● Youcancombinedifferentstrategytypestosuityourapplicationneeds. Taskplacementstrategiesareabesteffort. Bydefault,FargatetasksarespreadacrossAvailabilityZones. Bydefault,ECSusesthefollowingplacementstrategies: ○ WhenyouruntaskswiththeRunTaskAPIaction,tasksareplacedrandomlyinacluster. ○ WhenyoulaunchandterminatetaskswiththeCreateServiceAPIaction,theservicescheduler spreadsthetasksacrosstheAvailabilityZones(andtheinstanceswithinthezones)inacluster. References: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement.html https://aws.amazon.com/blogs/compute/amazon-ecs-task-placement/ https://portal.tutorialsdojo.com/ 8 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonElasticKubernetesService RemainCloudAgnosticwithKubernetes AmazonEKSletsyoueasilyrunandscaleKubernetesapplicationsintheAWScloudoron-premises. KubernetesisnotanAWSnativeservice.Kubernetesisanopen-sourcecontainer-orchestrationtoolusedfor deploymentandmanagementofcontainerizedapplications.AmazonEKSjustbuildsadditionalfeaturesontop ofthisplatformsoyoucanrunKubernetesinAWSmucheasier.Ifyouhavecontainerizedapplicationsrunning on-premisesthatyouwouldliketomoveintoAWS,butyouwishtokeepyourapplicationsascloudagnosticas possiblethenEKSisagreatchoiceforyourworkload.AlltheKubernetes-supportedtoolsandpluginsyouuse on-premiseswillalsoworkinEKS.Youdonotneedtomakeanycodechangeswhenreplatformingyour applications. AnEKSclusterconsistsoftwocomponents: ● TheAmazonEKScontrolplane ● AndtheAmazonEKSnodesthatareregisteredwiththecontrolplane TheAmazonEKScontrolplaneconsistsofcontrolplanenodesthatruntheKubernetessoftware,suchase tcd andtheKubernetesAPIserver.ThecontrolplanerunsinanaccountmanagedbyAWS,andtheKubernetesAPI isexposedviathecluster’sEKSendpoint.AmazonEKSnodesruninyourAWSaccountandconnecttoyour cluster'scontrolplaneviatheAPIserverendpointandacertificatefilethatiscreatedforyourcluster. TojoinworkernodestoyourAmazonEKScluster,youmustcompletethefollowing: 1. EnableDNSsupportforyourcluster’sVPC 2. ProvidesufficientIAMpermissionsforyourinstanceprofile'sworkernodes 3. Configuretheuserdataforyourworkernodes 4. Launchyourworkernodesinasubnetbelongingtoyourcluster’sVPC 5. Updatethea ws-authConfigMapwiththeN odeInstanceRoleofyourworkernodes 6. Addintherequiredsecuritygrouprulesofyourworkernodes 7. Setthetagsforyourworkernodes 8. VerifythatyourworkernodescanreachtheAPIserverendpointforyourEKScluster 9. Connecttoaworkernode'sEC2instanceviaSSHandreviewthekubeletagentlogsforanyerrors References: https://docs.aws.amazon.com/eks/latest/userguide/clusters.html https://aws.amazon.com/premiumsupport/knowledge-center/eks-worker-nodes-cluster/ https://portal.tutorialsdojo.com/ 8 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSLambda ConcurrencyLimits AWSLambdaisablessingfordeveloperswhodonotwanttomaintainanyinfrastructure.Youdon’tneedto worryaboutthingslikesizing,scaling,patching,andothermanagementoperationsthatyouwouldnormally haveonserverssuchasEC2instances.InLambda,youjustneedtochoosearuntimeenvironment,provide yourcode,andconfigureotherbasicsettingslikethememorysizeavailableforeachfunctioncall,thetimeout ofeachfunctionrun,functiontriggersifapplicable,etc.AlthoughAWSLambdaisserverless,thisdoesn’tmean thatyoudon’thaveanythingtomanageonyourend.Ifleftunchecked,you’llbesurprisedhoweachfunction executioncanaddtoyourmonthlybill.YourotherLambdafunctionsmightnotevenexecuteproperlyifoneof yourfunctionsishoggingallthecomputeresourcesavailabletoyou.Aswitheverythingthatscales automatically,youshouldbeplacinghardlimitsonthescalabilitysoitwillnotexplodeallovertheplace.In AWSLambda,thislimitisknownasc oncurrencylimit. Concurrencyisthenumberofrequeststhatyourfunctionisservingatanygiventime.Whenyourfunctionis invoked,Lambdaallocatesaninstanceofittoprocesstheevent.Bydefault,yourAWSaccounthasadefault quotaof1000concurrentLambdaexecutionsperRegion.AllyourLambdafunctionscountagainstthislimit. BysettingaconcurrencylimitforyourLambdafunction,youreserveaportionofyourconcurrencylimitforthat givenfunction.Thisallowsyoutothrottlethegivenfunctiononceitreachesthemaximumnumberof concurrentexecutionsyou’vesetforit. Therearetwotypesofconcurrency: ● Reservedconcurrency–Apoolofrequeststhatcanonlybeusedbythefunctionthatreservedthe capacity,andalsopreventsthefunctionfromusingunreservedconcurrency.Afunctioncannotutilize anotherfunction’sreservedconcurrency,sootherfunctionscan'tpreventyourfunctionfromscaling. ● Provisionedconcurrency–Initializesarequestednumberofexecutionenvironmentssothattheyare preparedtorespondtoyourfunction'sinvocationswithoutanyfluctuations. Bothoftheseconcurrencyplanscanbeusedtogether,butyourprovisionedconcurrencycannotexceedyour maximumreservedconcurrency.Furthermore,LambdaintegrateswithApplicationAutoScalingwhichletsyou manageprovisionedconcurrencyforyourfunctionsbasedonascheduleoronutilization.Managingyour concurrencylimitsmakessurethatyourLambdafunctionswillrunproperly,andthattheydon’tscaleoutof control. References: https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html https://aws.amazon.com/about-aws/whats-new/2017/11/set-concurrency-limits-on-individual-aws-lambda-fu nctions/ https://tutorialsdojo.com/aws-lambda/ https://portal.tutorialsdojo.com/ 9 0 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran MaximumMemoryAllocationandTimeoutDuration AWSLambdaallocatesCPUpowerinproportiontotheamountofmemoryyouconfigureforasinglefunction. Andeachfunctionalsohasatimeoutsetting,whichistheamountoftimeasinglefunctionexecutionis allowedtocompletebeforeatimeoutisreturned.ForeveryLambdafunction,youcanindicatethemaximum memoryyou’dliketoallocateforasingleexecutionaswellastheexecutiondurationofthefunctionbefore timingout.Theamountofmemoryyoucanallocateforafunctionisbetween128MBand10,240MBin1-MB increments.At1,769MB,afunctionhastheequivalentofonevCPU.Forthetimeout,thedefaultisthree seconds,andthemaximumallowedvalueis900secondsor15mins. Knowingthis,somemightthink“W hynotjustallocatethemaximummemoryandtimeoutforallLambda functions?”Well,firstofall,allocatinglargeamountsofmemorywhenyoudon’tneeditwillresultinan increaseincost.Youarechargedanamountcorrespondingtoyourmemoryallocationforevery1msthatyour functionrunsperexecution.Samegoeswithyourtimeoutsettings.Asidefrombeingbilledforthedurationof yourfunctionexecutions,therearecaseswhereanapplicationshouldfailfast.Choosingtheoptimalmemory andtimeoutsettingscanbedifficulttogaugeforanewfunction,butwithafewtestrunsandmetricdatain CloudWatch,youshouldbeabletodeterminewhatworksbestforyou. References: https://docs.aws.amazon.com/lambda/latest/dg/configuration-console.html https://docs.aws.amazon.com/lambda/latest/dg/configuration-memory.html https://docs.aws.amazon.com/whitepapers/latest/serverless-architectures-lambda/timeout.html https://portal.tutorialsdojo.com/ 9 1 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Lambda@EdgeComputing Lambda@EdgeisafeatureofAmazonCloudFrontthatletsyourunLambdacodeatedgelocationsaroundthe world.SincethisisafeaturepoweredbybothLambdaandCloudFront,thereisnoinfrastructuretomaintainor deploy.YouonlyneedtoprovideyourNodeJSorPythoncodeandconfigurethetypeofCloudFrontrequests thatyourfunctionwillrespondto,andAWShandlestheprovisioningandscalingofeverythingelseneededby yourcode. YourLambda@EdgefunctionscanbetriggeredinresponsetocertaintypesofCloudFrontrequests: ● AfterCloudFrontreceivesarequestfromanenduserordevice(v iewerrequest) ● BeforeCloudFrontforwardstherequesttotheorigin(o riginrequest) ● AfterCloudFrontreceivestheresponsefromtheorigin(o riginresponse) ● BeforeCloudFrontforwardstheresponsetoanenduserordevice(v iewerresponse) ACloudFrontdistributioncanhavemultipleLambdafunctionsassociatedwithit.Lambda@Edgesimplifies andspeedsupalotofbasictaskssincethecodeexecutiondoesnotneedtoberoutedallthewaytoyour application’slocationbeforeitcansendbackaresponse.AssociatingaLambdafunctiontoyourCloudFront distributionisfairlystraightforward.YoujustneedtochoosethetypeoftriggerforyourLambdafunction,and inputthecorrespondingLambdafunctionARN.YoucanassociateyourLambdafunctionsduringthecreation ofyourCloudFrontdistribution,ormodifyanexistingdistribution. AfewexamplesonhowyoucanuseLambda@Edgeinclude: 1) SenddifferentobjectstoyourusersbasedontheUser-Agentheader,whichcontainsinformationabout thedevicethatsubmittedtherequest. 2) Inspectheadersorauthorizedtokens,insertingacorrespondingheaderandallowingaccesscontrol beforeforwardingarequesttotheorigin. 3) Add,delete,andmodifyheaders,andrewritetheURLpathtodirectuserstodifferentobjectsinthe cache. 4) GeneratenewHTTPresponsestodothingslikeredirectunauthenticateduserstologinpages,orcreate anddeliverstaticwebpages. https://portal.tutorialsdojo.com/ 9 2 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ThedifferencebetweenLambda@EdgeandLambdawithanAPIGatewaysolutionisthatAPIGatewayand Lambdaareregionalservices.UsingLambda@EdgeandAmazonCloudFrontallowsyoutoexecutelogic acrossmultipleAWSlocationsbasedonwhereyourendviewersarelocated. References: https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html https://aws.amazon.com/lambda/edge/ https://tutorialsdojo.com/aws-lambda/ ConnectingYourLambdaFunctionToYourVPC TherearesomecaseswhenyourLambdafunctionsneedtointeractwithyourAWSresources.Thisisfairly easytodoiftheyareaccessibleviathepublicinternetsuchasanAmazonS3bucketorapublicEC2instance. Butforprivateresources,youneedtotakesomeextrasteps.Bydefault,AWSLambdaisnotabletoaccess resourcesinaVPC.ALambdafunctioncannotproperlyresolvenetworktraffictoyourprivatesubnets.Thisis especiallyfrustratingwhenyouneedyourLambdafunctiontoconnecttoanRDSdatabaseforexample.To grantVPCconnectivitytoyourLambdafunctions,youmustjointhemtoyourVPC,choosethesubnetsthat yourfunctionsshouldhaveaccessto,andspecifythenecessarysecuritygroupsthatwillallowcommunication betweenyourVPCresources. WhenyouconnectafunctiontoaVPC,Lambdacreatesanelasticnetworkinterfaceforeachsubnetyou includedinyourfunction'sVPCconfiguration.Multiplefunctionsconnectedtothesamesubnetssharenetwork interfaces.Lambdausesyourfunction'spermissionstocreateandmanagenetworkinterfaces.Therefore,your function'sexecutionrolemusthavethesamepermissionsundertheA WSLambdaVPCAccessExecutionRole IAMRole.Onceyou’veconnectedyourfunctionstoaVPC,yourfunctionswillceasetohavepublicinternet accessunlessyourVPChasaninternetgatewayand/oraNAT(dependingonwhichsubnetsyoulinkyour functions).YoucanalsoutilizeVPCendpointstoconnecttocertainAWSservicesifNATisanexpensive option. YoucanconfigureaLambdafunctiontobepartofaVPCimmediatelyatcreation,oredittheVPCsettingsof anexistingfunction.AWSrecommendsthatyouchooseatleasttwosubnetsforhighavailability.IftheAZofa subnetbecomesunavailable,andyourLambdafunctionisrunninginthissubnet,thenyourfunctioncannotbe invoked. References: https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html https://aws.amazon.com/blogs/compute/announcing-improved-vpc-networking-for-aws-lambda-functions/ https://portal.tutorialsdojo.com/ 9 3 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonSimpleStorageService(S3) S3StandardvsS3Standard-IAvsS3OneZone-IAvsS3IntelligentTiering AdditionalNotes: ● ● ● ● DatastoredintheS3OneZone-IAstorageclasswillbelostintheeventofAZdestruction. S3Standard-IAcostslessthanS3Standardintermsofstorageprice,whilestillprovidingthesamehigh durability,throughput,andlowlatencyofS3Standard. S3OneZone-IAhas20%lesscostthanStandard-IA. Itisrecommendedtousemultipartuploadforobjectslargerthan100MB. AccessingS3BucketsPubliclyandPrivately Bydefault,anewlycreatedS3bucketandtheobjectsyouuploadinitwillnotbepubliclyaccessible.Userswho needaccesstoyourS3bucketandobjectswillneedtobegrantedexplicitpermissionsfromthebucketowner orfromanadministrator.Toprovideaccesstousersandotherservices,youcancreateresource-based policiessuchasbucketpoliciesandaccesscontrolpoliciesthatdefinewhohasaccesstowhat.AWSusers https://portal.tutorialsdojo.com/ 9 4 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran willalsoneedtheappropriateIAMpermissionsbeforetheycanperformanyactionsonyourbucketand objects. WeknowthatonceauserisprovidedaccesstoanS3bucketanditscontents,allAPIactivityonthisbucket willpassthroughthepublicinternet.ThisistruewhethertherequestoriginatesfromwithinanAWSVPCor not.ThatiswhyyourS3bucketrequiresauniquename,touniquelyidentifyitwithapubliclyaccessibleS3 URL.ButwhatifyoupreferaccessingS3privatelyfromwithinyourVPC?Whatifyoucannotaffordhavingthe datapassthroughthepublicinternet?Thefirstthingyou’llneedtodoiscreateaVPCendpoint. AVPCendpointisavirtualdevicethatallowsyourVPCresourcestoaccessAWSservicesdirectlywithout leavingtheAWSnetwork.VPCendpointsarepoweredbyAWSPrivateLink,whichenablesyoutoprivately accessservicesbyusingtheirprivateIPaddresses.YourVPCresourcesdonotneedtohavepublicIP addressestoconnecttoAmazonS3whenusingaVPCendpoint.TocreateaVPCendpoint,youfirstchoose whattypeofendpointyouwishtousetoaccessAmazonS3: ● AninterfaceendpointisanelasticnetworkinterfacewithaprivateIPaddressfromtheIPaddress rangeofthesubnet(s)whereyouchoosetodeploytheENI(s).Interfaceendpointsallowaccessfrom on-premisesifitisconnectedtoyourVPC.Italsoallowsaccessfromresourcesthatbelongina differentregionfromyourS3bucket.Youarebilledforeachinterfaceendpointyoucreate. ● Ag atewayendpointisagatewaythatyouspecifyinyourroutetable(s)todirecttraffictoS3.Gateway endpointsdonotallowaccessfromon-premisesnetworks,anddonotsupportcross-regionaccess. Gatewayendpointsarefreeofcharge. Next,youselecttheVPCyouwishtoassociateyourendpointwith.Ifyouchoosetheinterfaceendpointoption, youindicatewhichAZsandsubnetstolaunchyourendpointsin.Youalsoselectthesecuritygroupsthatare goingtobeattachedtotheENIs.Ifyouchoosethegatewayendpointoption,youindicatetheroutetablesthat willhavearoutetotheendpoint. https://portal.tutorialsdojo.com/ 9 5 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Optionally,youcancreateanaccesspolicyspecifyingtheS3bucketsyourendpointwillhaveaccessto,the principalsthatwillbeabletouseyourendpoint,andtheactionstheycanmakethroughyourendpoint.Youcan alsoaddtagstoyourendpoints. https://portal.tutorialsdojo.com/ 9 6 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Onceyouhavecreatedyourendpoint,besuretoupdateyourbucketpolicywithaconditionthatallowsusersto accesstheS3bucketwhentherequestisfromtheVPCendpoint. References: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-overview.html https://docs.aws.amazon.com/AmazonS3/latest/userguide/privatelink-interface-endpoints.html https://tutorialsdojo.com/amazon-s3/ AmazonS3BucketFeatures Inthissection,wewilltacklethefeaturesavailableinanS3Bucket: Lifecyclepolicies—ThesepoliciesdeterminehowyourobjectsarestoredinyourS3bucket.Asyouknow, therearemanyS3storagetierstochoosefrom.Lifecyclepoliciesletyoutransitionyourobjectsfromone storagetiertoanother,usuallytoreducestoragecostortoarchiveanobject.Lifecyclepoliciesarealsousedto https://portal.tutorialsdojo.com/ 9 7 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran expireversionedobjectsandpermanentlydeletethemfromyourbucket.Whencreatingalifecyclepolicy,you configuretwoparametersforeachtransitionordeletionaction: ● Whetherthepolicyshouldapplytoallobjectsinthebucketoronlyagroupofobjectswithmatching prefix ● Thenumberofdaysafterobjectcreationbeforetheactionisapplied S3BucketPoliciesandACLs—S3bucketpoliciesareJSON-basedpoliciesusedforaccesscontrol.They worksimilarlytoIAMpolicies,butareinsteadappliedontoyourS3bucketsratherthanindividualIAMusers. YouaddabucketpolicytoabuckettograntotherAWSaccountsorIAMusersaccesspermissionsforthe bucketandtheobjectsinit.Accesscontrollists(ACLs),ontheotherhand,arepresetoptionsthatyoucan enabletoallowreadand/orwriteaccessforotherAWSaccounts,usersorthepublic. ObjectOwnership—Ifyouhaveexternalusersuploadingobjectstoabucketyouown,youcanenable bucket-owner-full-controlcannedaccesscontrollist(ACL)toautomaticallyassumefullownershipoverthe objectstheyupload. MultipartUpload—Forobjectslargerthan100MB,youcanuseS3’smultipartuploadfeaturetodivideyourfile intopartsanduploadthemindividually.Afterallpartsofyourobjectareuploaded,S3assemblestheseparts andcreatestheobject.Multipartuploadoffersmultiplebenefitssuchasfasterthroughputthankstoparallel upload,retransmissionforfaileduploads,pauseandresumeuploadcapabilities,andbetterstabilityfor uploadingfileswithunknownfilesizes. S3TransferAcceleration—S3TAleveragesAmazonCloudFront’sgloballydistributededgelocationsto optimizelongdistancetransfersfromyourclienttoAmazonS3.Althoughthereisnoguaranteethatyouwill experiencefastertransferspeeds,S3TAonlybillsyouwhenthereisanimprovementcomparedtoaregularS3 transfer.UsingS3TAisassimpleasenablingitinyourS3bucket.S3TransferAccelerationalsosupportsall bucketlevelfeaturesincludingmultipartupload. StaticWebHosting—AnS3bucketcanbemadetohoststaticfilessuchasimagesandwebpages.Sincean S3bucketispublic,youcanconfigureitasawebsite,usingtheS3URLasyourdomainname.Thisfeatureis convenientifyouonlyneedasimpleandcost-effectivewebpagetogetyougoing.WhenyouconfigureyourS3 bucketasastaticwebsite,makesuretosetyourobjectsaspubliclyavailabletoo.AmazonS3website endpointsdonotsupportHTTPSoraccesspoints.YouwillneedtoaddaCloudFronttouseHTTPS.Youcan alsoprovideyourstaticwebsiteacustomdomainnameusingaDNSrecordinRoute53pointingtoyourS3 bucketURL.Forthismatter,thedomainnameandthenameoftheS3bucketmustbeanexactmatch. Versioning—Versioningletsyoukeepacopyofanobjectwheneveritisoverwrittenasitsv ersions.Youcan preserveandrestorebacktoaspecificversionofanobjectifyouneedto.Thisfeaturealsoprotectsyour objectsfromaccidentaldeletions,sinceversioningplacesdeletionmarkersonanobjectversiontomarkitas removed,ratherthanpermanentlydeletingitfromyourS3bucket.Bydefault,versioningisdisabledonbuckets, andyoumustexplicitlyenableit.Onceithasbeenenabled,itcannotbedisabled,butitcanbesuspended. https://portal.tutorialsdojo.com/ 9 8 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Whenyoususpendversioning,anyfutureupdatesonyourobjectswillnotcreateanewversion,butexisting versionswillstillberetained.Sinceaversionofanobjectalsotakesupstoragespace,versioningwillincur additionalS3costs,soonlyusethisfeatureifyouneedit. MFADelete— MFAdeleteisasecurityfeaturethatisusedtogetherwithS3Versioningtopreventunauthorized oraccidentaldeletionsinyourS3bucket.Whenenabled,thebucketownermustincludetwoformsof authenticationinanyrequesttodeleteanobjectversionorchangetheversioningstateofthebucket.These twoformsofauthenticationarehis/hersecuritycredentialsandtheconcatenationofavalidserialnumber,a space,andthesix-digitMFAcode. Cross-RegionReplicationandSame-RegionReplication—Replicationisafeaturethatallowsyoutoreplicate objectsfromanS3bucketinoneregiontoanotherbucketinthesameregionorinanotherregion.Bucketsthat areconfiguredforobjectreplicationcanbeownedbythesameAWSaccountorbydifferentaccounts.Objects canbereplicatedtomultipledestinationbuckets.Bydefault,S3replicationdoesnotreplicateexistingobjects, onlyobjectsthathavebeenuploadedafterreplicationwasenabled.YoumustcontactAWSSupportCenterif youintendtoreplicateexistingobjects. ObjectLock—Allowsyoutostoreobjectsusingawrite-once-read-many(WORM)model.Objectlockprevents anobjectfrombeingdeletedoroverwrittenforafixedamountoftimeorindefinitely. S3EventNotifications—ThisletsyoureceivenotificationsoncertaineventsthatoccurinyourS3bucket.To enablenotifications,youmustfirstaddanotificationconfigurationthatidentifiestheeventsyouwantS3to publishandthedestinations(SNS,SQS,Lambda)whereyouwantthenotificationstobesent.AmazonS3can publishnotificationsforthefollowingevents: ● Newobjectcreatedevents ● Objectremovalevents ● Restoreobjectevents ● Replicationevents Cross-originResourceSharing(CORS)—CORSisawayforclientapplicationsthatareloadedinonedomain tointeractwithresourcesinadifferentdomain.Whenthisfeatureisdisabled,requestsdirectedtoadifferent domainwillnotworkproperly.IfyourS3bucketisusedforwebhosting,verifyifyouneedtoenableCORS.To configureyourbuckettoallowcross-originrequests,youcreateaCORSconfigurationdocument.Thisisa documentwithrulesthatidentifytheoriginsthatyouwillallowtoaccessyourbucket,theoperations(HTTP methods)thatwillsupporteachorigin,andotheroperation-specificinformation. PresignedURLs-Bydefault,allS3bucketsandobjectsareprivate,andcanonlybeaccessedbytheobject owner.ObjectownerscanshareobjectswithotherusersorenableuserstouploadobjectstotheirS3buckets usingapresignedURL.ApresignedURLgrantsotherstime-limitedpermissiontodownloadoruploadobjects fromandtotheowner’sS3buckets.WhenobjectownerscreatepresignedURLs,theyneedtospecifytheir securitycredentials,thebucketnameandobjectkey,theHTTPmethod(GETtodownloadtheobject),and https://portal.tutorialsdojo.com/ 9 9 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran expirationdateandtime.ThebucketownerthensharestheseURLstothosewhoneedaccesstotheobjects ortothebuckets.ApresignedURLcanbeusedmanytimes,aslongasithasnotexpired. References: https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html https://tutorialsdojo.com/amazon-s3/ AmazonS3PricingDetails SomestoragetiersinAmazonS3haveminimumusagerequirementsthatmayaffectyourbillingifyouare unawareofthem. StorageTier S3Standard S3Intelligent Tiering S3 Infrequent Access S3One Zone-IA S3Glacier S3Glacier DeepArchive Minimum capacity chargeper object None None 128KB 128KB 40KB 40KB Minimum storage duration charge None 30days 30days 30days 90days 180days None perGB retrieved perGB retrieved perGB retrieved perGB retrieved Retrievalfee None Minimumcapacitychargeperobjectmeansthatanobjectshouldmeetthespecifiedminimumsizeonce storedinthecorrespondingstoragetier.Iftheobjectislessthanthespecifiedminimumthentheobjectis billedaccordingtotheminimumsizerequirement.Forexample,iftheminimumcapacitychargeis128KBand yourobjectis40KBonlythenitisbilledasa128KBobjectbyAmazonS3. Minimumstoragedurationchargeistheamountoftimethattheobjectshouldbestoredinthecorresponding storagetier.Iftheobjectisdeletedbeforethedurationpassesthentheobjectisbilledasifitwasstoredfor thewholeminimumduration.Forexample,ifyouhavea128KBobjectstoredinS3IAfor15daysandyou deleteitthenextday,AmazonS3willcontinuetochargeyouanequivalentofstoringa128KBfileforthenext 15days. References: https://portal.tutorialsdojo.com/ 1 00 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://aws.amazon.com/s3/storage-classes/ https://tutorialsdojo.com/amazon-s3/ AmazonS3EncryptionMethods WhenyouareusingAmazonS3,itisalwaysimportanttoknowhowyoucanprotectyourdata,especiallyifit contains sensitive information. Amazon S3 offers both Server-Side encryption and Client-Side encryption to secureyourobjectsatrestandin-transit. ● WithServer-Sideencryption(SSE),AmazonS3encryptsyourobjectbeforesavingitondisksinitsdata centersandthendecryptsitwhenyoudownloadtheobjects.Youhavethreedifferentoptionsonhow youchoosetomanagetheencryptionkeys. ○ With AmazonS3-ManagedKeys(SSE-S3)—S3usesAES-256encryptionkeystoencryptyour objects,andeachobjectisencryptedwithauniquekey. ○ With Customer Master Keys (CMKs) stored in AWS Key Management Service (SSE-KMS) — SimilartoSSE-S3,butyourkeyismanagedinadifferentservice,whichisAWSKMS.SSE-KMS providesyouwithanaudittrailthatshowswhenyourCMKwasusedandbywhom.Additionally, you can create and manage customer managed CMKs or use AWS managed CMKs that are uniquetoyou,yourservice,andyourRegion. ○ WithCustomer-ProvidedKeys(SSE-C)—YoumanagetheencryptionkeysandS3managesthe encryptionanddecryptionprocess. ● WithClient-Sideencryption(CSE),dataisfirstencryptedontheclient-sidebeforeuploadedtoAmazon S3.Youmanagetheencryptionprocess,theencryptionkeys,andrelatedtools.Theencryptionkeyyou usecanbeanyofthefollowing: ○ Customermasterkey(CMK)storedinAWSKMS. ○ Masterkeythatyoustorewithinyourapplication. References: https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingEncryption.html https://tutorialsdojo.com/amazon-s3/ https://portal.tutorialsdojo.com/ 1 01 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonS3Glacier AmazonS3GlaciervsAmazonS3GlacierDeepArchive AmazonS3GlacierDeepArchiveissimilartoAmazonS3Glacierinthattheyarebothstorageclassesbuiltfor archivingobjectsthatyouwon’tneedagainforalongtime.DeepArchiveoffersamorecompetitivepricepoint thanS3Glacierifyourprimaryrequirementisadurableandsecurelong-termstorageforlargeamountsof data,butthetradeoffisthatretrievaltimestakelongertofinish.Tomakethecomparisonofthesetwostorage classessimpler,we’lllistdownthekeysimilaritiesanddifferencesintwoparts. Similarities: ● Lowcoststorageoptionforarchivingcolddatathatwon’tberetrievedoften. ● SupportslifecyclepoliciestotransitionobjectsfromS3Standard,Standard-IA,OneZone-IAand IntelligentTieringtoGlacierandGlacierDeepArchive. ● Offersdurabilityof99.999999999%ofobjectsacrossthreeormoreAvailabilityZoneswith99.99% availability. ● YoumayusetheS3APItodirectlyuploadobjectstothesestorageclasses. ● ObjectsthatarestoredintheS3GlacierorS3GlacierDeepArchivestorageclassesarenotavailablein realtime. ● Whenyouinitiatearestorerequest,atemporarycopyoftheobjectismadeavailablefortheduration thatyouspecifyintherequest. ● SupportforObjectLockandCross-RegionReplicationfeatures. ● SupportsbackinguptapedrivesthroughAWSStorageGatewayTapeGatewayandAmazonSnow devices. ● Tomaximizecostsavings,objectstobearchivedshouldbeatleast40KBinsize. ● YouarebilledforthenumberofretrievalrequestsyoumakeandthesizeofyourdataretrievalsperGB. ● BotharebackedbyAmazonS3SLA. Differences: ● YoucantransitionobjectsfromS3GlaciertoS3GlacierDeepArchivebutnottheotherwayaround. ● S3Glacieroffersthreetypesofretrievaloptions:E xpedited(takes1–5minutestofinishbutonlyifAWS hasenoughretrievalcapacity),S tandard(3–5hours)andB ulk(5–12hours). ● S3GlacierDeepArchiveofferstwotypesofretrievaloptions:S tandard(finisheswithin12hours)and Bulk(within48hours). ● Tomaximizecostsavings,youneedtokeepyourobjectsarchivedinGlacierforatleast90days,while GlacierDeepArchiverequiresatleast180days. References: https://docs.amazonaws.cn/en_us/AmazonS3/latest/userguide/storage-class-intro.html https://aws.amazon.com/s3/pricing/ https://portal.tutorialsdojo.com/ 1 02 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSStorageGateway MovingDataFromAWSStorageGatewaytoAmazonS3Glacier WealreadyknowthatyoucantransitionobjectsinAmazonS3toadifferentstoragetiersuchasAmazonS3 Glacierusinglifecyclepolicies.WhatyoumightnotknowisthatyoucanalsomovedatafromAWSStorage GatewaytoAmazonS3Glacier.AWSStorageGatewayisaservicethatconnectsyouron-premisesaccessto virtuallyunlimitedstoragewithS3.YoujustneedtheAWSStorageGatewayVMorphysicaldevicetoactasa literalgateway.DatatransfersareencryptedwithSSLsoyoucanrestassuredthatthetransportissecure. TherearethreetypesofStorageGatewaytypesthatyoucanuse:F ileGateway,V olumeGateway,andT ape Gateway.FileGatewayletsyouaccessyourS3bucketsviaafileinterfaceusingSMBorNFSprotocol,asifS3 wasafileshareyoucanmount.VolumeGatewayprovidesaniSCSItarget,whichenablesyoutocreateblock storagevolumesandmountthemasiSCSIdevices.Youcantakesnapshotsofyourvolumesandusethemto createnewEBSvolumes.Lastly,TapeGatewayisacloud-basedVirtualTapeLibrary.Yourbackupapplication canreaddatafromorwritedatatovirtualtapesbymountingthemtovirtualtapedrivesusingthevirtualmedia changer.TapeGatewayisusuallyusedforarchivalpurposes. Inthissection,we’llbediscussingFileGatewayandTapeGateway,whicharethetwoservicesthatcanstore datatoAmazonGlacier. TapeGatewayhasthemoreobviousexplanation.SinceTapeGatewayisprimarilyusedforarchival,your archivedtapesaresenttoS3GlacierorS3GlacierDeepArchive,butnotimmediately.Dataonyourvirtual tapesarefirststoredinavirtualtapelibraryinS3Standardwhileyourbackupapplicationiswritingdatato tapes.Afteryouejectthetapesfromthebackupapplication,theyarethenarchivedtoS3GlacierorS3Glacier DeepArchivedependingonwhatyouchoose.YoucanalsostoreyourtapesinS3Glacierfirstthenmovethem toDeepArchivelateron. FileGatewayhasanindirectapproachtostoringdatainS3Glacier.Asmentionedearlier,FileGateway presentsS3viaafileinterface.YoucanmovefilesbetweenyourapplicationandS3easilythroughthis interface.FileGatewaycanuseS3Standard,S3Standard-IA,orS3OneZone-IAstorageclasses.Onceyou havestoredyourfilesinyourS3bucket,youcanconfigureabucketlifecyclepolicytomoveyourfilestoS3 GlacierorS3GlacierDeepArchive.However,doingsowillpreventyoufromretrievingthefilethroughFile Gatewayagain.YoumustrestorethefilefromS3Glacierfirstbeforeyoucanretrieveit. References: https://aws.amazon.com/storagegateway/faqs/ https://tutorialsdojo.com/aws-storage-gateway/ https://portal.tutorialsdojo.com/ 1 03 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran IntegratingAWSStorageGatewaytoanActiveDirectory AWSStorageGatewayFileGatewayallowsyoutocreateanSMBfilesharethatcanbemountedonyour Windowsinstances.YoucanconfigureeitherMicrosoftActiveDirectory(AD)orguestaccessfor authentication.TosetupyourSMBfileshareMicrosoftADaccesssettings,performthefollowing: 1. GototheActiveDirectorysettingsofyourSMBfileshare. 2. EntertheDomainNameofthedomainthatyouwantthegatewaytojoin.Youcanconnecttoyour self-managedAD(runninginthecloudoron-prem)orconnecttoAWSDirectoryService. 3. Enterasetofdomaincredentialsthathaspermissionstojoinaservertoadomain. 4. YoucanoptionallyspecifyanorganizationalunittoplaceyourSMBfileshare. 5. Youcanoptionallyindicateasetofdomaincontrollers. 6. Finishtheprocessbysavingyourchanges. ConnectingyourFileGatewayfilesharetoanActiveDirectoryhasmanyuses.First,thefeatureallowsyour userstoauthenticatewithyourADbeforetheycanaccessthefileshare.Furthermore,youcancreatealistof ADusersandgroupsthatwillhaveadministratorrightstothefileshare.Lastly,youcanprovidealistofAD usersorgroupsthatyouwanttoallowordenyfileshareaccess. References: https://docs.aws.amazon.com/storagegateway/latest/userguide/managing-gateway-file.html https://tutorialsdojo.com/aws-storage-gateway/ https://portal.tutorialsdojo.com/ 1 04 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonElasticBlockStore(EBS) SSDvsHDDTypeVolumes Onagivenvolumeconfiguration,certainI/OcharacteristicsdrivetheperformancebehaviorforyourEBS volumes.SSD-backedvolumes,suchasGeneralPurposeSSD(gp2,gp3)andProvisionedIOPSSSD(io1,io2), deliverconsistentperformancewhetheranI/Ooperationisrandomorsequential.HDD-backedvolumeslike ThroughputOptimizedHDD(st1)andColdHDD(sc1)deliveroptimalperformanceonlywhenI/Ooperations arelargeandsequential. Intheexam,alwaysconsiderthedifferencebetweenSSDandHDDasshownonthetablebelow.Thiswillallow youtoeasilyeliminatespecificEBS-typesintheoptionswhicharenotSSDornotHDD,dependingonwhether thequestionasksforastoragetypewhichhass mall,randomI/Ooperationsorlarge,sequentialI/O operations. https://portal.tutorialsdojo.com/ 1 05 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ProvisionedIOPSSSD(io1,io2)volumesaredesignedtomeettheneedsofI/O-intensiveworkloads, particularlydatabaseworkloads,thataresensitivetostorageperformanceandconsistency.Unlikegp2,which usesabucketandcreditmodeltocalculateperformance,anio1volumeallowsyoutospecifyaconsistent IOPSratewhenyoucreatethevolume,andAmazonEBSdeliverswithin10percentoftheprovisionedIOPS performance99.9percentofthetimeoveragivenyear.ProvisionedIOPSSSDio2isanupgradeofProvisioned IOPSSSDio1.Itoffershigher99.999%durabilityandhigherIOPSperGiBratiowith500IOPSperGiB,allatthe samecostasio1volumes. Volume Name Volumetype Description GeneralPurposeSSD gp3 gp2 ProvisionedIOPSSSD io2 GeneralPurposeSSD GeneralPurpose HighperformanceSSD volumethatbalances SSDvolumethat volumedesignedfor priceperformancefora balancesprice business-critical widevarietyof performancefora latency-sensitive transactionalworkloads widevarietyof applications transactional workloads io1 Highperformance SSDvolume designedfor latency-sensitive transactional workloads UseCases Virtualdesktops, mediumsizedsingle instancedatabases suchasMSFTSQL ServerandOracleDB, low-latencyinteractive apps,dev&test,boot volumes Bootvolumes, low-latency interactiveapps, dev&test Workloadsthatrequire Workloadsthat sub-millisecond requiresustained latency,andsustained IOPSperformance IOPSperformanceor ormorethan morethan64,000IOPS 16,000IOPSand or1,000MiB/sof I/O-intensive throughput database workloads VolumeSize 1GB–16TB 1GB–16TB 4GB–16TB 4GB–16TB Durability 99.8%–99.9%durability 99.8%–99.9% durability 99.999% 99.8%–99.9% https://portal.tutorialsdojo.com/ 1 06 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran MaxIOPS/ Volume 16,000 16,000 64,000 64,000 Max Throughput /Volume 1000MB/s 250MB/s 1,000MB/s 1,000MB/s MaxIOPS/ Instance 260,000 260,000 160,000 260,000 MaxIOPS/ GB N/A N/A 500IOPS/GB 50IOPS/GB Max Throughput /Instance 7,500MB/s 7,500MB/s 4,750MB/s 7,500MB/s Latency singledigitmillisecond singledigit millisecond singledigitmillisecond singledigit millisecond Multi-Attach No No Yes Yes https://portal.tutorialsdojo.com/ 1 07 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran VolumeName ThroughputOptimizedHDD ColdHDD Volumetype st1 sc1 Description LowcostHDDvolumedesignedfor Throughput-orientedstoragefordatathatis frequentlyaccessed,throughput-intensive infrequentlyaccessed workloads Scenarioswheretheloweststoragecostis important UseCases Bigdata,datawarehouses,logprocessing Colderdatarequiringfewerscansperday VolumeSize 125GB–16TB 125GB–16TB Durability 99.8%–99.9%durability 99.8%–99.9%durability MaxIOPS/ Volume 500 250 Max Throughput / Volume 500MB/s 250MB/s MaxIOPS/ Instance 260,000 260,000 MaxIOPS/GB N/A N/A Max Throughput/ Instance 7,500MB/s 7,500MB/s Multi-Attach No No https://portal.tutorialsdojo.com/ 1 08 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonEBSMulti-AttachFeature OurunderstandingonAmazonEBSvolumesisthattheyarevirtualblockdevicesthatneedtobeattachedto anAmazonEC2instancebeforetheycanbeused.Whilethisistrue,didyouknowthatthereisatypeofEBS volumethatyoucanattachtomanyEC2instancessimultaneously?AmazonEBSProvisionedIOPS(io1and io2)volumesarecurrentlythetypesthatsupportEBSMulti-Attach.Multi-Attachletsyoushareaccesstoan EBSdatavolumebetweenupto16Nitro-basedEC2instanceswithinthesameAvailabilityZone(AZ).Each attachedinstancehasfullreadandwritepermissionstothesharedvolume. EBSMulti-AttachisprimarilyusedwithAmazonLinuxinstances.YoumayalsouseMulti-AttachwithWindows instances,however,Windowsdoesnotrecognizethedataonthevolumethatissharedbetweentheinstances, whichcanresultindatainconsistency.TheMulti-Attachfeatureisnotenabledbydefault.Youwillhaveto enableitduringvolumecreationormodifyyourvolumewhenithasbeencreatedalready. Multi-Attachvolumescan'tbecreatedasbootvolumes.Also,forio1volumes,Multi-Attachcan’tbedisabled onceenabled.YoucandisableMulti-Attachforio2volumesbutonlyifitisattachedtonomorethanone instance.Ifyou’dliketomodifythevolumetypeofaMulti-Attachenabledvolume,youmustfirstdisablethe feature.Lastly,Multi-Attachenabledvolumesaredeletedoninstanceterminationifthelastattachedinstance isterminatedandifthatinstanceisconfiguredtodeletethevolumeontermination.Ifthevolumeisattached tomultipleinstancesthathavedifferentdeleteonterminationsettings,thelastattachedinstance'ssetting determinesthedeleteonterminationbehavior. https://portal.tutorialsdojo.com/ 1 09 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSsometimescreatessolutionsthatdrawafinelinebetweenoneserviceandanothertouseforyourneeds. Inthiscase,EBSMulti-AttachcloselyresemblesAmazonEFSinthatyoucancreatesharedfilesystemsthat multipleinstancescanuseconcurrently. Intheexams,wheneveryouaremadetochoosebetweenEBSMulti-AttachandAmazonEFS,recallthe limitationsofEBSMulti-Attach.AnexampleisthatMulti-AttachenabledvolumesdonotsupportI/Ofencing. Yourapplicationsmustprovidewriteorderingfortheattachedinstancestomaintaindataconsistency. AmazonEFSismoreappropriatewhenyouneedafilesystemthatneedstobeconcurrentlyaccessedby hundredstothousandsofinstances,andmoresowhentheseinstancesbelongtodifferentAvailabilityZones. TherearealsonolimitationstotheinstancetypesthatcanmountEFSfilesystems.EFSautomaticallyscalesin storagesizeandperformance,unlikeinEBSwheremanualinterventionisrequired.Lastly,AmazonEFSby defaultprovidestraditionalfilepermissionsmodel,filelockingcapabilities,andhierarchicaldirectorystructure. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html https://tutorialsdojo.com/amazon-ebs-multi-attach/ https://portal.tutorialsdojo.com/ 1 10 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonEBSCopySnapshots EBSSnapshotsareaverysimplebutefficientwayoftakingbackupsofyourEBSvolumesinAWS.Snapshots arepartofalmosteverydisasterrecoveryplan,somakingsurethattheyareavailableandusablewhenyou needthemisnecessary.Yourpoint-in-timesnapshotsarekeptdurablyinAmazonS3,whichweknowisa servicethat’sdesignedfordurability.However,ifoneneededtorestoreasnapshotinanotherregionoranother AWSaccount,he/shewouldnotbeabletodoso.AnEBSsnapshotisonlyavailableintheAWSRegionitwas createdin,andonlytheaccountownerhasaccesstothesnapshot.Ifaregionaldisasterweretooccur,you won’tbeabletouseyourEBSsnapshotstorebuildyourinfrastructureinyourDRregion,notunlessyoucopied themoverpreviously. AmazonEBSletsyoucopysnapshotsfromoneregiontoanother,orfromwithinthesameregion.AmazonS3 server-sideencryptionprotectsasnapshot'sdataintransitduringacopyoperation.Copyingsnapshotslets youaddormodifytheencryptionsettingsofthatsnapshot.Thismeansthatyoucancreatecopiesofabackup witheachhavingadifferentencryptionkey. Ifyouwouldlikeanotheraccounttobeabletocopyyoursnapshot,youcaneithermodifythesnapshot permissionstoprovideaccesstothataccountormakethesnapshotpublicsothatanyAWSaccountcancopy it. https://portal.tutorialsdojo.com/ 1 11 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Usingsnapshotcopywithinasingleaccountandregiondoescreateanewcopyofthedataandthereforeis cost-freeaslongastheencryptionstatusofthesnapshotcopydoesnotchange.Thoughifyoucopya snapshottoanewregion,orencryptitwithanewencryptionkey,theresultingsnapshotisacomplete, non-incrementalcopyoftheoriginalsnapshot,whichwillincuradditionalstoragecosts.Whenyoumodifythe encryptionsettingsduringyoursnapshotcopyoperation,youmustensurethatthetargetaccountand/or targetinstancehaspermissionstousetheencryptionkey. Someusecasesofcopyingsnapshotsinclude: 1. Regionaldisasterrecovery 2. Datamigration 3. Creatingabasevolumefordifferentapplications 4. Createanewvolumewithnewencryptionsettings 5. Dataretentionandcompliancerequirements References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html https://portal.tutorialsdojo.com/ 1 12 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonElasticFileSystem(EFS) HowToMountAnAmazonEFSFileSystem BeforewediveinonhowtomountanEFSfilesystem,let’sfirstgothroughwhatcomposesanEFSfilesystem. Eachfilesystemhasitsownuniqueidentifier,creationtoken,creationtime,filesystemsizeinbytes,numberof mounttargetscreatedforthefilesystem,andthefilesystemlifecyclestate.Toaccessyourfilesystemfroma LinuxEC2instance,ECScontaineroraLambdafunction,youmustcreatemounttargetsinyourVPC.When creatingamounttarget,youmustindicatetheAvailabilityZoneatwhichthemounttargetwillbecreatedand addsecuritygroupstocontrolaccesstoyourfilesystem.Oncedone,youwillbeprovidedanIPaddressanda DNSnamewhichyoucanuseinyourmountcommands. Anotherfilesystempropertyyoushouldknowisyouraccesspoint.Anaccesspointappliesanoperating systemuser,group,andfilesystempathtoanyfilesystemrequestmadeusingtheaccesspoint.Thinkofitas thedirectorywhereyourrequestsareroutedto,andthisdirectoryenforcesspecificaccesspermissionssimilar toanyLinuxsubdirectory.Accesspointsensurethatanapplicationalwaysusesthecorrectoperatingsystem identityandthecorrectdirectorywhenreadingfromorwritingtothefilesystem. https://portal.tutorialsdojo.com/ 1 13 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran WhenmountinganEFSfilesystemontoaLinuxEC2instance,theprimarytoolforthisjobistheAmazonEFS mounthelper.Tousethemounthelper,yousimplyneedtoprovidethefollowing: 1. ThefilesystemIDoftheEFSfilesystemtomount 2. AnAmazonEFSmounttarget Youmayuseanymounttarget,butifyourEC2instanceisrunninginanAZdifferentfromthemounttarget,you will incur data transfer charges. You might also experience increased latencies for file system operations. Furthermore,therearemultiplewaystomountamounttarget: 1. YoucanmountyourtargetasisafteryouSSHintoyourinstanceusingthemountcommand. 2. YoucanmountyourtargetwithaTLSparametertoenableencryptionin-transit. 3. YoucanmountyourtargetwithIAMauthorization(instanceprofileornamedprofile). 4. YoucanspecifyanEFSaccesspointinyourmountparameters. If you prefer to mount your file system immediately at instance launch, you canspecifyintheconfiguration details thefilesystemyouwishtomountandthemounttargetthatyourEC2instancewilluse.Youcanalso automaticallyremountyourfilesystemafterrebootsbyaddingyourmountcommandin/etc/fstab. https://portal.tutorialsdojo.com/ 1 14 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Lastly,ifyouwouldliketomountyourfilesystemwithouthavingtoSSHintoaninstanceorintomultipleEC2 instances,youcanuseAWSSystemsManagerRunCommandtoexecuteashellscriptforyou,andjustspecify thetargetsofthescript. ForECScontainersandLambdafunctions,mountinganEFSfilesystemisaseasyasspecifyingmountpoints intheECStaskdefinition’sA ddvolumeorLambdafunctionconfiguration. https://portal.tutorialsdojo.com/ 1 15 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 1 16 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation https://docs.aws.amazon.com/efs/latest/ug/mounting-fs.html https://tutorialsdojo.com/amazon-efs/ EFS-to-EFSRegionalDataTransfer TherearetimeswhenyouneedtocopyoversomedatafromoneAWSRegiontoanother.Yourreasonsmaybe forDRpurposesordataretentionpoliciesimposedbyyourorganization.Nevertheless,inAWS,thereare usuallystraightforwardwaystodoso.Forexample,forEBSvolumes,youcancreateasnapshotofyour volumeandcopyitovertoyourdestinationregion.ForS3objects,yousimplycreateanewbucketinyour destinationregionandconfigurereplicationintheoriginbucket.ButforAmazonEFS,thereisnonativefeature tohandlethisprocess.YouneedthehelpofotherAWSservicestosuccessfullymigrateyourEFSdatafrom oneregiontoanother.Inthisdeepdive,we’llbetakingalookattheservicesthatwillhelpyoudoso. Ifyourgoalistorecreateanentirefilesysteminanotherregion,youcanuseA WSBackuptotakeabackupof yourEFSfilesystemandhaveitcopythebackupovertoadestinationregion.Duringyourinitialbackup,AWS Backuptakesafullcopyofyourentirefilesystemandstoresitinadurablevault.Succeedingbackupsonyour filesystemareincremental,meaningthatonlychangesmadeafteryourlatestbackupwillbetaken.AWS Backupisabletobackupyourfilesystemnomatterthestorageclassyouareusing,butrestoringabackup restoresyourfilestotheStandardstorageclass.Ifyou’veconfiguredyourbackupplantocopybackupfilesto anotherregionthenAWSBackupcopiesyourbackupstoadestinationvaultintheotherregion.Othersettings youcandefineforyourbackupplanincludewhethertotransitionyourbackupstocoldstoragetolower storagecosts,andtheretentiondurationofyourbackups. https://portal.tutorialsdojo.com/ 1 17 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran IfyourgoalistomigrateorreplicatedatafromoneEFSfilesystemtoanother,thenyoucanuseAWSDataSync forthispurpose.AWSDataSyncisabletocopyfilesbetweentwoEFSfilesystemseveniftheybelongto differentregionsand/orAWSaccounts.TostartcopyingdatausingAWSDataSync,firstdeploytheDataSync agentasanEC2instanceinsideaVPCwithaccesstoyoursourcefilesystem.OnceyouactivatetheDataSync agentusingawebbrowser,youselectAmazonEFSasyourdestinationAWSstorage,enteryourfilesystem details,andstartmovingdata.OneadvantageofusingAWSDataSyncisthatyoucancopyyourfilesovera privateAWSnetwork.Todoso,simplyfollowthesesteps: 1. CreateaVPCpeeringconnectionbetweenyoursourceEFSVPCanddestinationEFSVPC. 2. AddaruleinthesecuritygroupofyoursourceanddestinationEFSthatwouldallowthemto communicatewitheachother. 3. CreateaVPCendpointforAWSDataSyncintheregionofthedestinationEFS. 4. InitializeaDataSyncAgentandchoosetheVPCendpointasyourserviceendpoint. 5. Starttheagentandbeginatransfertask. References: https://portal.tutorialsdojo.com/ 1 18 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html https://aws.amazon.com/premiumsupport/knowledge-center/datasync-transfer-efs-cross-region/ https://aws.amazon.com/about-aws/whats-new/2019/05/aws-datasync-now-supports-efs-to-efs-transfer/ https://tutorialsdojo.com/amazon-efs/ AmazonEFSStorageLifecycle AmazonEFSisnotexactlythecheapeststorageserviceinAWS.Ifleftunmanaged,itWILLhityouinthewallet. Althoughitspricepointisareflectionofitsfeaturesandcapabilities,weasSolutionsArchitectsshouldalways lookforwaystolowercost.OnesuchexampleishowyoushouldoptimizefilestorageinEFS.AmazonEFS hastwostorageclasses:S tandard(EFS-Standard)andI nfrequentAccess(EFS-IA).Thesestorageclassesare quitesimilartotheonesinAmazonS3.TheStandardstorageclassoffersabalancebetweencostand storage.Thisclassismostsuitableforstoringfrequentlyaccessedfiles.Youonlyneedtopayforstorage consumedbyfilesinthisclass.TheInfrequentAccessstorageclass,ontheotherhand,bringsyoulower storagecostsinexchangeforretrievalfees.Thisclassismostsuitedforfilesthatyouknowwon’tbe accessedveryoften.AlthoughstoragecostislowerinEFS-IA,overallcostscanquicklyrampupifEFS-IAfiles arebeingaccessedtoooften. LifecyclemanagementpoliciescontrolhowyourobjectsarestoredinAmazonEFS.Whenenabled,lifecycle managementmigratesallyourfilesthathavenotbeenaccessedforasetperiodoftimetotheInfrequent Accessstorageclass.Youdefinetheperiodoftimefromtheselectionbelowinyourlifecyclepolicy: ● None ● 7dayssincelastaccess ● 14days ● 30days ● 60days ● 90days Notethat,asofthemoment,youcannotsetyourownperiod.Ifintheexamthereisastrictrequirementthat datashouldonlybetransitionedtoIAstorageafterxnumberofdaysandxisnotintheselectionabove,then consideryourotheroptionsfirst. ToqualifyforthetransitiontotheIAstorageclass,filesmustatleastbe128KBinsize.FilesmovedintotheIA storageclassremainthereindefinitely.YoucanmovefilesfromtheIAstorageclassbacktotheStandard storageclassbycopyingthemtoanotherlocationonyourfilesystem.Ifyouwantyourfilestoremaininthe Standardstorageclass,disableLifecycleManagementbychoosingNoneinthelifecyclepolicyandthencopy yourfilestoanotherlocationonyourfilesystem. References: https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html https://portal.tutorialsdojo.com/ 1 19 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html https://tutorialsdojo.com/amazon-efs/ https://portal.tutorialsdojo.com/ 1 20 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonFSx AmazonFSxforLustrevsAmazonFSxforWindowsFileServer AmazonFSxforLustre AmazonFSxforWindowsFileServer Shortdescription Ahigh-performance,scalablestorage servicepoweredbyLustre. Afullymanaged,highlyreliable,andscalable filestoragethatisaccessibleovertheServer MessageBlock(SMB)protocol.Lowestcost SMBfileserverinAWS. Usecases Machinelearning,highperformance computing(HPC),videorendering,and financialsimulations ForapplicationsrequiringuseofWindows sharedstoragethroughSMBprotocoland requiringsupportforotherWindowsfeatures suchasADintegrationoralift-and-shift replacementforSharepointforexample. Accessiblefrom thesesources Intendedforthousandsofconcurrent accessfromLinux-basedinstancesand devices,whetherinAWSoron-premises. FSxforLustreintegrateswithAmazonEC2, AWSBatch,AmazonEKS,andAmazon ParallelCluster. Canbeconcurrentlyaccessedbythousands ofWindows,Linux,andMacOScompute instancesanddevices,whetherinAWSor on-premises.Computeinstancesinclude AmazonEC2,AmazonECS,VMwareCloudon AWS,AmazonWorkSpaces,andAmazon AppStream2.0instances. Deployment options Scratchfilesystems-designedfor Onlyhaspersistentfilesystems.Canrunin temporarystorageandshorter-term singleA Zormulti-AZ. processingofdata.Dataisnotreplicated anddoesnotpersistifafileserverfails. Persistentfilesystems-designedfor longer-termstorageandworkloads.The fileserversarehighlyavailable,anddatais automaticallyreplicatedwithinthe AvailabilityZone(AZ)ofthefilesystem. Thedatavolumesattachedtothefile serversarereplicatedindependentlyfrom thefileserverstowhichtheyareattached. Storageoptions SSDstorageforlatency-sensitiveworkloadsorworkloadsrequiringthehigh IOPS/throughput. HDDstorageforthroughput-focusedworkloadsthataren’tlatency-sensitive. AmazonFSxalsoprovidesafast,in-memorycacheonthefileserver. https://portal.tutorialsdojo.com/ 1 21 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Managing Youcanincreaseyourfilesystem’sstorage Eachfilesystemcanhaveupto64TBofdata. storagecapacity capacityeverysixhours.Throughput AmazonFSxgrowsthestoragecapacityof scaleslinearlyasyouincreasestorage. yourexistingfilesystemwithoutany downtimeimpacttoyourapplicationsand users. Howtomount Installtheopen-sourceLustreclienton yourLinuxinstance.Onceit’sinstalled,you canmountyourfilesystemusingstandard Linuxcommands. Backups AmazonFSxtakesdailyautomaticbackupsofyourfilesystems,andallowsyoutotake manualbackupsatanypoint.Backupsareincremental.Defaultbackupretentionis7days. YoucanonlytakeabackupofaLustrefilesystemthathaspersistentstorageandisnot linkedtoanS3bucket. Security FSxforLustrealwaysencryptsyourfilesystemdataandyourbackupsusingkeysyou managethroughAWSKMS. AmazonFSxencryptsdata-in-transitusingSMBKerberossessionkeys. Extrafeatures InWindows,usethe“MapNetworkDrive” featuretomapadrivelettertoafileshareon yourFSxfilesystem.InLinux,usethe cifs-utilstooltomountyourfileshare. Encryptsdata-in-transitwhenaccessed fromsupportedEC2instances. Encryptsdata-in-transitusingSMBKerberos sessionkeys. YoucanlinkyourLustrefilesystemtoan AmazonS3bucket.Youcanalsocreate multipleLustrefilesystemslinkedtothe sameS3bucket. AmazonFSxforWindowsFileServerworks withMicrosoftActiveDirectory(AD)soyou caneasilyintegrateexistingAD-baseduser identities.ItalsoprovidesstandardWindows permissionsforfilesandfolders. DataDeduplicationisafeatureinWindows Serverthatreducescostsbystoring redundantdataonlyonce. References: https://aws.amazon.com/fsx/lustre/faqs https://aws.amazon.com/fsx/windows/faqs/ https://tutorialsdojo.com/amazon-fsx/ https://portal.tutorialsdojo.com/ 1 22 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRelationalDatabaseService(RDS) AmazonRDSHighAvailabilityandFaultTolerance Whenitcomestoproductiondatabases,architectingahighlyavailable,faulttolerantdatabaseinfrastructureis keyinmakingsurethatyouroperationscontinuetorunsmoothlyintheeventofafailure.Sincewecaneasily launchnewresourcesintheAWScloud,andtearthemdownaseasilytoo,itisalwaysagoodpracticeto createredundantinfrastructureineverypartofyoursystemwhenapplicable;andyes,thatincludesdatabases. AmazonRDSisamanagedrelationaldatabaseservicethatsupportsmultipledatabaseenginesandversions. Asyoumayknow,differentdatabaseengineshavedifferentwaysofimplementinghighavailabilityina traditionalsense.InAmazonRDS,thesecapabilitiesarefurtherimprovedthankstotheinnovationsbrought forthbyAWS.Twoconceptswe’lltouchoninrelationtoHA/FTareM ulti-AZDeploymentsandR eadReplicas. AmazonRDSMulti-AZdeploymentcreatesandmaintainsastandbyreplicaofyourRDSDBinstanceina differentAvailabilityZone,effectivelyprovidinghighavailabilityandfailoversupportforsituationsthatwould causetheprimarydatabasetogooffline.Multi-AZspansatleasttwoAvailabilityZoneswithinasingleregion. YourprimaryDBinstanceissynchronouslyreplicatedacrossAvailabilityZonestoastandbyreplicatoprovide dataredundancy,eliminateI/Ofreezes,andminimizelatencyspikesduringsystembackups.AmazonRDS usesseveraldifferenttechnologiestoprovidefailoversupport.Multi-AZdeploymentsforMariaDB,MySQL, Oracle,andPostgreSQLDBinstancesuseAmazon'sfailovertechnology.SQLServerDBinstancesuseSQL ServerDatabaseMirroring(DBM)orAlwaysOnAvailabilityGroups(AGs).Youshouldrememberthatyou cannotusethestandbyreplicatoservereadtraffic.Forthispurpose,youshoulduseareadreplica,whichwe’ll discusslateron. WhenconvertingaSingle-AZdeploymenttoaMulti-AZdeployment,AmazonRDStakesasnapshotofthe primaryDBinstanceandthenrestoresthesnapshotintoanotherAZ.RDSthensetsupsynchronousreplication betweenyourprimaryDBinstanceandthenewinstance.Intheeventofaplannedorunplannedoutageofyour DBinstance,RDSautomaticallyswitchestoyourstandbyreplica.Thetimeittakesforthefailovertocomplete dependsonthedatabaseactivityandotherconditionsatthetimetheprimaryDBinstancebecame unavailable.Also,thefailovermechanismautomaticallychangestheDomainNameSystem(DNS)recordof theDBinstancetopointtothestandbyDBinstance. AmazonRDSReadReplicasletyouscaleoutyourDBinstancesacrossmultipleAZsifyouhavearead-heavy databaseworkload.YoucancreateoneormorereplicasfromtheDBinstanceandusethosereplicasasa sourceforreadoperations.ReadreplicascanbecreatedinthesameAZastheprimary,inadifferentAZbutin thesameregionastheprimary,oreveninAZsindifferentregionsiftheRDSDBenginesupportsit.Data betweenyourDBinstanceandreadreplicasarereplicatedasynchronously,soreplicasmightreturnstaledata whenyoudoareadonthem.Anotherbenefitofreadreplicasisthattheystoreredundantcopiesofyourdata, sointheeventofafailureontheprimaryDBinstance,readreplicascanbemanuallypromotedtobecome standaloneDBinstances.Whenyoupromoteareadreplica,theDBinstanceisrebootedbeforeitbecomes https://portal.tutorialsdojo.com/ 1 23 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran available.AmazonRDSusesMariaDB,MySQL,Oracle,PostgreSQL,andMicrosoftSQLServerDBengines' built-inreplicationfunctionalitytocreatethereadreplicas.MySQLandMariaDBperformlogicalreplication, whileOracle,PostgreSQLandMicrosoftSQLServerperformphysicalreplication. SimilartohowMulti-AZdeploymentsarecreated,AmazonRDStakesasnapshotofyoursourceDBinstance andcreatesaread-onlyinstancefromthesnapshot.RDSthenusesasynchronousreplicationtoupdatethe readreplicawheneverthereisachangetotheprimaryDBinstance.Onerequirementwhencreatingread replicasisthatautomaticbackupsshouldbeenabled.Takenotethatreadreplicas,bydefault,allowonly read-onlyconnections,butMySQLandMariaDBreplicascanbemadewritable.Also,bydefault,areadreplica iscreatedwiththesamestoragetypeasthesourceDBinstance.However,youcancreateareadreplicathat hasadifferentstoragetypefromthesourceDBinstancedependingontheconfiguration.Ifyoudeleteasource DBinstancewithoutdeletingitsreadreplicasinthesameAWSRegion,eachreadreplicaispromotedtoa standaloneDBinstance. Lastly,afewfinalremindersforRDSreadreplicas.Youcan'tconfigureaDBinstancetoserveasareplication sourceforanexistingDBinstance.YoucanonlycreateanewreadreplicafromanexistingDBinstance.Read ReplicasforMySQLandMariaDBsupportMulti-AZdeployments,soyoucancombinethesetwofeaturesto buildaresilientdisasterrecoverystrategy.ReadReplicasDONOTCACHEDATA.You’llneedtoaddacaching layerusingservicessuchasAmazonElasticacheforexample. References: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.MultiAZ.html https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html https://tutorialsdojo.com/amazon-relational-database-service-amazon-rds/ AmazonRDSSecurity AmazonRDSisadatabaseservicehostedinAWS,anditisalwaysagiventhatyoudoeverythingyoucanto protectyourdatabasesandthedatastoredinthem,nomattertheplatform.Inthissection,we’lldiscussthe manywaysyoucanapplysecurityforyourAmazonRDSinstances. NetworkIsolationandVPCSecurity YourRDSinstancesresideinaVPC,whichisanisolatedpieceofnetworkthatyouownandmanageinAWS. NoonecangainaccesstoyourVPCnetworkunlessyouallowthemto.Furthermore,therearemanyVPC securityfeaturesavailableforyoutousewhichareveryimportantinsecuringyourdatabasenetwork.Itisa goodpracticetorunyourRDSinstancesinprivatesubnets,andmoretothefactthatthesesubnetsshouldbe isolatedfromtherestofyoursystem.Thisway,youcanconfigurefirewallrules(bothsecuritygroupand networkacl)aswellasroutingrulesthatarededicatedforyourdatabases.Youcanfurthersecureyour databaseaccessbyusinganIPsecVPNsolution,andallowuserstoconnecttothedatabasethroughtheVPN https://portal.tutorialsdojo.com/ 1 24 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran only.Lastly,youcansetupintrusiondetectionsystemstonotifyyouimmediatelyifthereisasupposedthreat toyourdatabases.EndpointprotectionservicessuchasAWSWAFmaycomeinhandytoosinceyoucan createWAFrulesthatmitigateSQLinjectionattempts. EncryptionAtRest I’msurethisisagiven,butyoumustencryptyourdatabasetopreventothersfromeasilyreadingyourdata. AmazonRDSencryptsyourdatabasesusingkeysyoumanageintheAWSKeyManagementService(KMS).On adatabaseinstancerunningwithAmazonRDSencryption,datastoredatrestintheunderlyingstorageis encrypted,asareitsautomatedbackups,readreplicas,andsnapshots.RDSencryptionusestheindustry standardAES-256encryptionalgorithmtoencryptyourdataontheserverthathostsyourRDSinstance. AmazonRDSalsosupportsTransparentDataEncryption(TDE)forSQLServer(SQLServerEnterpriseEdition) andOracle(OracleAdvancedSecurityoptioninOracleEnterpriseEdition).WithTDE,thedatabaseserver automaticallyencryptsdatabeforeitiswrittentostorageandautomaticallydecryptsdatawhenitisreadfrom storage. YoucanonlyenableencryptionforanAmazonRDSDBinstancewhenyoucreateit,notaftertheDBinstanceis created.OnceyouhavecreatedanencryptedDBinstance,youcan'tchangetheAWSKMSkeyusedbythatDB instance.Ifyou’dliketoencryptanexistingDBinstance,takeasnapshotofitandthencreateacopyofthat snapshot,encryptthecopy,andrestoreittohaveanencryptedversionofyourdatabase.Youalsocannot disableencryptiononRDSafteryou’veenableditonyourDBinstance.Ifyou’dliketochangeencryptionkeys, exportthedatafromyourencryptedDBinstanceandimportittoanunencryptedone. EncryptionIn-Transit Althoughyouencryptthedataat-restinyourdatabase,thisisnotenoughasdatabasetrafficalsocontains yourdata.Youshouldencryptyournetworktraffictoprotectitfromsniffersandmaliciousattacks.Ifsomeone weretogetholdofyourtrafficdata,whoknowswhattheycandowiththem.Theycanattempttointercept requestsandsendfakeresponses.EncryptthecommunicationsbetweenyourapplicationandyourRDSDB instancesusingSSL/TLS.AmazonRDScreatesanSSLcertificateandinstallsthecertificateontheDB instancewhentheinstanceisprovisioned.DifferentDBengineshavedifferentwaysforyoutoretrievetheSSL publickey.Rememberthatinthenetworksecuritysectionabove,youcanenforceHTTPSconnectionswith securitygroups.YoucanalsorequireyourDBinstancetoonlyacceptencryptedconnections. AccessControls AmazonRDSistightlyintegratedwithAWSIAMwhichallowsyoutomanagewhocanaccessandmodifyyour RDSDBinstancesthroughIAMpolicies.Inaddition,youcantagyourresourcesandcontroltheactionsthat yourIAMusersandgroupscandoonyourresourcesthathavethosetags.ThereisalsotheIAMdatabase authenticationfeaturewhichworkswithAuroraMySQLandAuroraPostgreSQL.Withthisauthentication https://portal.tutorialsdojo.com/ 1 25 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran method,youdon'tneedtouseapasswordwhenyouconnecttoaDBcluster.Instead,youusean authenticationtoken. WhenyoufirstcreateaDBInstance,youneedtoenterthecredentialsofyourmasteruseraccount,whichis usedonlywithinthecontextofAmazonRDStocontrolaccesstoyourDBInstancesandwillbeprovided databaseadministratorprivileges.OnceyouhavecreatedyourDBInstance,youcanconnecttothedatabase usingthemasterusercredentialsandconfigureadditionaluseraccountsforyourotherusers.Youcanalso opttodisablethemasteraccountwithinthedatabasesettings(asabestpractice),anduseaseparate accountinsteadtoperformadministrationwork. LoggingandMonitoring Althoughthisisagivenalready,youshouldalsoenableloggingforyourdatabasesoyoucanmonitorall activitythatoccurswithinthem.Thiswillhelpyoutroubleshootanysecurityissuesyoumightencounterinthe futureandpreventthemfromhappeningagain.Logsthatprovidesystemactivityarecrucialinknowingthe stateofyourdatabasesandhowwelltheyareperforming.Someusersmightevenrequirethemforauditing purposes,sobesuretostoreyourlogssomewheredurablesuchasAmazonS3orCloudwatchLogs. References: https://aws.amazon.com/rds/features/security/ https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.html https://tutorialsdojo.com/amazon-relational-database-service-amazon-rds/ https://portal.tutorialsdojo.com/ 1 26 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonAurora AuroraServerlessScaling WhenyouareusingAmazonRDSoranyrelationaldatabaseforyourapplications,andyounoticethatthe databasehasvaryingusagepatterns,wouldn’titbegreathavingadatabasethatautomaticallyscalescapacity basedondemand?WealreadyknowthatAmazonAuroraautomaticallyscalesitsstorageasyourdatagrows, buthowaboutCPUcapacityandallowednumberofconnections?AmazonAurorahasaDBenginemode calledAmazonAuroraServerless,whichisanon-demand,auto-scalingconfigurationforAmazonAurora.You getmostofthefeaturesandbenefitsthatcomewiththestandardAmazonAurora,plusmore.AmazonAurora Serverlessclusterautomaticallystartsup,shutsdown,andscalescapacityupordownbasedonyour application'sneeds.Youdonotneedtokeepmonitoringandmanagingcapacityyourself.Andtopreventyour AuroraServerlessfrombecomingtooexpensive,youcansetacapacityrangetopreventitfromoverscaling. AmazonAuroraServerlesssupportsbothMySQLandPostgreSQL,sinceitisjustanextensionofAmazon Aurora.Ifyou’dliketomoveyourdatafromAmazonAuroratoAmazonAuroraServerless,simplytakea snapshotfromyourexistingAuroraprovisionedclusterandrestoreitintoanAuroraServerlessDBCluster.One thingtonoteisthatyoucan'tgiveanAuroraServerlessDBclusterapublicIPaddress,soyou’llhavetoconnect toitfromwithinyourVPC. Whenconfiguringscalingoptions,youspecifyAuroracapacityunits(ACUs).EachACUisacombinationof approximately2gigabytes(GB)ofmemory,correspondingCPU,andnetworking.Databasestorage automaticallyscalesfrom10gibibytes(GiB)to128tebibytes(TiB).TheminimumAuroracapacityunitisthe lowestACUtowhichtheDBclustercanscaledown.ThemaximumAuroracapacityunitisthehighestACUto whichtheDBclustercanscaleup.Basedonyoursettings,AuroraServerlessautomaticallycreatesscaling rulesforthresholdsforCPUutilization,connections,andavailablememory.Ascalingpointisapointintimeat whichthedatabasecansafelyinitiatethescalingoperation. UseAuroraServerlessforthefollowingtypesofdatabaseworkloads: ● Infrequentlyusedapplications ● Applicationswithvariableworkloads(highpeaksandlowdips) ● Newapplicationswithnobenchmarkedperformance ● Applicationswithunpredictableworkloads ● Developmentandtestdatabaseswhichcanbeshutdownwhennotinuse ● Multi-tenantapplications InAuroraServerless,thereareafewfeaturesthatarenotsupported: 1. Auroracloning 2. Auroraglobaldatabases 3. Auroramulti-masterclusters 4. AuroraReplicas https://portal.tutorialsdojo.com/ 1 27 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 5. 6. 7. 8. AWSIAMdatabaseauthentication BacktrackinginAurora Databaseactivitystreams PerformanceInsights References: https://aws.amazon.com/rds/aurora/serverless/ https://tutorialsdojo.com/aurora-serverless-tutorial-part-1/ https://tutorialsdojo.com/aurora-serverless-tutorial-part-2/ HighAvailabilityforAmazonAurora AlthoughAmazonAuroraisapartofAmazonRDS,theydonotsharethesametechnologyforimplementing highavailabilityandfaulttolerance.TheAmazonAuroraarchitectureseparatesstoragehardwarefrom computehardware.YourdataremainssafeevenifsomeoralloftheDBinstancesinyourAuroracluster becomeunavailable.HowAmazonAuroraachievesHAandFTarediscussedbelow. AmazonAurorasynchronouslyreplicatesyourdatasixwaysacrossthreeAvailabilityZonesinasingleAWS Region.AurorastoresthesecopiesregardlessofwhethertheinstancesintheDBclusterspanmultiple AvailabilityZones.Foraclusterusingsingle-masterreplication,afteryoucreatetheprimaryinstance,youcan createupto15read-onlyAuroraReplicasindifferentAZs. AuroraReplicasworksimilarlywithAmazonRDSReadReplicas.Youcanoffloadyourreadoperationstothese replicastoreducetheburdenontheprimarydatabase.Whentheprimaryinstanceencountersanissueand fails,oneoftheAuroraReplicasispromotedtoprimaryviaafailover.Theclusterendpointwillthen automaticallypointtothisnewprimarydatabasesoyouwon’thavetomodifyyourconnectionstrings.Ifyou needmulti-regionDR,useAmazonAuroraGlobalDatabasesinstead.AmazonAuroraGlobalDatabasesspan multipleregions,andAmazonAurorahandlesthereplicationbetweenyourDBinstanceswithminimal replicationlag.IfyoudonotcreateAuroraReplicasnorGlobalDatabases,intheeventofafailure,Amazon AurorarecreatestheprimaryinstanceusingthedatathatisstoredinotherAvailabilityZones. https://portal.tutorialsdojo.com/ 1 28 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Reference: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Concepts.AuroraHighAvailability.html https://tutorialsdojo.com/amazon-aurora/ AmazonAuroraGlobalDatabaseandReplicas PerhapsyouhaveanAmazonRDSMulti-AZdatabasewithreadreplicaslocatedinmultipleregions,andyou knowthatyourdatabaseexperiencesread-heavyoperations,especiallyinyoursecondaryregions.Ifretrieving staledataisunacceptableduetotheasynchronousreplicationofAmazonRDSthenyoushouldconsider migratingyourdatabaseclusterontoAmazonAurorainstead,ifpossible. AmazonAurorahasafeaturecalled“GlobalDatabase”,whichisprimarilydesignedfortheseglobally distributedapplicationscenarios.EnablingthisfeatureallowsAmazonAuroratoreplicateyourdataacross regionswithnoimpactondatabaseperformance,withfastlocalreadsandlowlatencyineachregion,and providesdisasterrecoveryfromregion-wideoutages. AnAuroraglobaldatabasehasaprimaryDBclusterinoneRegion,anduptofivesecondaryDBclustersin differentRegions.GlobalDatabaseusesstorage-basedreplicationwithtypicallatencyoflessthan1second. Withthis,thechancesofretrievingstaledataisminimized.Furthermore,ifyourprimaryregionsuffersa performancedegradationoroutage,youcanpromoteoneofthesecondaryregionstobecomethenew primary.AnAuroraclustercanrecoverinlessthan1minuteevenintheeventofacompleteregionaloutage. ThisprovidesyouwithaRecoveryPointObjective(RPO)of1secondandaRecoveryTimeObjective(RTO)of lessthan1minute.Youcanfurtherscaleyoursecondaryclustersbyaddingmoreread-onlyinstancesor https://portal.tutorialsdojo.com/ 1 29 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AuroraReplicastoasecondaryregion.Thesecondaryclusterisread-only,soitcansupportupto16Aurora Replicainstancesratherthantheusuallimitof15forasingleAuroracluster. WhenAuroraGlobalDatabasefeelslikeabitoverkill,oryou’dliketoutilizeMySQL/PostgreSQL’snative replicationfeatures,youcanscaleyourAuroraclusterbyconfiguringAuroraReplicastoserveread-only transactions.AuroraReplicasalsohelptoincreaseavailability.Iftheprimaryinstancebecomesunavailable, Auroraautomaticallypromotesoneofthereplicas.AnAuroraDBclustercancontainupto15AuroraReplicas. TheAuroraReplicascanbedistributedacrossAvailabilityZonesinyourcluster’sregion.Additionally,Aurora Replicasreturnthesamedataforqueryresultswithminimalreplicalag. Asidefromthesebenefits,onefeatureofanAuroraMySQLDBclusteristhatyoucancreateaReadReplicaof itinadifferentregion,byusingMySQLbinarylog(binlog)replication.EachclustercanhaveuptofiveRead Replicascreatedthisway,eachinadifferentregion.YoucanalsoreplicatetwoAuroraMySQLDBclustersin thesameregion,byusingMySQLbinarylog(binlog)replication.SamegoeswithtwoAuroraPostgreSQLDB clustersinthesameregion,byusingPostgreSQL'slogicalreplicationfeature.AuroraPostgreSQLdoesnot currentlysupportcross-regionreplicas.Sincethelogicalreplicationprocessishandledbythedatabase,it mighthaveaneffectonitsperformance,unlikeAuroraGlobalDatabasewherethereplicationhappensinthe storagelayer. References: https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-global-database.html https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.Replication.html https://portal.tutorialsdojo.com/ 1 30 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonDynamoDB AmazonDynamoDBTransactions DynamoDBtransactionsisafeaturethatletsyoufulfillatomicity,consistency,isolation,anddurability(ACID) acrossoneormoretableswithinasingleAWSaccountandregion.UseDynamoDBtransactionalreadand writeAPIsifyourapplicationsrequireadding,updating,ordeletingmultipleitemsasasingle,all-or-nothing operation.ADynamoDBtransactioncanincludeupto25uniqueitemsorupto4MBofdata. ● WiththetransactionwriteAPI,youcangroupmultiplePut,Update,Delete,andConditionCheckactions. YoucanthensubmittheactionsasasingleTransactWriteItemsoperationthateithersucceedsorfails asaunit.TransactWriteItemsissupportedinDynamoDBAcceleratorbutnotinGlobalTables. ● WiththetransactionreadAPI,youcangroupandsubmitmultipleGetactionsasasingle TransactGetItemsoperation.IfaTransactGetItemsrequestissubmittedonanitemthatispartofan activewritetransaction,thereadtransactioniscancelled.TransactGetItemsissupportedinDynamoDB AcceleratorbutnotinGlobalTables. WiththeadditionofDynamoDBtransactions,youcanchooseamongthreeoptionsforreadoperations— eventualconsistency,strongconsistency,andtransactional;andbetweentwooptionsforwriteoperations— standardandtransactional. Knowthattransactionaloperationsaredifferentfrombatchoperations.Inbatchoperations,somequeriesmay succeedwhileothersdonot.Intransactionaloperations,it’sallornothingwithyourqueries.Youalsocan't targetthesameitemwithmultipleoperationswithinthesametransaction. References: https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-transactions/ https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transactions.html https://tutorialsdojo.com/amazon-dynamodb/ AWSLambdaIntegrationwithAmazonDynamoDBStreams AmazonDynamoDBisintegratedwithAWSLambdasoyoucancreatet riggers,whicharepiecesofcodethat automaticallyrespondtoeventsinDynamoDBStreams.Withtriggers,youcanbuildapplicationsthatreactto datamodificationsinDynamoDBtables. https://portal.tutorialsdojo.com/ 1 31 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AfteryouenableDynamoDBStreamsonatable,associatetheDynamoDBtablewithaLambdafunctionifAWS doesnotautomaticallyassociateit.AWSLambdapollsthestreamandinvokesyourLambdafunction synchronouslywhenitdetectsnewstreamrecords. https://portal.tutorialsdojo.com/ 1 32 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ConfiguretheStreamSpecificationyouwantforyourDynamoDBStreams: ● ● StreamEnabled(Boolean)–indicateswhetherDynamoDBStreamsisenabled(true)ordisabled(false) onthetable. StreamViewType(string)–whenaniteminthetableismodified,StreamViewTypedetermineswhat informationiswrittentothestreamforthistable.ValidvaluesforStreamViewTypeare: ○ KEYS_ONLY–Onlythekeyattributesofthemodifieditemsarewrittentothestream. ○ NEW_IMAGE–Theentireitem,asitappearsafteritwasmodified,iswrittentothestream. ○ OLD_IMAGE–Theentireitem,asitappearedbeforeitwasmodified,iswrittentothestream. ○ NEW_AND_OLD_IMAGES–Boththenewandtheolditemimagesoftheitemsarewrittentothe stream. References: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Streams.Lambda.html https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_StreamSpecification.html AmazonDynamoDBReplication InAmazonRDS,ifyoudecidedtoreplicateyourdatabasestootherAWSRegions,youwouldcreateRead Replicasinyourdesiredregion(s)andAWSwillperformasynchronousreplicationbetweentheprimary instanceandthereadreplicas.InAmazonDynamoDB,theconceptofareadreplicadoesnotexist.Instead,to createcopiesofyourDynamoDBtablesacrossdifferentregions,youwillneedtocreateaGlobalTable.A GlobalTable,inabasicsense,isjustacollectionofoneormoreDynamoDBreplicatables.Eachreplicatable hasthesametablename,storesthesamedata,andusesthesameprimarykeyschemaastheprimarytable. Aglobaltablecanonlyhaveonereplicatableperregion. WithRDSreadreplicas,applicationscanonlyreaddatafromthem,sonowriteoperationscanbeperformed. WhenanapplicationwritesdatatoanyDynamoDBreplicatableinoneregion,DynamoDBpropagatesthewrite totheotherreplicatablesintheotherregionswithinthesameglobaltableautomatically.Becauseofthis, https://portal.tutorialsdojo.com/ 1 33 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran DynamoDBdoesnotsupportstronglyconsistentreadsacrossregions.Tohelpensureeventualconsistency, DynamoDBglobaltablesusealastwriterwinsreconciliationbetweenconcurrentupdates. Whencreatingaglobaltable,youfirstneedtoenableDynamoDBstreams.DynamoDBstreamswilldistribute thechangesinonereplicatoallotherreplicas.Next,youselecttheregion(s)whereyouwouldliketodeploya replicain.TheAWSServiceRoleForDynamoDBReplicationIAMrolethatisautomaticallycreatedbyDynamoDB allowstheservicetomanagecross-regionreplicationforglobaltablesonyourbehalf. References: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/V2globaltables_HowItWorks.html https://aws.amazon.com/dynamodb/global-tables/ https://tutorialsdojo.com/amazon-dynamodb/ CachingwithDynamoDBDAX Inmostcases,thesingledigitmillisecondperformanceofDynamoDBissufficientfortheuser’sneeds.Butfor caseswhensingledigitmicrosecondperformanceisrequired,you’llneedtoaddacachingmechanismtoyour DynamoDBtable.DynamoDBAccelerator(DAX)isafullymanaged,write-throughcachingservicethatdelivers fastresponsetimesforaccessingeventuallyconsistentdatainDynamoDB.Intheexam,unlessthereisaclear requirementtouseRedisorMemcached,whichinthiscaseyou’lluseAmazonElasticacheinstead,always chooseDAXasyourDynamoDBcachingsolution. DAXisabletoperformthefollowingfunctions: 1. DAXreducestheresponsetimesofeventuallyconsistentreadworkloadsfromsingle-digitmilliseconds tomicroseconds. 2. DAXrequiresonlyminimalfunctionalchangesifyourapplicationshavealreadybeenusingthe DynamoDBAPI. 3. Forread-heavyorburstyworkloads,DAXprovidesincreasedthroughputandpotentialcostsavingsby reducingtheneedtooverprovisionreadcapacityunits. Ifyouneedenhanceddatasecurity,DAXsupportsserver-sideencryption,butitdoesnotsupportTLS.Forhigh availability,configureaMulti-AZDAXcluster.YoucanscaleyourDAXclusterbyaddingmorenodesorbyusing largernodetypes.ADAXclusterinanAWSRegioncanonlyinteractwithDynamoDBtablesthatareinthe sameregion.Ifyouhavetablesinotherregions,youmustlaunchDAXclustersinthoseregionstoo. DAXisnotidealforthefollowingscenarios: ● Applicationsthatrequirestronglyconsistentreads. ● Applicationsthatdonotrequiremicrosecondresponsetimesforreads,orthatdonotneedtooffload repeatedreadactivityfromunderlyingtables. ● Applicationsthatarewrite-intensive,becausethedatainthecachewillbefrequentlyoverwritten. https://portal.tutorialsdojo.com/ 1 34 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran TherearetwocachesavailableinDAX:itemcacheandq uerycache. DAXmaintainsanitemcachetostoretheresultsfromGetItemandBatchGetItemoperations.Cacheditems haveadefaultcacheTTLof5minutes.Whenacacheisfull,DAXevictsolderitems(eveniftheyhaven't expiredyet)tomakeroomfornewitems. DAXmaintainsaquerycachetostoretheresultsfromQueryandScanoperations.Theseresultsetsarestored bytheirparametervalues.YouspecifytheTTLsettingforthequerycachewhenyoucreateanewDAXcluster. Ifthequerycachebecomesfull,DAXevictsolderresultsets(eveniftheyhaven’texpiredyet)tomakeroomfor newresultsets. References: https://docs.amazonaws.cn/en_us/amazondynamodb/latest/developerguide/DAX.html https://tutorialsdojo.com/amazon-dynamodb/ https://portal.tutorialsdojo.com/ 1 35 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRedshift AmazonRedshiftHighAvailability,FaultToleranceandDisasterRecovery AmazonRedshiftissimilartoAmazonRDSwhereitisalsoafullymanagedRDBMS.ButwhereAmazonRDSis forOLTP,database-typeworkloads,AmazonRedshiftisdesignedforOLAP,datawarehouse-typeworkloads.An AmazonRedshiftdatawarehouseconsistsofyourclusterofnodeswhichrunaspecificRedshiftengine.In eachcluster,thereisoneleadernodeandoneormorecomputenodes.Theleadernodereceivesqueriesfrom clientapplications,parsesthequeries,andcreatesqueryexecutionplans.Itthencoordinatestheparallel executionoftheseplanswiththecomputenodesandcollectstheresultsfromthesenodes.Finally,itthen returnstheresultsofthequerybacktotheclientapplications.Computenodesdobulkofthequeryexecution workbasedontheexecutionplansfromtheleadernodeandtransmitdataamongthemselvestoservethese queries.Queryresultsarethensenttotheleadernodeforaggregation. Whenlaunchingyourcluster,AmazonRedshiftprovisionsyourclusterinarandomlyselectedAvailabilityZone withintheAWSRegionyouarein,thoughyoucanoptionallyuseaspecificAvailabilityZoneifAmazonRedshift isavailableinthatzone.AlltheclusternodesareprovisionedinthesameAvailabilityZone.Thereisnooption inAmazonRedshifttodeployamulti-AZcluster.AmazonRedshiftonlysupportsSingle-AZdeployments.If yourcluster'sAvailabilityZoneexperiencesanoutage,AmazonRedshiftwillautomaticallymoveyourclusterto anotherAZwithinthesameregionwithoutanydatalossorapplicationchanges,butyoumustenablethe relocationcapabilitybeforehandinyourclusterconfigurationsettings. IfyouneedhighavailabilityforyourRedshiftclusterthenyoumustcreateanewsecondaryclusterthatwill continuouslyreceivenewdatafromtheprimaryclusterthroughsomepipeline,suchasAmazonKinesis. However,ifyouonlyneedhighavailabilityfornodeswithinacluster,AmazonRedshiftalreadyautomatically detectsandreplacesanyfailednodeitfinds.Duringthisperiod,thedatawarehouseclusterwillbeunavailable forqueriesandupdatesuntilareplacementnodeisprovisionedandaddedin.Additionally,iftheleadernode fails,inflightqueriesaredropped.Dataforthereplacementnodeisretrievedfromthecontinuousbackupsin S3andthemostfrequentlyquerieddataisprioritizedduringrestoration.Singlenodeclustersdonotsupport datareplication,soyouwillhavetorestoretheclusterfromasnapshot. Fordisasterrecovery,AmazonRedshiftreplicatesallyourdatawithinyourdatawarehouseclusterwhenitis loaded,andalsocontinuouslybacksituptoAmazonS3.Theservicemaintainsatleastthreecopiesofyour data–theoriginalandreplicaonthecomputenodes,andabackupinS3.YoucanalsoconfigureRedshiftto asynchronouslyreplicateyoursnapshotstoS3inanotherregion.Automatedbackupsareonlykeptuptoa maximumof35days,butmanualbackupscanberetainedforalongerperiod. References: https://aws.amazon.com/redshift/faqs/ https://tutorialsdojo.com/amazon-redshift/ https://portal.tutorialsdojo.com/ 1 36 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRedshiftSpectrum AmazonRedshiftSpectrumisafeatureofAmazonRedshiftthatallowsyoutoquerystructuredand semistructureddatastoredonAmazonS3withouthavingtoloadandtransformthedataintoAmazonRedshift tables.IfyouhavepoolsofdatastoredinAmazonS3oryouareusingAmazonS3asadatalake,Amazon RedshiftSpectrumiscapableofexecutingSQLqueriesonthem,suchaspulldata,filter,project,aggregate, group,andsort.Bestofall,RedshiftSpectrumisserverless,sothereisnoinfrastructuretomaintainfromyour end.RedshiftSpectrumrunsondedicatedserversthatareindependentfromthoseofRedshiftclusters,and RedshiftSpectrumautomaticallyscalesquerycomputecapacitybasedonthesizeoftheS3databeing retrieved.ThismeansRedshiftSpectrumiscapableofmassiveparallelprocessing.Youpayonlyforthe queriesyourunagainstthedatathatyouactuallyscan. HowRedshiftSpectrumworksisasfollows: 1) YoucreateRedshiftSpectrumtablesbydefiningthestructureforyourfilesandregisteringthemas tablesinanexternaldatacatalog.TheexternaldatacatalogcanbeAWSGlue,thedatacatalogthat comeswithAmazonAthena,oryourownApacheHivemetastore.Youcanalsopartitiontheexternal tablesononeormorecolumnstooptimizequeryperformance. 2) RedshiftSpectrumqueriesaresenttotheleadernodeofyourRedshiftcluster.Theleadernodecreates anddistributestheexecutionplantothecomputenodesinyourcluster. 3) Then,thecomputenodesobtaintheinformationdescribingtheexternaltablesfromyourdatacatalog. Thecomputenodesalsoexaminethedataavailablelocallyinyourclusterandscansonlytheobjectsin AmazonS3thatarenotpresentlocally. 4) Thecomputenodesthengeneratemultiplerequestsdependingonthenumberofobjectsthatneedto beprocessed,andsubmitthemconcurrentlytoRedshiftSpectrum.RedshiftSpectrumworkernodes scan,filter,andaggregateyourdatafromS3,andstreamtherequireddataforprocessingbacktoyour Redshiftcluster. 5) Finaljoinandmergeoperationsareperformedlocallyinyourclusterandtheresultsarereturnedto yourclientapplications. WhenusingRedshiftSpectrum,yourRedshiftclusterandtheS3bucketdatasourcemustbeinthesameAWS Region.Youalsocan'tperformupdateordeleteoperationsonexternaltables.Youmustrecreatethemifthere areanychangesthatneedtobemade. https://portal.tutorialsdojo.com/ 1 37 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ComparisonofsimilaranalyticstoolsinAWS: AmazonRedshift Spectrum AmazonRedshift AmazonEMR AmazonAthena UseAmazonRedshift Spectrumifyouare runningcomplexqueries onlargeamountsofdata storedinAmazonS3and AmazonRedshift,and youareplanningon storingfrequently accesseddatain AmazonRedshift. UseAmazonRedshift whenyouarepullingdata frommultipledifferent sourcesandjoiningthem intoonestructuredtable forqueryingand analytics. UseAmazonEMRifyou usecustomcodeto processandanalyze extremelylargedatasets withbigdataprocessing frameworkssuchas ApacheSpark,Hadoop, Presto,orHbase UseAmazonAthenaif youonlyneedasimple waytoquerydatastored inAmazonS3.Datais returnedinatableand canbeexportedintoa csvfile.Consecutive resultsarenotstoredina structuredformat. References: https://aws.amazon.com/blogs/big-data/amazon-redshift-spectrum-extends-data-warehousing-out-to-exabyte s-no-loading-required/ https://docs.aws.amazon.com/redshift/latest/dg/c-using-spectrum.html https://tutorialsdojo.com/amazon-redshift/ https://portal.tutorialsdojo.com/ 1 38 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSBackup BackupRetentionPeriodTooShort? Backupsareanecessityforanystoragedevicethatcontainscriticaldata.Theyarealifesaverwhensomething goeswrongandyouneedtorestoresomethingback.Backupsarearequirementforanyproductiondatabase andfilesystem.Mostcompaniesdeveloptheirownbackupstrategies,suchasdecidingwhattypesofbackups totakeandhowlongtokeepthemfor. InAWS,servicessuchasAmazonRDS,AmazonAurora,AmazonEFS,andAmazonDynamoDBsupport automatedbackups,soyouneverhavetoworryaboutnothavingabackupavailable.However,andyoumight notknowthis,automatedbackupsorautomatedsnapshotsfortheseserviceshaveamaximumretention periodofonly35days.Forsomecompanies,thisperiodistooshort.Tokeepyourbackupsforlongerperiods oftime,youshouldcreatemanualbackups;butwhywouldyoudoataskthatrepeatsmanuallywhenyoucan automateit? Ifyouhaveacustomsolutionfortakingmanualbackupsprogrammaticallybecauseyouneedtoprocessthe backup,thenthereisnothingwrongwithscriptingyourownautomation.Butifyouronlygoalistotake recurringbackupsandkeepthemdurablyforanextendedperiodoftime,thenyoucanuseAWSBackup instead. AWSBackupisafullymanagedbackupservicethatcentralizesandautomatesbackingupofdataacross differentAWSservices.WithAWSBackup,youcancreatebackupplanswhichdefineyourbackup requirements,suchashowfrequentlytobackupyourdataandhowlongtoretainthosebackups.Your backupsarethenstoredinwhat’scalledabackupvault.Youcanalsospecifyinyourbackupplanifthere shouldbeaspecifictimewindowonwhenbackupsshouldrun.Furthermore,AWSBackupsupports on-demandbackupsifyouonlyneedtodoaone-timebackup. https://portal.tutorialsdojo.com/ 1 39 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ToassociateyourAWSresourceswithyourbackupplans,simplylistdownthetagsthatwouldidentifythemor entertheirresourceIDs.Inotherwords,everysupportedresourcethathasmatchingtagsorresourceIDsfrom thoseyouenteredwillbeincludedinthebackupplan.YoucanchoosewhichAWSservicesyou’dliketoopt-in withAWSBackup.Optingoutaservicemeansthatevenifaresourceunderthatservicematchesatagdefined inoneofyourbackupplans,AWSBackupwillnottakeabackupofthatresource.AWSBackupsupportstaking backupsforthefollowingservices: ● Aurora ● DynamoDB ● EBS ● EC2 ● EFS ● FSx ● RDS ● StorageGateway https://portal.tutorialsdojo.com/ 1 40 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/aws-backup/latest/devguide/whatisbackup.html https://portal.tutorialsdojo.com/ 1 41 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonVPC Non-VPCServices Notallcompute,storage,anddatabaseservicesneedtoruninaVPC.Itisimportantthatyouknowthese servicessoyoucaneasilyspotthemoutintheexam. ServicesthatdonotrequireaVPC: 1) AmazonS3 2) AmazonDynamoDB 3) AWSLambda(althoughyoucanconfigureLambdatoconnecttoaVPCtoaccessresourcesinthe VPC) https://portal.tutorialsdojo.com/ 1 42 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran SecurityGroupvsNACL https://portal.tutorialsdojo.com/ 1 43 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran YourVPChasadefaultsecuritygroupwiththefollowingrules: 1. Allowinboundtrafficfrominstancesassignedtothesamesecuritygroup. 2. AllowalloutboundIPv4trafficandIPv6trafficifyouhaveallocatedanIPv6CIDRblock. YourVPChasadefaultnetworkACLwiththefollowingrules: 1. AllowsallinboundandoutboundIPv4trafficand,ifapplicable,IPv6traffic. 2. EachnetworkACLalsoincludesanonmodifiableandnonremovablerulewhoserulenumberisan asterisk.Thisruleensuresthatifapacketdoesn’tmatchanyoftheothernumberedrules,it’sdenied. NATGatewaysandNATInstances NATGatewaysandNATinstancesprovidepublicinternetconnectivitytoyourprivateVPCresourceswithout havingtoexposethemtothepublicinternet.NATGatewaysaremanagedNATsolutions,soyoucaneasily provisionandusethemwithouthavingtomaintainthem.Theyalsoprovidehighbandwidthspeedsandare highlyavailablewithinasinglesubnet.NATinstances,ontheotherhand,giveyoumoreadministrativecontrol overyourNATworkloads.TheyareEC2instancesthatuseapre-configuredAMI.NATinstancescanbemuch cheaperifyoudonottotallyneedthebenefitsofaNATGateway. RememberthatwhenyoulaunchaNATGatewayorinstance,youmustplacetheminyourpublicsubnetsand notyourprivatesubnets.Theyareliterallyagatewaybetweenyourpublicandprivatesubnets,somistakenly placingtheminaprivatesubnetwillnotprovideyouinternetconnectivity.AlsonotethatasingleNATservice canonlyrunwithinasinglesubnet.Forhighavailabilityandfaulttolerance,youcanusemultiplepublic subnetsandcreateaNATserviceforeachsubnet.Inthiscase,ifonepublicsubnetgoesdown,otherprivate subnetswouldstillhaveinternetconnectivitythroughtheirrespectivepublicsubnets. NATInstancevsNATGateway Attribute NATgateway NATinstance Availability HighlyavailableintheAvailabilityZone itiscreatedin.Butfortruehigh availability,youshouldcreateaNAT gatewayinapublicsubnetforeachof yourredundantprivatesubnetsorAZs. Nothighlyavailable.You’llneeda scripttohandlefailover.Fortruehigh availability,youshouldlaunchaNAT instanceinapublicsubnetforeach ofyourredundantprivatesubnetsor AZs. Bandwidth Canscaleupto45Gbps. Dependsonthebandwidthofthe instancetypeyouuse. https://portal.tutorialsdojo.com/ 1 44 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Maintenance ManagedbyAWS. Managedbyyou,suchasinstalling softwareupdatesoroperating systempatchesontheinstance. Performance OptimizedforhandlingNATtraffic. AnAmazonLinuxAMIthat's configuredtoperformNAT. Typeandsize Noavailableselection. Selecttheinstancetypeandsize accordingtoyourpredicted workload. Cost ChargedonthenumberofNAT gatewaysyouuse,durationofusage, andamountofdatathatyousend throughtheNATgateways. ChargedonthenumberofNAT instancesthatyouuse,durationof usage,instancetypeandsize,and storage.Thisoptionmightbe cheaperforsomescenarios. PublicIPaddresses YouneedtoassociateanElasticIP addresstoeachNATgatewayat creation. YoumayuseanElasticIPaddressor theautomaticallyprovidedpublicIP addressbyAWSwiththeNAT instance. Securitygroups Cannotbeassociatedwithone.Control Canbeassociatedwithoneormore trafficusingnetworkACLs. securitygroups. NetworkACLs UseanetworkACLtocontrolthetraffic UseanetworkACLtocontrolthe toandfromthesubnetinwhichyour traffict oandfromthesubnetin NATgatewayresides. whichyourNATinstanceresides. Portforwarding Notsupported. Manuallycustomizetheconfiguration tosupportportforwarding. Bastionservers Notsupported. Canbeusedasabastionserver. Timeoutbehavior Whenthereisaconnectiontimeout,a NATgatewayreturnsanRSTpacketto anyresourcesbehindtheNATgateway thatattempttocontinuethe connection(itdoesnotsendaFIN packet). Whenthereisaconnectiontimeout,a NATinstancesendsaFINpacketto resourcesbehindtheNATinstanceto closetheconnection. IPfragmentation SupportsforwardingofIPfragmented packetsfortheUDPprotocol. SupportsreassemblyofIP fragmentedpacketsfortheUDP,TCP, andICMPprotocols Doesnotsupportfragmentationforthe TCPandICMPprotocols.Fragmented https://portal.tutorialsdojo.com/ 1 45 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran packetsfortheseprotocolswillget dropped. References: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-comparison.html https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat.html https://tutorialsdojo.com/aws-cheat-sheet-amazon-vpc/ VPCPeeringSetup VPCpeeringisacommongo-tosolutionforlinkingtwoVPCnetworkstogether.Thesolutionissimple, effective,anddoesnotcostanythingtosetup.AnotheradvantageofVPCpeeringisthattheconnectionisnot asinglepointoffailureandisnotabandwidthbottleneckunlikeotherVPCconnectionmethods. TocreateaVPCPeeringconnectionwithoneofyourVPCs,oranotheraccount’sVPC,whetheritbeinthe sameregionoranotherregion,thestepsareasfollows: 1) OnyourVPCconsole,createapeeringrequesttoyourtargetVPC. 2) IndicatewhetherthetargetVPCisinthesameaccountoranotheraccount,andwhetherinthesame regionornot. https://portal.tutorialsdojo.com/ 1 46 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 3) MakesurethatyourtargetVPCCIDRdoesnotoverlapwithyourVPC. 4) Oncethepeeringrequestiscreated,thetargetVPCwilleitheracceptorrejectyourpeeringrequest. 5) IfyourequireDNSresolutionbetweenthetwoVPCs,youcanenabletheminyourVPCpeeringsettings. https://portal.tutorialsdojo.com/ 1 47 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 6) OncethetargetVPCacceptsyourpeeringrequest,youcannowreferencethisconnectioninyourroute tablestospecifywhichtrafficneedstoberoutedovertothetargetVPC. References: https://docs.aws.amazon.com/vpc/latest/peering/create-vpc-peering-connection.html https://tutorialsdojo.com/aws-cheat-sheet-amazon-vpc/ UtilizingTransitGatewayforMulti-VPCConnection WithVPCPeering,youcanonlyconnecttwoVPCstogether.ManagingmultipleVPCPeeringconnectionscan beverytroublesomewhenyouhavemanyinterlinkedVPCs.AbettersolutionwouldbetouseAWSTransit Gatewayinsteadtohandletheseconnections.AWSTransitGatewayrequireslittlemanagementoverheadfor managingmultipleVPCconnections.What’smore,TransitGatewayletsyoucreateSite-to-SiteVPNsolutions thatarenotpossiblewithVPCPeering.TransitGatewayalsoworkswithDirectConnectlineforhybrid environments,whichwouldrequireaDirectConnectGatewayforittowork. AddingCIDRBlockstoyourVPC WhenyoucreateaVPC,youmustprovideaCIDRrangethattheVPCwillusetoallocateprivateIPaddresses toyourresources.IntheeventthatyourunoutofIPaddressestoallocate,youcanexpandyourVPCbyadding IPv4CIDRblockstoit.WhenyouassociateaCIDRblockwithyourVPC,arouteisautomaticallyaddedtoyour VPCroutetablestoenableroutingwithintheVPC.Somerestrictionstorememberare: https://portal.tutorialsdojo.com/ 1 48 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● ● TheCIDRblockmustnotoverlapwithanyexistingCIDRblockthat'sassociatedwiththeVPC. Theallowedblocksizeisbetweena/28netmaskand/16netmask. YoucannotincreaseordecreasethesizeofanexistingCIDRblock. YoucandisassociatesecondaryCIDRblocksthatyou'veassociatedwithyourVPC;however,you cannotdisassociatetheprimaryCIDRblock. Reference: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html#vpc-resize https://portal.tutorialsdojo.com/ 1 49 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRoute53 Route53forDNSandDomainRouting AmazonRoute53isaDomainNameSystem(DNS)webservicethatworkssimilarlytootherDNSproviders outtheresuchasCloudFlareandGoDaddy,withafewextrafunctionalities.Youaren’trequiredtouseRoute53 asyourDNSproviderifyouareusingtheAWScloud,butsinceRoute53istightlyintegratedwithotherAWS services,youcanalwaysmovefromyourcurrentprovidertoenjoythesebenefits.Route53’sprimaryfunctions canbesummarizedintofoursections: 1. Domainregistration 2. DNSmanagement 3. Trafficmanagement 4. Availabilitymonitoring DomainRegistration SinceRoute53isadomainregistrar,youcancertainlypurchaseandregisteryourcustomdomain(s)through theservice.Route53supportsmultipletop-leveldomains(TLD)witheachhavingacorrespondingprice.You canalsospecifyhowmanyyearsyou’dliketoownthedomain(s)beforefinalizingyourpurchase.Route53will thenrequestforyourcontactdetailstokeepyouupdatedonthestatusofyourdomainpurchase.Lastly,there isanoptionforsomeTLDsthatallowsyoutoautomaticallyrenewyourdomainsbeforeeveryexpirationsoyou won’tsuddenlyloseownershipofthem.Onceyou’vesuccessfullypurchasedadomain,itshouldappearasa registereddomaininRoute53. Ifyouhavealreadypurchasedadomainbeforefromanotherregistrar,youcanjusttransfertheownershipto Route53.Butwhendoingso,youshouldtakenoteofthefollowing: ● YoumightincuratransferfeedependingontheTLDbeingtransferred. ● ExpirationdatemaystaythesameormaybeextendeddependingonyourTLD. ● Someregistrarsrequireyoutohaveyourdomainregisteredwiththemforatleast60days.Ifthe registrationforadomainnameexpiredandhadtoberestored,itmusthavebeenrestoredatleast60 daysago. ● Makesurethatthedomainistransferable. ● Route53doesnotsupportalltypesofTLDs.VerifyiftheTLDissupportedfirstbeforeyouinitiatea transfer. Similarly,ifyoucantransferdomainsintoRoute53,thenyoucanalsotransferdomainsoutofRoute53. DNSManagement YoumayuseRoute53asyourDNSserviceevenifyourdomainsareregisteredwithadifferentdomain registrar.ItisabletoresolveDNSqueriestotargetsthatarerunninginsideandoutsideofAWS.InDNS https://portal.tutorialsdojo.com/ 1 50 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran management,everythingstartsatyourhostedzones.AhostedzoneisacontainerforDNSrecords,andthese recordscontaininformationabouthowyouwanttoroutetrafficforaspecificdomain.Hostedzonesshould havethesamenameasitsassociateddomain.Therearetwotypesofhostedzonesthatyoucancreate— publichostedzoneandp rivatehostedzone.Themaindifferencebetweenthetwois,withpublichosted zones,therecordsstoredinthemarepubliclyresolvable.Ontheotherhand,privatehostedzonescontain recordsthatareonlyresolvablewithinaVPCyouassociate,likeifyouwantarecordtoresolvetoaprivateEC2 instanceforexample. Ineachpublichostedzone,Route53automaticallycreatesanameserver(NS)recordandastartofauthority (SOA)record.Afterwards,youcancreateadditionalrecordsinthishostedzonetopointyourdomainand subdomainstotheirendpoints.IfyouaremovingfromanexistingDNSservice,youcanalsoimportazonefile insteadtoautomaticallypopulateyourhostedzone.BesuretomodifytheNSrecordsoftheDNSserviceto usethenameserversofAWS.Onceyou’veperformedtheactionsabove,justwaitforDNSqueriestocomein (andwaitfortheDNScacheTTLtoexpireiftherecordswereexistingbeforehand),andtheyshouldresolveto yourdesignatedtargets. Forprivatehostedzones,DNSresolutionishandledabitdifferently.WhenyoucreateaVPC,Route53Resolver automaticallyanswersDNSqueriesforlocalVPCdomainnamesofEC2instancesandrecordsinprivate hostedzones.Forallotherdomainnames,Route53Resolverperformsrecursivelookupsagainstpublicname servers.YoucanalsointegrateDNSresolutionbetweenResolverandDNSresolversonyournetworkby configuringforwardingrules.Beforeyoucanstartforwardingqueries,youmustcreateaResolverinbound and/oroutboundendpointintheassociatedVPC. ● AninboundendpointletsDNSresolversonyournetworkforwardDNSqueriestoRoute53Resolvervia thisendpoint. ● AnoutboundendpointletsRoute53Resolverconditionallyforwardqueriestoresolversonyour networkviathisendpoint. TherearemultipletypesofrecordsthatyoucancreateinRoute53,butthemostcommononesyou’ll encounterareArecord,AAAArecord,andCNAMErecord.Furthermore,eachoftheserecordscanbealiasor non-aliasrecords.Anon-aliasrecordmeansyoujustneedtoenteryourtargets’IPaddressesordomainnames andtheTTLfortherecord.AnaliasrecordisaRoute53-specificfeaturethatletsyouspecifyyourAWS resourcesasthetargetinsteadofanIPaddressoradomainname.Whenyouuseanaliasrecordtoroute traffictoanAWSresource,thereisnoTTLtoset;Route53automaticallyrecognizeschangesintheresource. UnlikeaCNAMErecord,youcancreateanaliasrecordatthezoneapex.Forexample,anAliasArecordcan routetraffictothefollowingtargets: 1) AnotherArecordinyourhostedzone 2) APIGatewayAPI 3) CloudFrontdistribution 4) ElasticBeanstalkenvironment 5) Application,NetworkandClassicLoadBalancer 6) GlobalAccelerator https://portal.tutorialsdojo.com/ 1 51 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran 7) S3webendpoint 8) VPCe ndpoint TrafficManagement EachRoute53DNSrecordalsohasitsownroutingpolicy.AroutingpolicydetermineshowRoute53responds toDNSqueries.Differentroutingpoliciesachievedifferentresults: ● Simpleroutingpolicy– ResolvesyourDNStoaresourceasis. ● Failoverroutingpolicy–Useforconfiguringactive-passiveroutingfailover.YoucanspecifytwoDNS recordswiththesameDNSnameandhavethempointtotwodifferenttargets.Ifyourprimarytarget becomesunavailable,Route53automaticallyroutessucceedingincomingrequeststoyoursecondary target. ● Geolocationroutingpolicy–Usewhenyouwanttoroutetrafficbasedonthelocationofyourusers. Thispolicyhelpsyouservegeolocation-specificcontenttoyourusers. ● Geoproximityroutingpolicy–Usewhenyouwanttoroutetrafficbasedonthelocationofyour resourcesand,optionally,shifttrafficfromresourcesinonelocationtoresourcesinanother. ● Latencyroutingpolicy–UsewhenyouhaveresourcesinmultipleAWSRegionsandyouwanttoroute traffictotheregionthatprovidesthebestlatency. ● Weightedroutingpolicy–Usetoroutetraffictomultipleresourcesinproportiontotheweightsyou assignforeachtarget.Thegreatertheweight,thegreaterthetrafficportionitreceives.Thispolicycan beusedwhenyou’vedeployedanewversionofanapplicationandyouonlywanttorouteapercentage ofyourusertraffictoit. ● Multivalueanswerroutingpolicy–UsewhenyouwantRoute53torespondtoDNSquerieswithupto eighthealthyrecordsselectedatrandom.Userswhoquerythistypeofrecordcanchooseatargetfrom theDNSresponsetoconnectto. Someoftheseroutingpoliciescanactuallybeusedtogether,suchaslatencyandweightedrecords,toproduce amorecomplexroutingsystem. AvailabilityMonitoring ThelastprimaryfeatureofRoute53ismonitoringthehealthofyourendpointsandtakingthenecessarysteps inreducingDNSresolutiondowntime.ARoute53healthcheckcanmonitoranyofthefollowing: ● Thehealthofaresource,suchasawebserver ● Thestatusofotherhealthchecks ● ThestatusofanAmazonCloudWatchalarm Route53healthchecksupportsmultipletypesofnetworkprotocolsformonitoringyourtargets.Ifyouare familiarwiththehealthcheckofanelasticloadbalancer,it’sprettymuchthesameasaRoute53healthcheck. Youindicatethenetworkprotocol,port,targetandpathofthehealthcheck,andoptionallythecheckinterval, failurethreshold,andoriginatingRegionsofthehealthcheckrequests. https://portal.tutorialsdojo.com/ 1 52 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran YoucanuseHTTP,HTTPS,orTCPforthenetworkprotocol,andevenconfigureRoute53tosearchfora specificstringintheresponsebodytodetermineiftheresponseisgoodornot.Furthermore,youcaninvert thestatusofahealthcheck,meaningRoute53considershealthcheckstobeunhealthywhenthestatusis healthyandviceversa.Afteryoucreateahealthcheck,youcanviewthestatusofthehealthcheck,get notificationswhenthestatuschangesviaSNSandCloudwatchAlarms,andconfigureDNSfailoverinresponse toafailedhealthcheck. References: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/registrar.html https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring.html https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html https://portal.tutorialsdojo.com/ 1 53 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran LatencyRoutingvsGeoproximityRoutingvsGeolocationRouting https://portal.tutorialsdojo.com/ 1 54 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 1 55 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Active-ActiveFailoverandActive-PassiveFailover Alltypesofsystemsnowadaysneedtoimplementsomesortofredundancyandhighavailabilitytoensure businesscontinuity.We’llneverknowwhenthenextoutagemightoccur,sobyplanningbeforehandand developingsolutionsthatconsidertheworstpossiblescenarios,wecancreateahighlyresilientarchitecture thatcanachievenear100%uptime. Hence,youshouldhaveafailoverplanforeverycomponentofyoursystem,andthatincludesyourDNS services.AWSmakesitveryconvenientforustocreatesolutionsthatfocusonhighavailabilityandfault tolerance.InRoute53,AWShandlestheavailabilityoftheservicewhileyoumanagethepoliciesthatensure yourwebsite’savailability.Route53useshealthcheckstomonitortheavailabilityofyourDNStargets.And therearetwowaysyoucanapproachfailoversinRoute53:active-activefailoverandactive-passivefailover. Inanactive-activefailoversetup,allDNSrecordsthatcontainthesameDNSname,thesamerecordtype(A, AAAA,CNAME,etc),andthesameroutingpolicy(simple,latency,weighted)areconsideredasactiveand queryableunlessRoute53marksthemasunhealthyduetoahealthcheck.YoucancreatemultipleDNS recordsthathavethesameconfigurationbutdifferenttargetsinthesamehostedzone.Route53willuseany ofthesehealthyrecordstorespondtoaDNSquery. Active-passivefailover,ontheotherhand,usesthefailoverroutingpolicytohandleDNSfailovers.You’llbe creatingtwofailoveraliasrecords,oneprimaryandonesecondary,thatarereferencingyourprimaryand secondaryendpointsrespectively.DNSqueriesareroutedtoyourprimaryrecordsforaslongastheir endpointsarehealthy.Intheeventthatyourprimarybecomesunavailable,Route53willautomaticallyrespond toDNSqueriesusingyoursecondary(failover).Tocreateanactive-passivefailoverconfigurationwithone primaryrecordandonesecondaryrecord,youjustcreatetherecordsandspecifyFailoverfortherouting policy.Youcanalsoassociatemultipleresourceswiththeprimaryrecord,thesecondaryrecord,orboth.Route 53considerstheprimaryfailoverrecordtobehealthyaslongasatleastoneoftheassociatedresourcesis healthy. IfyouareusingAliasrecordsforyourprimaryand/orsecondaryrecords,there’snoneedforyoutocreate manualhealthchecksforthoseresources;justsetEvaluateTargetHealthoptionintherecordtoYesinstead. Forotherrecordtypes,youwillneedtocreatemanualhealthchecks. https://portal.tutorialsdojo.com/ 1 56 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-types.html https://portal.tutorialsdojo.com/ 1 57 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://aws.amazon.com/premiumsupport/knowledge-center/route-53-dns-health-checks/ https://tutorialsdojo.com/amazon-route-53/ Route53DNSSEC DomainNameSystemSecurityExtensions,orDNSSEC,isaprotocolforsecuringDNStraffic.Itprevents attackersfromhijackingtraffictointernetendpointsbyinterceptingDNSqueriesandreturningtheirownIP addressestoDNSresolvers,knownasDNSspoofing.WhenyouconfigureDNSSECforyourdomain,aDNS resolverestablishesachainoftrustforresponsesfromintermediateresolvers.Thechainoftrustbeginswith thetop-leveldomainregistryforthedomainandendswiththeauthoritativenameserversatyourDNSservice provider.ToconfigureDNSSECforadomain,yourdomainandDNSserviceprovidermustmeetthefollowing prerequisites: 1. TheregistryfortheTLDmustsupportDNSSEC. 2. TheDNSserviceproviderforthedomainmustsupportDNSSEC.Route53supportsDNSSECsigningas wellasDNSSECfordomainregistration. 3. YoumustconfigureDNSSECwiththeDNSserviceproviderforyourdomainbeforeyouaddpublickeys forthedomaintoRoute53.ConfiguringDNSSECinRoute53involvestwosteps: a. EnableDNSSECsigningforRoute53,andhaveRoute53createakeysigningkey(KSK)based onacustomermanagedCMKinAWSKMS. b. CreateachainoftrustforthehostedzonebyaddingaDelegationSigner(DS)recordtothe parentzone,soDNSresponsescanbeauthenticatedwithtrustedcryptographicsignatures. 4. Ifyou’veconfiguredDNSSECwithadifferentDNSserviceproviderforthedomain,youmustaddthe publicencryptionkeystoRoute53. a. InRoute53,underR egistereddomains,choosethenameofthedomainthatyouwanttoadd keysfor. b. AttheD NSSECstatusfield,chooseM anagekeys. c. Specifythekeytype-key-signingkey(KSK)orzone-signingkey(ZSK). d. Specifythealgorithmthatyouusedtosigntherecordsforthehostedzone. e. SpecifythepublickeyofthekeypairthatyouusedtoconfigureDNSSEC. f. ClickonAddtofinish. References: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/domain-configure-dnssec.html https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-configuring-dnssec.html https://portal.tutorialsdojo.com/ 1 58 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSElasticLoadBalancing AWSELBRequestRoutingAlgorithms Youmighthaveheardofaloadbalancerbefore,andyoumightalreadyknowwhatitspurposeis,butareyou familiarwithhowanAWSElasticLoadBalancerrouteswebrequeststoyourtargets? WeknowthattherearedifferentvariationsofAWSELBs,butforthissection,wewilljustfocusonthesethree types:ApplicationLoadBalancer,NetworkLoadBalancerandClassicLoadBalancer.Eachofthesetypeshave theirownroutingprocedureswhichwewillelaboratebelow. ApplicationLoadBalancer Routing NetworkLoadBalancerRouting ClassicLoadBalancerRouting 1. Whentheloadbalancer 1. Whentheloadbalancer 1. ThisloadbalancerroutesTCP receivesarequest,itfirst receivesarequest,itselectsa requeststotargetsusing evaluatesthelistenerrulesin targetfromthetargetgroup roundrobinalgorithm. priorityordertodetermine withamatchinglistenerrule 2. ForHTTPa ndHTTPS whichruletoapply.Recallthat usingfl owh ashalgorithm. requests,itu sestheleast listenerrulesspecifyhow Flowhashalgorithmchecks outstandingr equests requestswillberoutedto onthefollowingparameters: algorithm. appropriatetargets. ● Theprotocol 2. Onceamatchingruleisfound, ● ThesourceIPaddressand theloadbalancerusesa sourceport routingalgorithmtoselecta ● ThedestinationIPa ddress targetfromthetargetgroup anddestinationport fortheruleaction.Thedefault ● TheTCPsequencenumber routingalgorithmisr ound 2. Theloadbalancerthenroutes robin. eachindividualTCP 3. Roundrobinalgorithm connectiontoasingletarget attemptstodistributerequests foraslongastheconnection evenlytoalltargetsbyhaving isalive,meaningonceaTCP eachtargettaketurnsin connectiontoatargethas receivingarequest. beenestablished,NLBwill 4. Anotherroutingalgorithmyou keepusingthisconnectionfor canuseforALBistheleast succeedingrequestsdirected outstandingrequests tothistarget. algorithm.Leastoutstanding requestsalgorithmisan algorithmthatforwards incomingrequeststotargets withthelowestnumberof requestsatthatmoment. https://portal.tutorialsdojo.com/ 1 59 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html# request-routing ELBIdleTimeout ForeveryrequestthatarrivesatanELB,theloadbalancerestablishestwoconnections:onewiththeclient application,andanotheronewiththetargetdestination.Tomakesurethattheseconnectionsareonlykept aliveforaslongastheyareinuse,yourloadbalancerhasanidletimeoutperiodthatmonitorsthestateof theseconnections.AnELBidletimeoutisthenumberofsecondsthataconnectionhastosendnewdatato keeptheconnectionalive.Oncetheperiodelapsesandtherehasbeennotransferofnewdata,theload balancerclosestheconnection.Thisallowsnewconnectionstobeestablishedwithoutusingupallyour connectionresources.Fornetworkoperationsthattakealongtimetocomplete,youshouldsendatleastone byteofnewdatabeforeyouridletimeoutelapsestomaintaintheconnection. Thedefaultidletimeoutforloadbalancersissetat60seconds.Youcanmodifytheidletimeoutperiodof classicandapplicationloadbalancersifyouneedamuchlongerperiod,butdonotethathavingalongeridle timeoutmightmakeiteasiertoreachthemaximumnumberofconnectionsforyourloadbalancer.The maximumtimeoutperiodyoucanconfigureis4000secondsor1hour6minutesand40seconds.Network loadbalancerssettheidletimeoutvalueforTCPflowsto350seconds.Youcannotmodifythisvalue.Clients ortargetscanuseTCPkeepalivepacketstoresettheidletimeout. Justtonote.Settingtheidletimeouttoahighernumbermaybeusefulforsomescenarios,butnotallofthem. Whenyouarekeepingaconnectionalivejusttowaitforaresponsefromalong-runningprocess,youshould considerrefactoringyourapplicationstouseasynchronoustransmissionsinstead,orcreateapipelineto decoupletheresponsefromtheloadbalancer.Rememberthat,asaSolutionsArchitect,youshouldbe designingthebestsolutionforagivenproblem. References: https://portal.tutorialsdojo.com/ 1 60 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#conn ection-idle-timeout ELBHealthChecksvsRoute53HealthChecksForTargetHealthMonitoring WeallknowthathealthchecksareaveryusefultoolformakingsurethatAWSservicessuchasAWSELBand AmazonRoute53knowthestateoftheirtargetsbeforeforwardingtraffictothem.Inthissection,wewilltake alookatELBhealthchecksandRoute53healthchecks,andcomparethemwithoneanother. HealthCheck Service AWSElasticLoadBalancing AmazonRoute53 Whatisitfor? Thishealthcheckperiodicallysendsa requesttoatargetinstance,serveror functiontoverifyitsstatusi.e.availableto accepttrafficrequests. Thishealthcheckmonitorsthestateofa record’starget,whichcanbeanEC2instance, aserver,oranAWSservicethathasan endpoint. Targethealth checksettings Youentertheportandcommonpathofyour YouenterthedomainnameortheIPaddress, targetsthattheloadbalancerwillsendthe port,a ndpaththatRoute53willusetosend healthcheckrequestto. thehealthcheckrequesttoiftherecordisa non-aliasrecord, orbysettingE valuatetargethealthtoYesif therecordisanaliasrecord. Areaspan Loadbalancerscanmonitortargetsthat Route53monitorsyourtargetsregardlessof https://portal.tutorialsdojo.com/ 1 61 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Healthcheck frequency spanmultipleavailabilityzonesbutnot multipleregions. theirlocation,aslongastheyarereachable byRoute53. Youspecifyavaluebetween5secondsand 300seconds Chooseeitherevery10secondsorevery30 seconds. Responsetimeout Youcanenteravaluebetween2seconds and60seconds. Cannotbeconfigured. Criteriatopass healthcheck Youspecifyathresholdthatatargetshould pass/failahealthchecktodetermineits status. Ifmorethan18%ofhealthcheckersreport thatanendpointishealthy,Route53 considersithealthy.If18%ofhealthcheckers orfewerreportthatanendpointishealthy, Route53considersitunhealthy.Route53 healthcheckserversarelocatedindifferent locationsworldwide. Accessibility Makesuretargetsarereachablebytheload Makesureendpointsarereachableand balancer.Newtargetscanbeeasilyadded resolvablewhenusershityourURL.Dueto andremovedfromtheloadbalancer. DNScaching,itmaytakeawhilefornew targetendpointstoreflecttoendusers. Primarypurpose Highavailabilityandfaulttoleranceforyour services DNSfailoverrouting Thereisnorulesayingthatyoucannotusethesetwohealthcheckstogether.Infact,itisabetterpracticeto usethemboth!AmazonELBwillmakesurethatyourtrafficwillonlybehandledbyhealthytargets,and AmazonRoute53willmakesurethatyourrecordshaveendpointsthatarereachableandresolvable.Use differentRoute53recordtypesandroutingpoliciestoperformanautomaticDNSfailoverwhenanendpoint suddenlybecomesunavailable,andcontrolhowthefailovershouldoccur. References: https://aws.amazon.com/blogs/aws/amazon-route-53-elb-integration-dns-failover/ https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html https://portal.tutorialsdojo.com/ 1 62 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ApplicationLoadBalancervsNetworkLoadBalancervsClassicLoadBalancervsGatewayLoad Balancer https://portal.tutorialsdojo.com/ 1 63 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ApplicationLoadBalancerListenerRuleConditions TheAWSELBApplicationLoadBalancerisoneofthemostinnovativeservicesyoucanfindinAWS.Itoffers manyuniqueroutingfeaturesthatcannotbefoundinothertypesofelasticloadbalancers.Butbeforewetalk aboutlistenerruleconditions,let’sfirstrefreshourselveswithwhatlistenersandlistenerrulesare.Alisteneris https://portal.tutorialsdojo.com/ 1 64 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran aprocessthatchecksforincomingconnectionrequests,usingtheprotocolandportthatyouconfigure.The rulest hatyoudefineforalistenerdeterminehowtheloadbalancerroutesrequeststoitsregisteredtargets. Youcanaddthefollowingconditionstoalistenerruletocreatemultipleroutingpathsunderasingleload balancer: ● host-header—Routebasedonthehostnameofeachrequest.Alsoknownashost-basedrouting.This conditionenablesyoutosupportmultiplesubdomainsanddifferenttop-leveldomainsusingasingle loadbalancer.Hostnamesandmatchevaluationsarenotcase-sensitive. ● http-header—RoutebasedontheHTTPheadersforeachrequest.Standardandcustomheadersare supported.Headernameandmatchevaluationarenotcase-sensitive. ● http-request-method—RoutebasedontheHTTPrequestmethodofeachrequest.Youcanspecify standardorcustomHTTPmethodsforthevalue.Thematchevaluationiscase-sensitive,sotoproperly routerequeststothiscondition,therequestmethodmustexactlymatchthevalueyou’veentered. ● path-pattern—RoutebasedonpathpatternsintherequestURLs.Alsoknownaspath-basedrouting. ThisconditionallowsyoutoroutetomultipletargetsdependingontheURLpathsuppliedinthe request.URLpathdoesnotincludethequeryparameters.Pathevaluationiscase-sensitive. ● query-string—Routebasedonkey/valuepairsorvaluesinthequerystrings.Matchevaluationisnot case-sensitive.ThisconditiondoesnotincludetheURLpathintheevaluation. ● source-ip—RoutebasedonthesourceIPaddressofeachrequest.TheIPaddressmustbespecified inCIDRformat.BothIPv4andIPv6addressesaresupportedasvaluesforthiscondition.Ifaclientis behindaproxy,theconditionevaluatestheIPaddressoftheproxy,nottheIPaddressoftheclient. Alistenerrulecanincludeuptooneofeachofthefollowingconditions:host-header,http-request-method, path-pattern,andsource-ip;andincludeoneormoreofeachofthefollowingconditions:http-headerand query-string.Youcanalsospecifyuptothreematchevaluationspercondition,butonlyuptofivematch evaluationsperrule.Thisgivesyoumorevaluestoworkwithforeachconditionyoucreate. https://portal.tutorialsdojo.com/ 1 65 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#rule-cond ition-types https://tutorialsdojo.com/aws-elastic-load-balancing-elb https://portal.tutorialsdojo.com/ 1 66 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonCloudFront CustomDNSNameswithDedicatedSSLCertificatesforyourCloudFrontDistribution PerhapsyouhaveasetofEC2webserversrunningbehindanelasticloadbalancerservingyourpublic website,andyourwebsite’sDNSnameispointingdirectlytoyourloadbalancerinRoute53.Thisisthemost commonarchitectureyoucanbuildinthecloud.Althoughthisarchitectureisabsolutelyfineasitis,thereare stillsomeareasyoucanimproveupon.OneofwhichisbyplacingaCDN(contentdeliverynetwork)service suchasAmazonCloudFrontbeforeyourloadbalancer. “Why?”youmightask.AmazonCloudFrontisabletoprovidemultiplebenefitstoyourwebsite.Youcanuse CloudFronttohaveabetterglobalreachsinceit’spoweredbyAWS’globaledgenetwork.Youcanhave CloudFrontcachefrequentlyrequestedobjectsfromyourwebsitetospeeduploadingtimesforyourusers, whileatthesametimealleviatingtheburdenfromyourwebserversanddatabasesfromservingthesame objectsoverandoveragain.ItcanalsoprotectyourwebsitefromsecurityattackssuchasDDoSsince CloudFrontintroducesanextralayerbeforeyouractualarchitecture.YoucanalsoaddinaWAFforadditional securitymeasures.Thesebenefitssoundgreatforanybusinessthatreliesheavilyontheirwebsite’s performance.Andhere’showyoucanaddaCloudFronttoyourarchitectureandrepointyourdomainname. Whenyou’recreatingaCloudFrontdistribution,you’llneedtoenteryourorigindomainname,whichistheorigin thatCloudFrontwillusetoserverequests.Inthisscenario,theorigindomainnameisthepublicDNSnameof yourelasticloadbalancer.YoucanalsooptionallyprovideanoriginpathifyouwantCloudFronttorequestyour contentfromaspecificdirectoryinyourcustomorigin.Next,youprovideacustomoriginIDsoyoucaneasily identifyyourcustomorigin.AnoriginIDisrequiredsinceasingleCloudFrontdistributioncansupportmultiple originsandrouterequeststospecificoriginsdependingonthebehaviorthatyoudefine.Forexample,ifthe pathpatternforarequestincludes/ images/*.jpg,youcantellCloudFronttoroutetheserequeststooriginB androuteeverythingelsetooriginA. https://portal.tutorialsdojo.com/ 1 67 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ItisagoodpracticetoalwaysuseHTTPSforyourpublicwebsites,andyoucanenforcethisinCloudFront, eitherbyredirectingallHTTPrequeststoHTTPSorbyallowingHTTPSrequestsonlyintheviewerprotocol policy. EachCloudFrontdistributionautomaticallygeneratesaunique,publiclyresolvableDNSendpointforitself similartoanELB.Youcanalsolistadditionalalternatedomainnamesforyourdistribution.Thisenablesyour userstoaccessyourCloudFrontusingfriendlierdomainnames.IfyouareenforcingHTTPSandyoudonot provideanalternatedomainnameforyourCloudFrontdistribution,AWSletsyouusethedefaultCloudFront SSLcertificate(*.cloudfront.net).ButifyoudoprovidealternatedomainnamesforyourCloudFront,youcan utilizeyourowncustomSSLcertificates.TheSSLcertificatemustbeinAWSCertificateManager(ACM)but doesn’tnecessarilyhavetobeissuedbyACM.YoucanimportyourownSSLcertificatetoACManditwillwork justfine. https://portal.tutorialsdojo.com/ 1 68 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Foreachorigin,youcanaddmultiplealternatedomainnamesaslongastheyaresupportedbyyourcustom SSLcertificate.Ifyouentermanilaph.comandmanilaph1.comasalternatedomainnames,and manilaph1.comisnotassociatedwithyourSSLcertificate,thedistributionwillfailtolaunch.Thedomain namesyouentercanbeparentdomains,subdomainsorwildcarddomains. Lastly,addinginyouralternatedomainnameswillnotmakethemresolveautomaticallytoyourCloudFront distribution.YouwillalsohavetocreatethenecessaryDNSrecordsforeachofyouralternatedomainnames intheappropriatehostedzonesinRoute53oranyexternalDNSserviceyouareusing.Ifyourhostedzoneisin Route53,youmaycreatealiasrecordstopointtheDNSrecordstoyourCloudFront.Ifyouareusingan externalDNSservice,youmaycreateCNAMErecordsandpointthemtotheCloudFront-generatedpublicDNS endpoint(*.cloudfront.net).Inourscenario,thecustomdomainnamewasalreadypointingtoyourload balancerbeforehand.Simplymodifytherecord’stargettopointtoyourCloudFrontandwaitfortheDNScache torefresh. Onceyou’vecreatedyourCloudFrontdistributionandmadethenecessarychangesinRoute53,requeststo yourwebsitewillnowbehandledbyCloudFront.CloudFrontsearchesforthecorrectdestinationorigintoroute theserequests,andoptionallycachestheorigin’sresponseifyou’veconfiguredcaching.Youcanmonitorthe statusofyourCloudFrontandyourwebsite’sperformanceinAmazonCloudwatch.Furthermore,youcan enableloggingforyourCloudFrontwhichlogsalltherequeststhatitreceivesandstoresthelogsinan AmazonS3bucket. References: https://aws.amazon.com/premiumsupport/knowledge-center/multiple-domains-https-cloudfront/ https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-https-alternate-domain-name s.html https://tutorialsdojo.com/amazon-cloudfront/ https://portal.tutorialsdojo.com/ 1 69 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran RestrictingContentAccesswithSignedURLsandSignedCookies Sometimes,developerswouldliketoaddaCloudFronttotheirapplicationsduetothebenefitsthattheservice provides,buttheseapplicationsarenottobesharedwiththepublic.TakeanS3bucketforexample.To preventusersfromaccessingyourobjectsdirectlyfromthebucket,you’dplaceaCloudFrontinfrontoftheS3 bucketandhavetheusersuseCloudFronttoaccessyourobjects.Inthisscenario,onepotentialsecurity concernisthatifyourCloudFrontURLgotexposedtoathird-partyuser,heorshewillbeabletoaccessthe sameobjectsaswell.Topreventthisfromhappening,CloudFronthasaneatfeaturethatletsyousecurely serveprivatecontenttoselectusersonly.YoucanconfigureCloudFronttoallowuserstoaccessyourfiles usingeithers ignedURLsors ignedcookiesonly. WhenyoucreatesignedURLsorsignedcookiestocontrolaccesstoyourfiles,youcanspecifythefollowing restrictions: ● Anendingdateandtime,afterwhichtheURLisnolongervalid. ● (Optional)ThedateandtimethattheURLbecomesvalid. ● (Optional)TheIPaddressorrangeofaddressesofthecomputersthatcanbeusedtoaccessyour content. PartofasignedURLorasignedcookieishashedusingRSA-SHA1algorithmandsignedusingtheprivatekey fromanasymmetrickeypair.WhensomeoneusesthesignedURLorsignedcookie,CloudFrontcomparesthe signedandunsignedportionsoftheURLorcookie.Iftheydon'tmatch,CloudFrontdoesn'tservethefile. NowwhatisthedifferencebetweensignedURLsandsignedcookies,andwhichoneshouldyouuse?Ina basicsense,theybothprovidethesamefunctionality. UsesignedURLsifyouwanttorestrictaccessto individualfiles,orifyourusersareusingaclientthatdoesn'tsupportcookies.Usesignedcookiesifyouwant toprovideaccesstomultiplerestrictedfiles,orifyoudon'twanttochangeyourcurrentURLs.Ifyourcurrent URLscontainanyofthefollowingquerystringparameters,youcannotuseeithersignedURLsorsigned cookies: ● Expires ● Policy ● Signature ● Key-Pair-Id CloudFrontfirstchecksyourURLsforpresenceofanyofthequeryparametersabove.Ifanyofthemispresent, CloudFrontassumesthattheURLsaresignedURLsevenifyouhaven’tintendedthemassuch,andtherefore won'tcheckforsignedcookies. BeforeyoucancreatesignedURLsorsignedcookies,youneedasigner.Asigneriseitheratrustedkeygroup thatyoucreateinCloudFront,oranAWSaccountthatcontainsaCloudFrontkeypair.Assoonasyouaddthe signertoyourCloudFrontdistribution,CloudFrontstartsrequiringviewerstousesignedURLsorsigned https://portal.tutorialsdojo.com/ 1 70 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran cookiestoaccessyourfiles.Theremightbecaseswhereinyoudon’twantallyourcontenttobeaccessedthis way.Hence,youcancreatemultiplecachebehaviorsinyourdistributionandonlyassociatethesignerwith someofthem.ThisallowsyoutorequiresignedURLsorsignedcookiesforsomefilesandnotforothersin thesamedistribution. References: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html https://tutorialsdojo.com/amazon-cloudfront/ https://tutorialsdojo.com/s3-pre-signed-urls-vs-cloudfront-signed-urls-vs-origin-access-identity-oai/ OriginAccessIdentityinCloudFront WhenyoufirstsetupapubliclyaccessibleS3bucketastheoriginofaCloudFrontdistribution,yougrant everyonepermissiontoreadthefilesinyourbucket.Thisallowsanyonetoaccessyourfileseitherthrough CloudFrontortheAmazonS3endpoint.Thismightbeasecurityconcernforyousinceyoumightwantyour objectstobeaccessiblethroughCloudFrontonly.Thisisespeciallyimportantifyouhaveconfigured CloudFrontsignedURLsorsignedcookiestorestrictaccesstofilesinyourS3bucket,sincetheycanbypass thisbyusingtheS3fileURLdirectly.RestrictingaccesstocontentthatyouservefromS3involvestwosteps: 1. CreateaspecialCloudFrontusercalledanoriginaccessidentity(OAI)andassociateitwithyour distribution. 2. ConfigureyourS3bucketpermissionssothatCloudFrontcanusetheOAItoaccessthefilesinyour bucketandservethemtoyourusers.DisabledirectURLfileaccess. Originaccessidentity,orOAI,limitsuseraccesstoyourfilesonlyviaCloudFront.SoevenifyourS3URLwas exposedandamaliciousattackerusedittotryandaccessyourfiles,thepermissionsyou’vesetinyourS3 bucketwillpreventthemfromsnoopingaroundandretrievinganything.YoucancreateanOAIwhilecreatinga CloudFrontdistributionorasanindividualresourceandassociateittoaCloudFrontdistributionafterwards. YoucanreuseexistingOAIssincetheyareindividualidentitiesandarenotdirectlytiedtoyourorigins.Youcan alsohaveCloudFrontimmediatelyapplythenecessaryreadpermissionstoyouroriginS3bucketsothatyour OAIwillbeabletoreadyourfiles.ThissavesyouthetimeinwritingyourownS3permissions(whichmight takeyousometimeifyouhaven’tdoneitbefore).AnS3bucketcanhavemultipleOAIsasprincipalsinits permissionpolicy. https://portal.tutorialsdojo.com/ 1 71 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran HereisanexampleofanS3policythatallowsanOAItoreadallofitsobjects: { "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Principal":{ "AWS":"arn:aws:iam::cloudfront:user/CloudFrontOriginAccessIdentityu nique_identifier" }, "Action":"s3:GetObject", "Resource":"arn:aws:s3:::tutorialsdojo/*" } ] } References: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-t o-s3.html https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-access-to-amazon-s3/ https://tutorialsdojo.com/amazon-cloudfront/ https://tutorialsdojo.com/s3-pre-signed-urls-vs-cloudfront-signed-urls-vs-origin-access-identity-oai/ https://portal.tutorialsdojo.com/ 1 72 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran HighAvailabilitywithCloudFrontOriginFailover ThosethatareusingCloudFrontmusttakeintoaccountthehighavailabilityoftheirorigins.Ifitweretogo down,yourCloudFrontshouldbeabletoautomaticallyredirecttrafficrequeststoaneworigin.ACloudFront origingroupletsyouspecifyoneprimaryoriginandonesecondaryorigin.Iftheprimaryoriginbecomes unavailable,orreturnsspecificHTTPresponsestatuscodesthatindicateafailure,CloudFrontautomatically switchestothesecondaryorigin.Originfailoverrequiresyourdistributiontohaveatleasttwoorigins.Once you’vecreatedyourorigingroup,youcreateorupdateacachebehaviortousetheorigingroup. Afteryouconfigureoriginfailoverforacachebehavior,CloudFrontdoesthefollowingforviewerrequests: 1. Whenthere’sacachehit,CloudFrontreturnstherequestedfile. 2. Whenthere’sacachemiss,CloudFrontroutestherequesttotheprimaryoriginintheorigingroup. 3. Whentheprimaryoriginreturnsastatuscodethatisnotconfiguredforfailover,suchasanHTTP2xx or3xxstatuscode,CloudFrontservestherequestedcontenttotheviewer. 4. CloudFrontonlyroutestherequesttothesecondaryoriginintheorigingroupwhenanyofthefollowing occur: a. TheprimaryoriginreturnsanHTTPstatuscodethatyou’veconfiguredforfailover b. CloudFrontfailstoconnecttotheprimaryorigin c. Theresponsefromtheprimaryorigintimesout CloudFrontfailsovertothesecondaryoriginonlywhentheHTTPmethodoftheviewerrequestisG ET,H EAD, orO PTIONS.OtherHTTPmethodswillnotcauseafailover.Youcanalsocreatecustomerrorpagesforyour primaryandsecondaryoriginsincasetheyreceivearequestwhilethey’reunavailable. https://portal.tutorialsdojo.com/ 1 73 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/high_availability_origin_failover.htm l https://tutorialsdojo.com/amazon-cloudfront/ https://portal.tutorialsdojo.com/ 1 74 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSDirectConnect LeveragingAWSDirectConnect Somebusinesseshavestrictnetworkandsecurityrequirementsfortheiroperations.Forthesecases,a dedicatedandsecurenetworktoAWSisneeded.Ifyouneedadedicatednetworklineforyourtraffic,provision anAWSDirectConnectfromaproviderandhaveitlinkedtoyournetwork.AWSDirectConnectprovidesmany benefitscomparedtoaVPNsolution,suchasaprivateconnectiontoAWS,lowerlatency,andahighernetwork bandwidth.TherearedifferentwaystoleverageDirectConnect: 1. IfyouneedaccesstoresourceslocatedinsideaVPC,createaprivatevirtualinterface(VIF)toaVGW attachedtotheVPC.Youcancreate50VIFsperDirectConnectconnection,enablingyoutoconnectto amaximumof50VPCs.ConnectivityinthissetuprestrictsyoutotheAWSRegionthattheDirect Connectlocationishomedto.ThisisnotthebestsolutionifyouneedtoconnecttoabunchofVPCs. 2. IfyourVPCsarelocatedindifferentAWSRegions,createaprivateVIFtoaDirectConnectgateway associatedwithmultipleVGWs,whereeachVGWisattachedtoaVPC.Youcanattachmultipleprivate virtualinterfacestoyourDirectConnectgatewayfromconnectionsatanyDirectConnectlocation.You haveoneBGPpeeringperDirectConnectGatewayperDirectConnectconnection.Thissolutionwillnot workifyouneedVPC-to-VPCconnectivity. 3. YoucanassociateaTransitGatewaytoaDirectConnectgatewayoveradedicatedorhostedDirect Connectconnectionrunningat1Gbpsormore.Todoso,youneedtocreateat ransitVIFtoaDirect ConnectgatewayassociatedwithTransitGateway.Youcanconnectupto3transitgatewaysacross differentAWSRegionsandAWSaccountsoveroneVIFandBGPpeering.Thisisthemostscalableand manageableoptionifyouhavetoconnecttomultipleVPCsinmultiplelocations. 4. IfyouneedaccesstoAWSpublicendpointsorservicesreachablefromapublicIPaddress(suchas publicEC2instances,AmazonS3,andAmazonDynamoDB),c reateaVPNconnectiontoTransit GatewayoverDirectConnectpublicVIF.YoucanconnecttoanypublicAWSserviceandAWSPublicIP inanyAWSRegion.WhenyoucreateaVPNattachmentonaTransitGateway,yougettwopublicIP addressesforVPNterminationattheAWSend.ThesepublicIPsarereachableoverthepublicVIF.You cancreateasmanyVPNconnectionstoasmanyTransitGatewaysasyouwantoverpublicVIF.When youcreateaBGPpeeringoverthepublicVIF,AWSadvertisestheentireAWSpublicIPrangetoyour router. AWSDirectConnectsupportsbothIPv4andIPv6onpublicandprivateVIFs.YouwillbeabletoaddanIPv6 peeringsessiontoanexistingVIFwithIPv4peeringsession(orviceversa).Youcanalsocreate2separate VIFs–oneforIPv4andanotheroneforIPv6. References: https://docs.aws.amazon.com/directconnect/latest/UserGuide/Welcome.html https://tutorialsdojo.com/aws-direct-connect/ https://portal.tutorialsdojo.com/ 1 75 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran HighResiliencyWithAWSDirectConnect AWSDirectConnect,bydefault,isnotaresilientnetwork.Theeventofalinefailureornetworkdisruptioncan meantotaldowntimeforyou.Thereareapproachesonecantaketomakeanon-premisesnetworkconnection toAWSmoreresilient,eitherbypurchasinganotherDirectConnectlineorbymakinguseofthepublicinternet andsecuringtheconnectionwithaVPNforexample.Herewe’lltakealookatthedifferentoptionsincreating aresilientnetworkwithDirectConnect: ● Singleon-premisesdatacenterhavingtwoDirectConnectlines(DevelopmentandTest) Inthistypeofsetup,ifyouonlyhaveasingleon-premisesdatacenterconnectedtoAWS,youmaypurchase twoDirectConnectlinesthatarelinkedtotwodifferentdevicesorrouters.Ifoneoftheconnectionswereto fail,yournetworkconnectionwillautomaticallyfailovertotheavailableDirectConnectline.Youcanalso simulateafailoverinAWStoverifyifthesetupmeetsyourresiliencystandards. https://portal.tutorialsdojo.com/ 1 76 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● Singleon-premisesdatacenterhavingoneDirectConnectlineandaVPNsolutionasasecondary Tosaveoncost,ifadedicatednetworkisnotahardrequirement,youmayutilizeanIPsecVPNconnectionas yourfailoversolutioninstead.Donotethatyouwillexperienceslowernetworkspeedsthoughwiththis approach. ● Twoormoredistincton-premisesdatacenters,eachhavingitsownDirectConnectline(High Resiliency) Thebestwaytomakesomethingresilientandhighlyavailableistomakeitredundant.Ifyouhavemultiple datacentersindifferentlocationsconnectedtoAWS,youcanconfigureaDirectConnectlineforeachofthem andlinkyourdatacenternetworkstogether.Ifadatacenter’sconnectiontoAWSweretogooffline,youcan reroutethenetworktoutilizetheotheractiveDirectConnectlines. https://portal.tutorialsdojo.com/ 1 77 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● Twoormoredistincton-premisesdatacenterswitheachhavingtwoDirectConnectlines(Max Resiliency) Ifyoutruly,trulyneedthathighuptimebecauseyouarerunningverycriticalworkloadsthatcannotaffordany kindofinterruption,thenyoucansetupredundantDirectConnectlinesforeachofyourdatacenters.Thinkof thisasthefirstresiliencysolution,butappliedforeachofthecriticaldatacenters.Thissolutionisverycostly. References: https://aws.amazon.com/directconnect/resiliency-recommendation/ https://docs.aws.amazon.com/directconnect/latest/UserGuide/high_resiliency.html#high-resiliency-select-mo del https://tutorialsdojo.com/aws-direct-connect/ https://portal.tutorialsdojo.com/ 1 78 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSGlobalAccelerator ConnectingMultipleALBsinVariousRegions AWSGlobalAcceleratorprovidesyoutwoglobalstaticcustomerfacingIPaddressesthatyoucanuseasa commonendpointforyourpublicfacingendpoints.ThesestaticIPaddressescanbeBYOIPorcanbetaken fromtheAmazonIPaddresspool.OnehugebenefitofGlobalAcceleratoristheabilitytoconsolidateyour publicendpointsindifferentAWSAvailabilityZonesandRegions,andprovideacommonentrypointwhichare thetwoaforementionedIPaddresses.Furthermore,GlobalAcceleratorisabletosupportupto10different regions.Withthisfeature,youcanaddorremoveorigins,AvailabilityZonesorRegionswithoutaffectingyour applicationavailability.Ifanendpointsuddenlyfailsorbecomesunavailable,GlobalAcceleratorwill automaticallyredirectyournewconnectionstoahealthyendpointwithinseconds. GlobalAcceleratorcanassociateitsIPaddressestoregionalAWSresourcesorendpointssuchasNetwork LoadBalancers,ApplicationLoadBalancers,EC2Instances,andElasticIPaddresses.Youcontrolthe proportionoftrafficsenttoeachendpointbyassigningthemdifferentweights.GlobalAccelerator complementsElasticLoadBalancerswellforloadbalancingandtrafficroutingataglobalscale.ELBhandles loadbalancingwithinoneregion,whileGlobalAcceleratormanagesthetrafficacrossmultipleregions.Once youhavemappedthestaticIPaddressestoyourloadbalancerendpoints,you’llneedtoupdateyourDNS configurationtodirecttraffictothestaticIPaddressesorDNSnameoftheaccelerator. TostartusingGlobalAcceleratorwithELBs,simplydothefollowing: 1. Createastandardaccelerator. 2. Addalistenerwiththeallowedreachableportsorportrange,andtheprotocoltoaccept:TCP,UDP,or both. 3. Addoneormoreendpointgroups,oneforeachregioninwhichyouhavealoadbalancer. 4. AddoneormoreELBendpointstoendpointgroups. References: https://docs.aws.amazon.com/global-accelerator/latest/dg/work-with-standard-accelerators.html https://turon.tutorialsdojo.com/aws-global-accelerator/ https://portal.tutorialsdojo.com/ 1 79 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSIAM Identity-basedPoliciesandResource-basedPolicies Asyoumayalreadyknow,IAMpoliciesareJSONdocumentsthatcontrolwhataprincipalcanandcannotdoin AWS.Youexplicitlystatewhichpermissionsyou’dliketograntanddenytoaprincipal,andiftheyareonly granted/deniedpermissionstospecificresources.Youcanalsoaddconditionstoyourpolicystatements,such asrequiringtheusertobeMFAauthenticatedfirstbeforeallowinganyactions,formoregranularcontrols. BelowisanexampleofanIAMPolicy: { "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Action":[ "ec2:AttachVolume", "ec2:DetachVolume" ], "Resource":[ "arn:aws:ec2:*:*:volume/*", "arn:aws:ec2:*:*:instance/*" ], "Condition":{ "ArnEquals":{"ec2:SourceInstanceARN":"arn:aws:ec2:*:*:instance/instance-id"} } } ] } TherearetwotypesofpoliciesinIAM—I dentity-basedandR esource-based. Identity-basedpoliciesaretheonesyouattachtoIAMUsers,GroupsandRoles.Resource-basedpoliciesare onesthatyouattachtoAWSservicesthatsupportthistypeofpolicy,suchasAmazonS3buckets. Resource-basedpoliciesandresource-levelpermissionsaretwodifferentthings.Resource-basedpolicies includeaP rincipalelementtospecifywhichIAMidentitiescanaccessthatresource.Resource-level permissionsrefertotheabilitytouseARNstospecifyindividualresourcesinapolicy.Hereisanexampleofa resource-basedpolicythatallowsprincipalswiththeE C2RoleToAccessS3roletoretrieveobjectsfromthe sampleS3bucket,aslongastheoriginatingIPisnotwithin10.10.0.0/24. https://portal.tutorialsdojo.com/ 1 80 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran { "Version":"2012-10-17", "Statement":[ { "Effect":"Allow", "Principal":{"AWS":"arn:aws:iam::123456789000:role/EC2RoleToAccessS3"}, "Action":["s3:GetObject","s3:GetObjectVersion"], "Resource":["arn:aws:s3:::EXAMPLE-BUCKET/*"], "Condition":{ "ForAnyValue:StringEquals":{ "NotIpAddress":{"aws:SourceIp":"1 0.10.0.0/24"} } } } ] } Bothidentity-basedpoliciesandresource-basedpoliciesareevaluatedtodetermineifaprincipalwillhave accessornot.Ifbothdonotprovideanexplicitallow,oreitheronehasanexplicitdeny,thentheprincipalis deniedaccess. References: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html https://tutorialsdojo.com/aws-identity-and-access-management-iam/ IAMPermissionsBoundary Whenyouhaveusersworkingondifferentprojectsandindifferentenvironments,itcanbedifficulttokeep trackofwhatpermissionstheyneedtodotheirwork.Sometimes,itwouldbequickertojustlettheusers attachtheIAMpoliciestheyneedtotheirIAMroles.ThiscancausesecurityissuesinyourAWSaccountsince youarenotfollowingtheprincipleofleastprivilege.Youshouldnotprovidethatmuchfreedomofaccessto yourusers,butyoualsodonotwanttohindertheirwork,sowhatshouldyoudo?Youcansetamiddleground bysimplycreatingIAMpermissionsboundaries. “Apermissionsboundaryisanadvancedfeatureforusingamanagedpolicytosetthemaximumpermissions thatanidentity-basedpolicycangranttoanIAMentity.Anentity'spermissionsboundaryallowsittoperform onlytheactionsthatareallowedbybothitsidentity-basedpoliciesanditspermissionsboundaries.”Simplyput, apermissionsboundarykeepsIAMuserpermissionsandIAMrolepermissionsincheckbylimitingwhatthey cando.Aboundarypermissiontakesprecedenceoveranidentitypolicy,soevenifyourusersattach Administratorprivilegestotheiraccounts,theywillnotbeabletoperformanyactionsthatarebeyondwhatis statedintheirpermissionsboundary. https://portal.tutorialsdojo.com/ 1 81 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran References: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_boundaries.html https://tutorialsdojo.com/aws-cheat-sheet-aws-identity-and-access-management-iam/ IAMPolicyStructureandConditions WewillbebreakingdownwhatconstitutesanIAMPolicyandwhatconditionsyoucanaddtoyourpolicies. Thestructureisasfollows: { "Statement":[{ "Effect":"effect", "Action":"action", "Resource":"arn", "Condition":{ "c ondition":{ "k ey":"value" } } } ] } ● ● ● ● Effect—ThevaluecanbeeitherA lloworD eny.Bydefault,IAMusersdon'thavepermissiontodo anything,soallrequestsareimplicitlydenied.A nexplicitallowoverridesthedefault.Anexplicitdeny overridesanyallows. Action—ThespecificAPIaction(s)thatyouaregrantingordenyingpermission. Resource—Theresourcethat'saffectedbytheaction.YouspecifyaresourceusinganAmazon ResourceName(ARN)orusingthewildcard(*)toindicatethatthestatementappliestoallresources. Condition—Conditionsareoptional.Theycanbeusedtocontrolwhenyourpolicyisineffect.Some conditionsthatyoushouldbeawareofare: https://portal.tutorialsdojo.com/ 1 82 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ StringEquals-Exactstringmatchingandcasesensitive StringNotEquals StringLike-Exactmatchingbutignoringcase StringNotLike Bool-LetsyouconstructConditionelementsthatrestrictaccessbasedontrueorfalsevalues. IpAddress-MatchingspecifiedIPaddressorrange. NotIpAddress-AllIPaddressesexceptthespecifiedIPaddressorrange ArnEquals,ArnLike ArnNotEquals,ArnNotLike UseaNullconditionoperatortocheckifaconditionkeyispresentatthetimeofauthorization. YoucanaddIfExiststotheendofanyconditionoperatorname(excepttheNullcondition)—for example,S tringLikeIfExists. References: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-policy-structure.html https://tutorialsdojo.com/aws-cheat-sheet-aws-identity-and-access-management-iam/ IAMPolicyEvaluationLogic WhenaprincipalsendsarequesttoAWS,thefollowingeventsoccurtodetermineifAWSwillacceptordeny yourrequest: 1) AWSfirstauthenticatestheprincipalthatmakestherequest. 2) AWSprocessestheinformationgatheredintherequesttodeterminewhichpoliciesapplytothe request. 3) AWSevaluatesallofthepolicytypes,whichaffecttheorderinwhichthepoliciesareevaluated. 4) AWSthenprocessesthepoliciestodeterminewhethertherequestisallowedordenied. Therecanbemultiplepolicytypesappliedontoasingleaccount.TheyareallevaluatedbyAWSfollowingthe evaluationlogic: 1) Ifonlyidentity-basedpoliciesapplytoarequest,thenAWSchecksallofthosepoliciesforatleastone explicitAllowanddoesnothaveanexplicitDeny. 2) Ifresource-basedpoliciesandidentity-basedpoliciesbothapplytoarequest,thenAWSchecksallthe policiesforatleastoneAllowanddoesnothaveanexplicitDeny. 3) Whenyousetapermissionsboundaryforanentity,theentitycanperformonlytheactionsthatare allowedbybothitsidentity-basedpoliciesanditspermissionsboundaries.Animplicitdenyina permissionsboundarydoesnotlimitthepermissionsgrantedbyaresource-basedpolicy. 4) IfanAWSOrganizationSCPispresent,identity-basedandresource-basedpoliciesgrantpermissionsto principalsinmemberaccountsonlyifthosepoliciesandtheSCPallowtheaction.Ifbotha permissionsboundaryandanSCParepresent,thentheboundary,theSCP,andtheidentity-based policymustallallowtheactionwithnoexplicitdeny. https://portal.tutorialsdojo.com/ 1 83 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Insummary,toknowifaprincipalhaspermissionsforanactionornot,rememberthebehaviorofeachpolicy involved: ● Bydefault,allrequestsareimplicitlydenied.Also,bydefault,theAWSaccountrootuserhasfull access. ● Anexplicitallowinanidentity-basedorresource-basedpolicyoverridesthisdefault. ● Ifapermissionsboundary,OrganizationsSCP,orsessionpolicyispresent,itmightoverridetheallow withanimplicitdeny. ● Anexplicitdenyinanypolicyoverridesanyallows. References: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html https://tutorialsdojo.com/aws-cheat-sheet-aws-identity-and-access-management-iam/ https://portal.tutorialsdojo.com/ 1 84 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSKeyManagementService AWSKMSCustomerMasterKey TheCustomerMasterKeyorCMKisthemostbasicresourceinAWSKMS.ACMKincludesmetadata,suchas thekeyID,creationdate,description,andkeystate.TheCMKalsocontainsthekeymaterialusedtoencrypt anddecryptdata.AWSKMShastwotypesofCMKencryptionkeys: 1) Symmetric-a256-bitkeythatisusedforencryptionanddecryption. 2) Asymmetric-anRSAkeypairthatisusedforencryptionanddecryptionorsigningandverification(but notboth),oranellipticcurve(ECC)keypairthatisusedforsigningandverification. SymmetricCMKsandtheprivatekeysofasymmetricCMKsneverleaveAWSKMSunencrypted. Furthermore,therearethreevariationsofCMKsinKMS: 1) Customermanaged-TheseCMKsarewhatyouhavefullcontrolover.Youhandleestablishingand maintainingtheirkeypolicies,IAMpolicies,andgrants,enablinganddisablingthem,rotatingkey material,addingtags,creatingaliasesthatrefertotheCMK,andschedulingtheCMKsfordeletion. 2) AWS-managed-TheseareCMKsinyouraccountthatarecreated,managed,andusedonyourbehalf byanAWSservicethatisintegratedwithKMS.YoucannotmanagetheseCMKs,rotatethem,orchange theirkeypolicies.YoualsocannotusetheseCMKsincryptographicoperationsdirectly;theservicethat createsthemusesthemonyourbehalf. 3) AWS-owned-TheseareCMKsthatanAWSservicecreates,owns,andmanagesforuseinmultiple AWSaccounts.Youcannotview,use,track,oraudittheseCMKs. Bydefault,KMScreatesthekeymaterialforallCMKs.Youcannotextract,export,view,ormanagethiskey material.Also,youcannotdeletethekeymaterialalone;youmustdeletethewholeCMK.However,youcan importyourownkeymaterialintoa(customer-managed)CMKorcreatethekeymaterialfora (customer-managed)CMKintheAWSCloudHSMcustomkeystore.AnytypeofCMKcanbeusedfor encryptionanddecryption.Datakeys(symmetricdatakeys)anddatakeypairs(asymmetricdatakeys)can alsobeusedforencryptionanddecryption.OnlyasymmetricCMKsanddatakeypairscanbeusedforsigning andverification. References: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys https://tutorialsdojo.com/aws-key-management-service-aws-kms/ https://portal.tutorialsdojo.com/ 1 85 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran CustomKeyStore AcustomkeystoreforAWSKMSisahardwaresecuritymodule(HSM)inaAWSCloudHSMclusterthatyou ownandmanage.YoucancreateyourCMKsinacustomkeystore,andKMSgeneratesa256-bitAES symmetrickeymaterialintheassociatedCloudHSMclusterthatyoucanviewandmanage.Thiskeymaterial neverleavesyourHSMclusterunencrypted.YoualsohavefullcontrolovertheCloudHSMcluster,suchas creatinganddeletingHSMsandmanagingbackups.WhenyouuseaCMKstoredinacustomkeystore, encryptionanddecryptionhappensinthehardwaremoduleintheclusterusingthiskeymaterial. Youshouldconsiderusingacustomkeystoreifyouhaveanyofthefollowingrequirements: 1. Keymaterialcannotbestoredinasharedenvironment. 2. Keymaterialmustbesubjecttoasecondary,independentauditpath.Byindependent,meaningAWS CloudHSMlogsallAPIactivity,localactivity,user,andkeymanagementactivity. 3. YouneedtheabilitytoimmediatelyremovekeymaterialfromAWSKMS. 4. TheHSMsthatgenerateandstorekeymaterialmustbecertifiedatFIPS140-2Level3. CustomkeystoresdonotsupportcreationofasymmetricCMKs,asymmetricdatakeypairs,orCMKswith importedkeymaterial,andyoucannotenableautomatickeyrotationonaCMKinacustomkeystore.Key rotationmustbeperformedmanuallybycreatingnewkeysandre-mappingAWSKMSkeyaliases.Each CloudHSMclustercanbeassociatedwithonlyonecustomkeystore,andaclustermustcontainatleasttwo activeHSMsindifferentAvailabilityZones.Youcanconnectanddisconnectyourcustomkeystorefroma CloudHSMclusteratanytime.Whenconnected,youcancreateanduseitsCMKs.Whenitisdisconnected, youcanviewandmanagethecustomkeystoreanditsCMKs,butnotcreatenewCMKsorusetheCMKsinthe customkeystoreforcryptographicoperations. References: https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html https://tutorialsdojo.com/aws-key-management-service-aws-kms/ AWSKMSCMKKeyRotation Itisasecuritybestpracticetorotateencryptionkeysandpasswordsregularly,especiallyifthesekeysareused toprotectverysensitivedata.Keyrotationlowerstheriskofgettingyourkeyexposedandmisused.AWSKMS isaservicethatletsyoucreateandmanagecustomermasterkeys.Acustomermasterkeyistheprimary resourceinKMS.Itisalogicalrepresentationofamasterkey. TheCMKincludesmetadata,suchasthekeyID,creationdate,description,andkeystate,anditalsocontains thekeymaterialusedforencryptinganddecryptingdata.Whenrotatingyour(customer-managed)CMKsin AWSKMS,youcancreatenewCMKsandthenmodifyyourapplicationstousethenewCMK.Youcanalso enableautomatickeyrotationandletAWSKMSgeneratenewcryptographicmaterialforyourCMKseveryyear. https://portal.tutorialsdojo.com/ 1 86 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran KMSalsosavestheoldercryptographicmaterialsoitcanbeusedtodecryptdatathatithasencrypted.KMS doesnotdeleteanyrotatedkeymaterialuntilyoudeletetheCMK.Therearelimitationstoautomatickey rotation–asymmetricCMKs,CMKsincustomkeystores,andCMKswithimportedkeymaterialcannotbe automaticallyrotated. Automatickeyrotationprovidesthefollowingadvantages: 1. ThepropertiesoftheCMK,includingitskeyID,keyARN,region,policies,andpermissions,donot changewhenthekeyisrotated. 2. YoudonotneedtochangeapplicationsoraliasesthatrefertotheCMKIDorARN. 3. AWSKMSrotatestheCMKautomaticallyeveryyear.Youdon'tneedtorememberorschedulethe update. However,automatickeyrotationhasnoeffectonthedatathattheCMKprotects.Itdoesnotrotatethedata keysthattheCMKgeneratedorre-encryptanydataprotectedbytheCMK,anditwillnotmitigatetheeffectof acompromiseddatakey.Ifyoupreferhavingcontroloveryourrotationscheduleandfrequency,youshouldopt formanualkeyrotationsinstead. https://portal.tutorialsdojo.com/ 1 87 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Howautomatickeyrotationworks: References: https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html https://tutorialsdojo.com/aws-key-management-service-aws-kms/ https://portal.tutorialsdojo.com/ 1 88 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSWebApplicationFirewall AWSWAFRuleStatementsToFilterWebTraffic AWSWAFiscapableofprotectingyourpublicendpointsinCloudFront,ElasticLoadBalancers,andAPI GatewayAPIsfromamultitudeofwebsecuritythreats.RulestatementstellAWSWAFhowtofilteroutaweb request.AWSWAFappliesthecorrespondingaction—allow,blockorcount—toawebrequestthatmatchesa rule.Rulestatementscanbeverysimple(justonecriteriatomatch)orcomplex(multiplestatements combinedusingAND,OR,andNOToperators).Youcanusethefollowingmatchstatementstocreateasimple orcomplexrulestatement: MatchStatement UseCase Geographicmatch Allowsyoutoalloworblockwebrequestsbasedoncountryoforiginbycreating oneormoregeographical,orgeo,matchstatements. IfyouusetheCloudFrontgeorestrictionfeaturetoblockacountry,requestsfrom thatcountryareblockedandarenotforwardedtoWAF. IPsetmatch InspectstheIPaddressofarequestagainstasetofIPaddressesandaddress rangesthatyouwanttoallowthroughorblockwithyourWAF. Labelmatchrulestatement Inspectstherequestforlabelsthathavebeenaddedbyotherrulesinthesame webACL. Regexpatternset Letsyoucompareregexpatternsagainstaspecifiedcomponentofawebrequest. Sizeconstraint Comparesthesizeofarequestcomponentagainstasizeconstraintinbytes. SQLiattack InspectsformaliciousSQLcodeinawebrequest. Stringmatch Searchesforamatchingstringinawebrequestcomponent.Ifamatchingstring isfound,WAFallows/blockstherequest. XSSscriptingattack Inspectsforcross-sitescriptingattacksinawebrequest. Rate-based TrackstherateofrequestsofeachoriginatingIPaddresses,andtriggersarule actiononIPswithratesthatgooveralimit.Youcanusethistypeofruletoputa temporaryblockonrequestsfromanIPaddressthat'ssendingexcessive requests. References: https://docs.aws.amazon.com/waf/latest/developerguide/waf-rules.html https://tutorialsdojo.com/aws-waf/ https://portal.tutorialsdojo.com/ 1 89 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonCloudwatch MonitoringAdditionalMetricswiththeCloudwatchAgent WeknowthatAmazonCloudwatchisyourdefaultserviceformonitoringdifferentperformance,network,and statisticsrelatedmetricsofyourAWSservices.AlthoughCloudwatchMetricsisabletocollectdifferenttypes ofdatafromyourresources,itdoesnotcaptureeverything.Therearesomesystem-levelmetricsandlogsthat weshouldalsobemonitoringbutcannotbedirectlymonitoredbyCloudwatch.Forsuchcases,youneedto installaCloudwatchagentintoyourservers(on-prem,EC2instances,containers,etc)tobeabletoretrieve thesesystem-levelmetricsandlogs,andhavethemmonitoredbyCloudwatchmetrics.Furthermore,youcan configureCloudwatchagenttousetheStatsDandcollectdprotocolstocollectcustomapplicationandservice metrics.StatsDissupportedonbothLinuxserversandserversrunningWindowsServer.Collectdissupported onlyonLinuxservers. Onceyou’veinstalledtheagentinyourserver,youspecifytheconfigurationsettingsoftheagentthatwill definewhatmetricsandlogstocollectandsendtoCloudwatch.Thedefaultnamespaceformetricscollected bytheCloudWatchagentisCWAgent,whichmeansthatthecustommetricswillbestoredunderthisfolder. Youcanspecifyadifferentnamespaceinyourconfigurationfile. WhenconfiguringtheCloudwatchagentinyourserverforthefirsttime,youcansimplifytheconfiguration processbyrunningtheconfigurationwizard,whichprovidesyouwithsomepredefinedmetricsetsthatyoucan startoffwith.Intheexam,ifyouhaveascenariowhereinyouneedtomonitoranyofthefollowingmetricsin yourservers,besuretochoosetheoptionthatusesCloudwatchagent: WindowsServerMetrics LinuxMetrics Paging:PagingFile%Usage Swap:swap_used_percent LogicalDisk:LogicalDisk%FreeSpace Disk:disk_used_percent,disk_inodes_free PhysicalDisk:PhysicalDisk%DiskTime,PhysicalDisk Diskio:diskio_io_time,diskio_write_bytes, DiskWriteBytes/sec,PhysicalDiskDiskRead diskio_read_bytes,diskio_writes,diskio_reads Bytes/sec,PhysicalDiskDiskWrites/sec, PhysicalDiskDiskReads/sec Memory:Memory%CommittedBytesInUse Memory:mem_used_percent NetworkInterface:NetworkInterfaceBytesSent/sec, Network:net_bytes_sent,net_bytes_recv, NetworkInterfaceBytesReceived/sec,Network net_packets_sent,net_packets_recv InterfacePacketsSent/sec,NetworkInterface PacketsReceived/sec TCP:TCPv4ConnectionsEstablished,TCPv6 Netstat:netstat_tcp_established, https://portal.tutorialsdojo.com/ 1 90 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ConnectionsEstablished netstat_tcp_time_wait Processor:Processor%ProcessorTime,Processor CPU:cpu_usage_guest,cpu_usage_idle, %IdleTime,Processor%InterruptTime,Processor% cpu_usage_iowait,cpu_usage_steal,cpu_usage_user, UserTime cpu_usage_system References: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html https://tutorialsdojo.com/amazon-cloudwatch/ CloudwatchAlarmsforTriggeringActions CloudwatchAlarmsisauseful,reactiveautomationtoolformonitoringyourAWSresourcesandmakingsure appropriateactionsaremadeinresponsetocertainsituations.Ametricalarmhasthreestates: ● OK–Themetricorexpressioniswithinthedefinedthreshold. ● ALARM–Themetricorexpressionisoutsideofthedefinedthreshold. ● INSUFFICIENT_DATA–Thealarmhasjuststarted,themetricisnotavailable,ornotenoughdatais availableforthemetrictodeterminethealarmstate. EachmetricalarmconsistsofdatapointsthatinformCloudwatchofthestateofthemetricthatisbeing monitored.AdatapointreportedtoCloudWatchcanfallunderoneofthreecategories: ● Notbreaching(withinthethreshold) ● Breaching(violatingthethreshold) ● Missing Ifthenumberofdatapointsthatareinacertaincategorymeetsyouralarmthresholdandchangesthestateof thealarm,youcandefineactionsthatCloudwatchwillperformforyouinresponsetoit.Examplesofactions include: 1. NotifyingauseroragroupofusersaboutthealarmbysendingamessagethroughAmazonSNS. 2. Stop,terminate,reboot,orrecoveranEC2instance. 3. Scaleanautoscalinggroup. 4. CreateOpsItemsinSystemsManagerOpsCentertoremediatetheissuethattriggeredthealarm. References: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html https://tutorialsdojo.com/amazon-cloudwatch/ https://portal.tutorialsdojo.com/ 1 91 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran CloudwatchEvents( AmazonEventBridge)forSpecificEventsandRecurringTasks AnotherusefulautomationtoolinAWSisAmazonCloudwatchEvents(AmazonEventBridge).Cloudwatch Events(AmazonEventBridge)letsyouperformspecificactionsinresponsetoaneventortoapredefined schedule(cron).TherearethreewaystotriggeraCloudwatchEvent(EventBridgeEvent): 1. TriggersonamatchingeventpatternemittedbyanAWSservice. 2. AWSAPICallviaCloudTrail. 3. Triggersonaregularscheduleorregularrate(cronorrateexpressions). YoucansetupyourAWSaccounttosendeventstootherAWSaccounts,ortoreceiveeventsfromother accounts.ThesenderaccountandreceiveraccountmustbeusingthesameAWSRegioninthiscase,since Cloudwatchisaregionalservice.Youmustalsoprovidetherequiredpermissionstoallowsendingofevents. What’simportanttoknowisthesupportedtargetsofAmazonCloudwatchEvents(AmazonEventBridge)for processingevents: 1. AmazonEC2instances 2. AWSLambdafunctions 3. StreamsinAmazonKinesisDataStreams 4. DeliverystreamsinAmazonKinesisDataFirehose 5. LoggroupsinAmazonCloudWatchLogs 6. AmazonECStasks 7. SystemsManagerRunCommand,Automation,OpsItemandRunCommand 8. AWSBatchjobs 9. StepFunctionsstatemachines 10. PipelinesinCodePipeline 11. CodeBuildprojects 12. AmazonInspectorassessmenttemplates 13. AmazonSNStopics 14. AmazonSQSqueues 15. EC2CreateSnapshot,RebootInstances,StopInstancesandTerminateInstancesAPIcalls. 16. ThedefaulteventbusofanotherAWSaccount Andagain,aneventrule'stargetmustbeinthesameregionastherule. References: https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html https://tutorialsdojo.com/amazon-cloudwatch/ https://portal.tutorialsdojo.com/ 1 92 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSCloudTrail What’sNotMonitoredByDefaultinCloudTrailandHowToStartMonitoringThem TherearethreetypesofeventsthatyoucanloginAWSCloudTrail: 1. Managementeventswhichprovidevisibilityintomanagementoperationsthatareperformedon resourcesinyourAWSaccount. 2. Dataeventswhichprovidevisibilityintotheresourceoperationsperformedonorwithinaresource. 3. InsightseventswhichareloggedwhenCloudTraildetectsunusualwritemanagementAPIactivityin youraccount. Bydefault,AWSCloudTrailtrailslogallmanagementeventsbutdon'tincludedataorinsightsevents. Dataeventsareoftenhigh-volumeactivities,whichiswhytheyarenotautomaticallylogged.Eventsthat belongunderthedataeventsinclude: ● AmazonS3GetObject,DeleteObject,andPutObjectAPIoperations ● AWSLambdafunctionInvokeAPI ● AmazonDynamoDBPutItem,DeleteItem,andUpdateItemAPIoperations. TostartrecordingCloudTraildataevents,youmustexplicitlyaddtheresourcesorresourcetypesyouwantto collectactivitytoatrail.Forsingle-regiontrails,youcanlogdataeventsonlyforresourcesthatyoucanaccess inthatregion.ThoughS3bucketsareglobal,LambdafunctionsandDynamoDBtablesareregional.Notethat youwillincuradditionalchargesforenablingdataeventlogging. https://portal.tutorialsdojo.com/ 1 93 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 1 94 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran CloudTrailInsightsisafeaturethatwillloganyunusualwriteAPIactivityinyouraccountwhichisthen deliveredtothedestinationS3bucketforyourtrail.ItusesmachinelearningtocapturewritemanagementAPI usagethatdifferssignificantlyfromyouraccount'stypicalusagepatterns.Andsimilartodataeventlogging, additionalchargesapplyforloggingInsightsevents. References: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-working-with-log-files.html https://aws.amazon.com/premiumsupport/knowledge-center/cloudtrail-data-management-events/ https://tutorialsdojo.com/aws-cloudtrail/ ReceivingCloudTrailLogsfromMultipleAccountsandSharingLogsToOtherAccounts ThereareoccasionswhereoneneedstomonitortheCloudTrailofmultipleAWSaccounts,whetherindividually orasmembersofanAWSOrganization.Consolidatingthetrailsofeachaccountintoonewillgiveyoua centralizedsecurityviewpointoverthedifferentaccounts,andletsyoustorethetraillogsinasingle,secure location.TostartreceivingCloudTraillogfilesfrommultipleaccounts,simplycreateanS3bucketwith cross-accountwritepermissionsforthetargetaccountsinyourmasteraccount,andconfiguretheCloudTrail ofthetargetaccountstopublishtheirlogstotheS3bucketyoucreated.Afterthis,tomakesurethataudit loggingdoesnotgetinterrupted,youcancreateapolicyinAWSConfigthatnotifiesyouifanytamperingwas madetotheCloudTrailconfigurationinthetargetaccounts. TherearealsosituationswhenyouneedtoshareyourCloudTraillogstoanotherAWSaccount,perhapsfor auditingandinvestigationpurposes.TosharelogfilesbetweenmultipleAWSaccounts,youmustperformthe followingsteps: 1. CreateanIAMroleforeachaccountthatyouwanttosharelogfileswith. 2. ForeachoftheIAMroles,createanaccesspolicythatgrantsread-onlyaccesstotheaccountyouwant tosharethelogfileswith.Formultipleaccountsharing,youcanfurtherrestrictthepolicytoeach accountbygrantingread-onlyaccesstothelogsthatweregeneratedbyit. 3. HaveanIAMuserineachaccountassumetheappropriateIAMroleandretrievethelogfiles.Make surethattheIAMusersineachaccounthavethepermissiontoassumetheirrespectiveroles. OnceanaccountdoesnotneedtocontinuehavingaccesstotheCloudTraillogsanymore,youcandisableits accesssimplybydeletingtheIAMroleyou’vecreatedforitinthemasteraccount. References: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts. html https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-sharing-logs.html https://tutorialsdojo.com/aws-cloudtrail/ https://portal.tutorialsdojo.com/ 1 95 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonSimpleNotificationService AmazonSNSMessageFiltering Bydefault,anAmazonSNStopicsubscriberreceiveseverymessagepublishedtothetopic.Therearecases whenasubscribershouldnotbereceivingeverymessagepublishedtoatopic,orshouldonlybereceivinga subsetofthemessagesrelevanttothesubscriber.Toachievethis,asubscribermustassignafilterpolicyto thetopicsubscription. Afi lterpolicyisaJSONobjectthatdefinestheattributestolookforinamessagebeforeitissenttoa subscriber.Whenyoupublishamessagetoatopic,SNSfirstcomparesthemessageattributestothe attributesinthefilterpolicyforeachofthetopic'ssubscriptions.Ifamatchisfound,themessageissentto thematchingsubscription’ssubscriber.Iftherearenofilterpoliciesinatopic,thenallmessagesaresentto subscribers. SincefilterpoliciesarewritteninJSON,theattributesareinaname:valueformat.Asubscriptionacceptsa messageunderthefollowingconditions: ● Eachattributenameinafilterpolicymatchesanattributenameinthemessage. ● Foreachmatchingattributename,atleastonematchexistsbetweenthevaluesoftheattributename inthefilterpolicyandthemessageattributes. ThewaySNSevaluatesamessageagainstafilterpolicyforamatchisthatallpolicyattributesmustmatch themessage’sattributes,butthemessage’sattributesdonotneedtocontainjustthepolicy’sattributes. Messageattributesthataren'tspecifiedinthepolicyarejustignoredbySNS. HereisanexampleofanSNSsubscriptionfilterpolicy: { "company":["tutorialsdojo"], "platform":[{"anything-but":"InternetExplorer"}], "exams":[ "SAA", "SOA", "CDA" ], "fordiscount":[{"numeric":[">=",5.99]}], "sale":[{"exists":true}] } https://portal.tutorialsdojo.com/ 1 96 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran IfweweretoreceiveanSNSmessagethatdoesnothavealltheattributesinthefilterpolicyabove,orifthere isatleastonematchingattributewithanon-matchingvalue,thenthemessageisrejected.Afilterpolicycan haveamaximumof5attributenames. Inafilterpolicy,youcanusethefollowingconditionalstocreatemorespecificrules: 1. Exactmatching—matchesifapolicyattributevalueincludesoneormoremessageattributevalues. 2. Anything-butmatching—matchesifamessageattributedoesn'tincludeanyofthepolicyattribute values. 3. Prefixmatching—matchesanymessageattributevaluethatbeginswiththespecifiedcharacters. 4. Valuerangematching—letsyouuse<,<=,>,and>=and=operators.Matchesanymessageattribute thatsatisfiesthepolicyattribute’soperation. 5. Attributekeymatching—usestheexistsoperatortocheckwhetheramessagehasanattributewhose keyislistedinthefilterpolicy. 6. AND/ORlogic—YoucanapplyANDlogicusingmultipleattributenames.YoucanapplyORlogicby assigningmultiplevaluestoanattributename. References: https://docs.aws.amazon.com/sns/latest/dg/sns-message-filtering.html https://tutorialsdojo.com/amazon-sns/ AmazonSNSTopicTypes,MessageOrderingandDeduplication AmazonSNShastwotypesoftopicsthatfulfilldifferentrequirements.Wecomparethetwotypesbelow: AmazonSNSTopicType StandardTopic FIFOTopic Throughput Cansupportnearlyunlimited numberofmessagespersecond Ordering Besteffort;Doesnotguarantee Guaranteestheorderingofthe thatthemessagesarefannedout messages.Firstinfirstout. theordertheycomein MessageDeduplication(doesnot Besteffort;Amessageis sendduplicate) deliveredatleastonce,but occasionallymorethanonecopy ofamessageisdelivered. Deliveryendpoints Cansupportupto300messages persecondor10MBpersecond perFIFOtopic Duplicatemessagesaren't delivered.Deduplicationhappens withina5-minuteinterval,fromthe messagepublishtime. MessagescanbesenttoAmazon MessagescanonlybesenttoSQS SQS,toAWSLambda,toAmazon FIFOqueues ubscriptions. https://portal.tutorialsdojo.com/ 1 97 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran KinesisDataFirehose,through HTTP/Swebhooks,throughSMS, throughmobilepushnotifications, andthroughemail. Supportforencryption Messagessenttoencryptedtopicsareimmediatelyencryptedusinga 256-bitAES-GCMalgorithmandanAWSKMSCMK.Decryptionoccurs atthedeliveryendpoint. FanoutLimitations Eachaccountcanhaveupto Eachaccountcanhaveupto1000 100,000Standardtopicsandeach FIFOtopicsandeachtopic topicsupportsupto12.5M supportsupt o100subscriptions. subscriptions. Receivemultiplemessagesin parallel Yes Yes,thoughtoavoidanyconflicts intheordering,youneedto consideraddinganothermethod toavoidmessagesarrivingatthe sametime. WhenyoupublishmessagestoanSNSFIFOtopic,yousetthemessagegroupID.ThegroupIDisamandatory tokenthatspecifiesthatamessagebelongstoaspecificmessagegroup.TheSNSFIFOtopicpassesthe groupIDtothesubscribedSQSFIFOqueues.IntheeventthatSNSFIFOlosesaccesstotheSQSFIFOqueue (bysomepolicyerrorforexample),allmessagesarekeptinSNSuntiltheaccessisrepairedandmessages canbeforwardedagain. Youcanavoiddeliveringduplicatedmessagesbyenablingcontent-baseddeduplicationorbyaddinga deduplicationIDtothemessagesbeingpublished.EachmessagepublishedtoaFIFOtopichasitsown sequencenumber.ThesequencenumberispassedtothesubscribedSQSFIFOqueuesaspartofthe messagebody. References: https://aws.amazon.com/sns/features/ https://tutorialsdojo.com/amazon-sns/ InvokeLambdaFunctionsUsingSNSSubscription TherearemanywaystoinvokeaLambdafunctioninandoutofAWS;itcanbeinvokeddirectlywiththe Lambdaconsole,theLambdaAPI,theAWSSDK,theAWSCLI,andAWStoolkits.Youcanalsoconfigureother AWSservicestoinvokeyourfunction,oryoucanconfigureLambdatoreadfromastreamorqueueandinvoke https://portal.tutorialsdojo.com/ 1 98 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran yourfunction.Inthissection,we’lltakealookathowyoucanuseAmazonSNStoinvokeLambdafunctions throughsubscriptionsorinresponsetocertainmessages. AmazonSNSsupportsLambdafunctionsasatargetformessagessenttoatopic.Youcansubscribeyour functiontotopicsinyouraccountorinanotherAWSaccount.Youcanalsochoosetargetfunctionsinyour accountorinanotherAWSaccount.Forcrossaccountsubscriptions,youneedtoensurethattheAWSaccount withthetargetLambdafunctionauthorizesyourSNStopictoinvoketheirLambdafunction.Additionally,you mustcreatepermissionstothetargetLambdafunctiontosubscribetoyourSNStopic. TosubscribeafunctiontoatopicviatheSNSconsole: 1) GotoyourSNSconsole. 2) OntheT opicspage,chooseatopic. 3) IntheS ubscriptionssection,chooseC reatesubscription. 4) OntheC reatesubscriptionpage,intheD etailssection,dothefollowing: a) VerifythechosenTopicARN b) Protocol:A WSLambda c) Endpoint:EntertheARNofaLambdafunction. 5) ChooseC reatesubscription. YoucanalsoconfigureanSNStriggerinyourLambdafunction: 1) GototheLambdaconsoleandlookforyourfunction. 2) UnderF unctionOverview,dothefollowing a) ClickA ddtrigger. b) ChooseS NS. c) ChoosetheS NSTopicthatwilltriggeryourLambdafunction. d) ClickA dd. 3) Saveandverifyyourchanges. https://portal.tutorialsdojo.com/ 1 99 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran WhenamessageispublishedtotheSNStopic,SNSinvokesthetargetfunctiona synchronouslywithanevent thatcontainsthemessageandsomemetadata.TheLambdafunctionreceivesthemessagepayloadasan input(event)parameterinJSONformat,whichyoucanmanipulateandusehoweveryoulike. References: https://docs.aws.amazon.com/lambda/latest/dg/with-sns.html https://docs.aws.amazon.com/sns/latest/dg/sns-lambda-as-subscriber.html https://tutorialsdojo.com/amazon-sns/ https://portal.tutorialsdojo.com/ 2 00 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonSimpleQueueService(AmazonSQS) TheDifferentSQSQueues AmazonSQSisamessagequeueingservicethatusesa“polling”method,unlikeAmazonSNSwhere messagesare“pushed”todevicesandtargets.AmazonSQSishighlyscalableanddurable,andyoudon’tneed tosetupanymessagebrokers.Inthissection,we’llquicklytakealookatthedifferentqueuesthatare availableinAmazonSQSandtheusecasesofeachone. Standardqueueisyourdefault,generalpurposeSQSqueue.Thistypeofqueuecansupportanearlyunlimited numberofAPIcallspersecond,perAPIactionwhicharethefollowing:SendMessage,ReceiveMessage,or DeleteMessage.Standardqueuesmakesuretodeliveryourmessagesatleastonce,butbecauseofitshigh throughput,thereisachancethatmorethanonecopyofamessagemightbedelivered.Yourapplications shouldbeidempotenttoavoidanyproblemsinconsumingacopyofapreviouslyconsumedmessage.Also, standardqueuesdonotensurethatyourmessagesarequeuedinthesamesequencetheyarrivein,so maintainingtheorderingisabesteffort.Youcanthinkofstandardqueuesasthecounterpartofstandard topicsinAmazonSNS. Someusecasesofastandardqueueinclude: ● Decoupleliveuserrequestsfromintensivebackgroundwork ● Allocatetaskstomultipleworkernodes ● Batchmessagesforfutureprocessing FIFO(first-infirst-out)queueisatypeofSQSqueuethatisdesignedforpreservingtheorderofmessagesas theyarrive,andthateverymessageisdeliveredexactlyonce,butattheexpenseofsomethroughputspeed. FIFOqueuesarebestusedformessagingwhentheorderofmessagesiscritical,orwhereduplicatescan'tbe tolerated.UnlikestandardqueueswhereitcansupportanearlyunlimitednumberofAPIcallspersecond,FIFO queuescanonlysupportupto300APIcallspersecond,perAPImethod.Ifyouusebatching,whichis grouping10messagesintooneAPIcall,thenFIFOqueuescansupportupto3,000transactionspersecond, perbatchAPImethod(SendMessageBatch,ReceiveMessage,orDeleteMessageBatch).SimilartoSNSFIFO, SQSFIFOqueuesuseamessagededuplicationIDtoidentifysentmessages.Thereisalsotherequired messagegroupIDwhichisatagthatindicatesifamessagebelongstoaspecificmessagegroup. Youcan'tconvertanexistingstandardqueueintoaFIFOqueue.YoumusteithercreateanewFIFOqueuefor yourapplicationordeleteyourexistingstandardqueueandrecreateitasaFIFOqueue. SomeusecasesofaFIFOqueueinclude: ● Tomakesurethatuser-enteredcommandsarerunintherightorder. ● Todisplaythecorrectproductpricebysendingpricemodificationsintherightorder. ● Topreventastudentfromenrollinginacoursebeforeregisteringforanaccount. https://portal.tutorialsdojo.com/ 2 01 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Messagesthatcan’tbeprocessedsuccessfullyinstandardandFIFOqueuesaresenttoadeadletterqueue. Deadletterqueuesletyoudebugyourapplicationormessagingsystemtodeterminewhysomemessages weren'tprocessedsuccessfully.ThemaxReceiveCountisaparameterthatyouspecifyinyourqueueto managethenumberoftimesamessagecanfailprocessing.WhentheReceiveCountforamessageexceeds thismaxvalue,SQSmovesthemessagetoadead-letterqueuewithitsoriginalmessageID.Deadletter queuesmustbethesametypeastheirsourcequeues.YoucannotuseastandarddeadletterqueueforaFIFO sourcequeueforexample. Adeadletterqueueletsyouachievethefollowing: ● Configureanalarmforanymessagesdeliveredtoadead-letterqueue. ● Examinelogsforexceptionsthatmighthavecausedmessagestobedeliveredtoadead-letterqueue. ● Analyzethecontentsofmessagesdeliveredtoadead-letterqueuetodiagnosesoftwareorthe producer’sorconsumer’shardwareissues. ● Determinewhetheryouhavegivenyourconsumersufficienttimetoprocessmessages. Delayqueuesletyoupostponethedeliveryofnewmessagestoaqueueforashortduration.Ifyoucreatea delayqueue,anymessagesthatyousendtothequeueremaininvisibletoconsumersforthedurationofthe delayperiod.Thedefaultandminimumdelayforaqueueis0seconds.Themaximumis15minutes.Delay queuesworksimilarlytovisibilitytimeoutsinthattheymakemessagesinvisiblefromconsumersforaspecific periodoftime.Themaindifferencebetweenthetwoisthat,fordelayqueue,amessageishiddenwhenitis firstaddedintothequeue,whereasforvisibilitytimeout,amessageishiddenonlyafteritisconsumedfrom thequeue. Differentqueuetypeshavedifferentdelaybehaviors.Forstandardqueues,changingtheper-queuedelay settingdoesn'taffectthedelayofmessagesalreadyinthequeue.ForFIFOqueues,changingtheper-queue delaysettingaffectsthedelayofmessagesalreadyinthequeue.Youcansetthedelayonindividual messages,ratherthanonanentirequeue,usingmessagetimers. References: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-how-it-works.html https://tutorialsdojo.com/amazon-sqs/ SQSLongPollingandShortPolling YourSQSpollingmethoddeterminesthewaySQSsearchesandreturnsyourmessagestoyou.Therearetwo pollingmethodstochoosefrom:longpollingands hortpolling.Eachpollingmethodhasitsownadvantages anddisadvantageswhichwe’lltakealookatbelow. https://portal.tutorialsdojo.com/ 2 02 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Shortpollingisineffectwhenyourwaittimeis0.Withshortpolling,theReceiveMessagerequestsearches onlyasubsetoftheSQSserverstofindmessagestoincludeintheresponse.SQSsendstheresponseright away,evenifthequeryfindsnomessages.Andsinceonlyasubsetofserversaresearched,arequestmight notreturnallofyourapplicablemessages.Shortpollingisbestfortime-sensitiveapplicationsorbatch applicationsthatcansendanotherqueryifitreceivedanemptyresponsepreviously. Longpollingisineffectwhenyourwaittimeisgreaterthan0.Withlongpolling,theReceiveMessagerequest searchesalloftheSQSserversformessages.SQSreturnsaresponseafteritcollectsatleastoneavailable message,uptothemaximumnumberofmessagesspecifiedintherequest,andwillonlyreturnanempty responseifthepollingwaittimeexpires.Themaximumlongpollingwaittimeis20seconds.Longpolling helpsreducethecostofusingSQSbyeliminatingthenumberofemptyresponsesandfalseemptyresponses. References: https://portal.tutorialsdojo.com/ 2 03 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-pollin g.html https://tutorialsdojo.com/amazon-sqs/ ScalingOutEC2InstancesBasedOnSQS AmazonSQSisabletosupportahighnumberofAPIcallsforsendingandreceivingmessagesinaqueue.You canhaveyourapplicationsruninanautoscalinggroupofEC2instancestosendandconsumemessages fromanSQSqueueinparalleltomaximizeworkefficiency.Although,estimatingthenumberofEC2instances you’llneedcanbequitedifficultifyoudonotuseapropermetricforyourautoscalinggroup.You’dbeableto avoidthispredicamentifyouhadvisibilityonthenumberofmessagesinyourSQSqueuethatneedstobe processed. ThereisanSQSmetricinCloudWatchcalledApproximateNumberOfMessagesVisiblethattracksthenumber ofmessagesinaqueue.However,thismetricmightnotbethemostsuitableforyourtargettrackingpolicy sincethereareotherfactorsbesidesthenumberofmessagesinaqueuethatshoulddeterminethenumberof autoscalinginstancesthatyoushouldhave.Youalsohavetoconsidertherateofmessagesprocessedbyan autoscalinginstanceperunitoftimeandthelatencybetweendifferentcomponentsofyoursystem. Insteadoftrackingthenumberofbacklogmessagesinaqueuemetric,itwouldbebettertousea backlogper instancemetricwiththetargetvaluebeingtheacceptablebacklogperinstancetomaintain.Tocalculateyour backlogperinstance,gettheA pproximateNumberOfMessagesVisiblequeueattributetodeterminethelength oftheSQSqueue,anddividethatnumberbythenumberofautoscalinginstancesintheInServicestate.To calculatetheacceptablebacklogperinstance,firstdeterminehowmuchyourapplicationcanacceptinterms oflatency.Then,taketheacceptablelatencyvalueanddivideitbytheaveragetimethatanEC2instancetakes toprocessamessage. References: https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-using-sqs-queue.html https://tutorialsdojo.com/amazon-sqs/ https://portal.tutorialsdojo.com/ 2 04 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonKinesis KinesisScaling,ReshardingandParallelProcessing ● ● ● ● ● ● ● KinesisReshardingenablesyoutoincreaseordecreasethenumberofshardsinastreaminorderto adapttochangesintherateofdataflowingthroughthestream. Reshardingisalwayspairwise.Youcannotsplitintomorethantwoshardsinasingleoperation,and youcannotmergemorethantwoshardsinasingleoperation. TheKinesisClientLibrary(KCL)trackstheshardsinthestreamusinganAmazonDynamoDBtable,and adaptstochangesinthenumberofshardsthatresultfromresharding.Whennewshardsarecreated asaresultofresharding,theKCLdiscoversthenewshardsandpopulatesnewrowsinthetable. Theworkersautomaticallydiscoverthenewshardsandcreateprocessorstohandlethedatafrom them.TheKCLalsodistributestheshardsinthestreamacrossalltheavailableworkersandrecord processors. WhenyouusetheKCL,youshouldensurethatthenumberofinstancesdoesnotexceedthenumberof shards(exceptforfailurestandbypurposes). ○ EachshardisprocessedbyexactlyoneKCLworkerandhasexactlyonecorrespondingrecord processor. ○ Oneworkercanprocessanynumberofshards. YoucanscaleyourapplicationtousemorethanoneEC2instancewhenprocessingastream.Bydoing so,youallowtherecordprocessorsineachinstancetoworkinparallel.WhentheKCLworkerstartsup onthescaledinstance,itload-balanceswiththeexistinginstances,sonoweachinstancehandlesthe sameamountofshards. Toscaleupprocessinginyourapplication: ○ Increasetheinstancesize(becauseallrecordprocessorsruninparallelwithinaprocess) ○ Increasethenumberofinstancesuptothemaximumnumberofopenshards(becauseshards canbeprocessedindependently) ○ Increasethenumberofshards(whichincreasesthelevelofparallelism) Reference: https://docs.aws.amazon.com/streams/latest/dev/kinesis-record-processor-scaling.html KinesisDataStreamsvsKinesisDataFirehosevsKinesisDataAnalyticsvsKinesisVideoStreams GiventhattherearefourdifferentvariationsofAmazonKinesis,it’sunderstandablethatusecasesbetween eachofthemcangetconfusing.AlthoughtherearedefinitelysomescenarioswheretwoormoreKinesis servicescanoverlap,wehavesomepointersbelowthatyoucanlookoutfortodistinguishthecorrectservice touseintheexam: https://portal.tutorialsdojo.com/ 2 05 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran DataStreams DataFirehose DataAnalytics VideoStreams Shortdefinition Scalableand durablereal-time datastreaming service. Capture,transform, anddeliver streamingdatainto datalakes,data stores,and analyticsservices. Transformand analyzestreaming datainrealtime withApacheFlink. Streamvideofrom connecteddevices toAWSfor analytics,machine learning,playback, andother processing. Datasources Anydatasource (servers,mobile devices,IoT devices,etc)that cancalltheKinesis APItosenddata. Anydatasource (servers,mobile devices,IoT devices,etc)that cancalltheKinesis APItosenddata. AmazonMSK, AmazonKinesis DataStreams, servers,mobile devices,IoT devices,etc. Anystreaming devicethat supportsKinesis VideoStreams SDK. Dataconsumers KinesisData Analytics,Amazon EMR,AmazonEC2, AWSLambda AmazonS3, AmazonRedshift, Amazon Elasticsearch Service,generic HTTPendpoints, Datadog,NewRelic, MongoDB,and Splunk Analysisresultscan besenttoanother Kinesisstream,a KinesisData Firehosedelivery stream,ora Lambdafunction Amazon Rekognition, Amazon SageMaker,MxNet, TensorFlow, HLS-basedmedia playback,custom mediaprocessing application Usecases -Logandevent datacollection -Real-time analytics -Mobiledata capture -Gamingdatafeed -IoTAnalytics -Clickstream Analytics -LogAnalytics -Security monitoring -StreamingETL -Real-time analytics -Statefulevent processing -Smart technologies -Video-related AI/ML -Videoprocessing References: https://aws.amazon.com/kinesis/ https://tutorialsdojo.com/amazon-kinesis/ https://portal.tutorialsdojo.com/ 2 06 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSGlue AWSGlueETLProcess AWSGluesimplifiesalotoftheextract,transform,andloadworkloadsyouhavebecauseitreducesthe manualprocessesandmanagementtasksthatyouhavetodo.AWSGluerunsyourETLjobsinanApache Sparkserverlessenvironment.TheuserhasaccesstomultipletoolsunderAWSGluethatprovide visualizationsandframeworkssoyouwon’thavetowriteyourowncode. ● AWSGlueDataCatalogletsuserseasilysearchandaccessdatalocatedindifferentdatastores. ● AWSGlueStudioletsusersvisuallycreate,run,andmonitorETLworkflows. ● AWSGlueDataBrewletsusersvisuallyenrich,clean,andnormalizedatawithoutwritingcode. ● AWSGlueElasticViewsletsusersuseSQLtocombineandreplicatedataacrossdifferentdatastores. Process: ● WheninitiatinganETLoperation,AWSGlueDataCatalogwilldiscoverandsearchacrossyourAWS datasetswithoutmovingthedata.AWSGlueisabletocollectbothstructuredandsemi-structured datafromAmazonRedshift,AmazonS3,AmazonRDS,AmazonDynamoDB,andself-managed databasesrunningonEC2instancesdatastores.AWSGluealsosupportsdatastreamsfromAmazon MSK,AmazonKinesisDataStreams,andApacheKafka. ● Ifyouhavemultipledatastoresandyouneedtocombinetheirdata,youmayuseAWSGlueElastic Viewstodosoandcreatematerializedviews.ViewscanbestoredinAmazonRedshift,AmazonS3, AmazonElasticsearchService,AmazonDynamoDB,andAmazonRDS. ● Oncethedataiscataloged,itcanbesearchedandqueriedusingAmazonAthena,AmazonEMR,and AmazonRedshiftSpectrum.AWSGlueDataCatalogstoresmetadataforallyourdataassets. ● YoucancomposevisualworkflowsofETLjobsinAWSGlueStudioandmonitortheirstatusesthere. YoucanalsouseAWSGlueDataBrewtocleanandnormalizeyourdata. ● OutputoftheETLjobscanbestoredinAWSLakeFormation,AmazonRedshift,orAmazonS3.If furtheranalyticsisrequired,youmayuseAmazonAthena,AmazonRedshiftSpectrum,AmazonEMR, AmazonSagemakerandAmazonQuicksighttoderivemeaningfulinsightsfromtheETLoutputs. ● AutomateyoursucceedingETLjobsbyintegratingAWSLambdawithAWSGlue. References: https://docs.aws.amazon.com/glue/latest/dg/how-it-works.html https://tutorialsdojo.com/aws-glue/ https://portal.tutorialsdojo.com/ 2 07 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ComparisonofAWSServicesandFeatures AWSCloudTrailvsAmazonCloudWatch ● CloudWatchisamonitoringserviceforAWSresourcesandapplications.C loudTrailisawebservice thatrecordsAPIactivityinyourAWSaccount.TheyarebothusefulmonitoringtoolsinAWS. ● Bydefault,C loudWatchoffersfreebasicmonitoringforyourresources,suchasEC2instances,EBS volumes,andRDSDBinstances.C loudTrailisalsoenabledbydefaultwhenyoucreateyourAWS account. ● WithC loudWatch,youcancollectandtrackmetrics,collectandmonitorlogfiles,andsetalarms. CloudTrail,ontheotherhand,logsinformationonwhomadearequest,theservicesused,theactions performed,parametersfortheactions,andtheresponseelementsreturnedbytheAWSservice. CloudTrailLogsarethenstoredinanS3bucketoraCloudWatchLogsloggroupthatyouspecify. ● YoucanenabledetailedmonitoringfromyourAWSresourcestosendmetricdatatoCloudWatchmore frequently,withanadditionalcost. ● CloudTraildeliversonefreecopyofmanagementeventlogsforeachAWSregion.Managementevents includemanagementoperationsperformedonresourcesinyourAWSaccount,suchaswhenauser logsintoyouraccount.Loggingdataeventsarecharged.Dataeventsincluderesourceoperations performedonorwithintheresourceitself,suchasS3object-levelAPIactivityorLambdafunction executionactivity. ● CloudTrailhelpsyouensurecomplianceandregulatorystandards. ● CloudWatchLogsreportsonapplicationlogs,whileC loudTrailLogsprovideyouspecificinformation onwhatoccurredinyourAWSaccount. ● CloudWatchEventsisanearrealtimestreamofsystemeventsdescribingchangestoyourAWS resources.C loudTrailfocusesmoreonAWSAPIcallsmadeinyourAWSaccount. ● Typically,C loudTraildeliversaneventwithin15minutesoftheAPIcall.C loudWatchdeliversmetric datain5minutesperiodsforbasicmonitoringand1minuteperiodsfordetailedmonitoring.The CloudWatchLogsAgentwillsendlogdataeveryfivesecondsbydefault. https://portal.tutorialsdojo.com/ 2 08 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSDataSyncvsStorageGateway https://portal.tutorialsdojo.com/ 2 09 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran S3TransferAccelerationvsDirectConnectvsVPNvsSnowballEdgevsSnowmobile S3TransferAcceleration(TA) ● ● ● ● ● ● ● ● AmazonS3TransferAccelerationmakespublicInternettransferstoS3faster,asitleveragesAmazon CloudFront’sgloballydistributedAWSEdgeLocations. Thereisnoguaranteethatyouwillexperienceincreasedtransferspeeds.IfS3TransferAccelerationis notlikelytobefasterthanaregularS3transferofthesameobjecttothesamedestinationAWS Region,AWSwillnotchargefortheuseofS3TAforthattransfer. Thisisnotthebesttransferservicetouseiftransferdisruptionisnottolerable. S3TAprovidesthesamesecuritybenefitsasregulartransferstoAmazonS3.Thisservicealso supportsmulti-partupload. S3TAvsAWSSnow* ○ TheAWSSnow*MigrationServicesareidealformovinglargebatchesofdataatonce.In general,ifitwilltakemorethanaweektotransferovertheInternet,ortherearerecurring transferjobsandthereismorethan25Mbpsofavailablebandwidth,S3TransferAccelerationis agoodoption. ○ AnotheroptionistouseAWSSnowballEdgeorSnowmobiletoperforminitialheavyliftmoves andthentransferincrementalongoingchangeswithS3TransferAcceleration. S3TAvsDirectConnect ○ AWSDirectConnectisagoodchoiceforcustomerswhohaveaprivatenetworkingrequirement orwhohaveaccesstoAWSDirectConnectexchanges.S3TransferAccelerationisbestfor submittingdatafromdistributedclientlocationsoverthepublicInternet,orwherevariable networkconditionsmakethroughputpoor. S3TAvsVPN ○ Youtypicallyuse(IPsec)VPNifyouwantyourresourcescontainedinaprivatenetwork.VPN toolssuchasOpenVPNallowyoutosetupstricteraccesscontrolsifyouhaveaprivateS3 bucket.YoucancomplementthisfurtherwiththeincreasedspeedsfromS3TA. S3TAvsMultipartUpload ○ Usemultipartuploadifyouareuploadinglargefilesandyouwanttohandlefaileduploads gracefully.Withmultipartupload,eachpartofyouruploadisacontiguousportionoftheobject’s data.Youcanuploadtheseobjectpartsindependentlyandinanyorder.Iftransmissionofany partfails,youcanretransmitthatpartwithoutaffectingotherparts. ○ ForS3TA,asthenameimplies,acceleratesyourtransferspeeds,notjustforuploadbutalsofor downloadspeed.Thereisnoreasonwhyyoucan’tuseS3TAandmultipartuploadtogether,but ifyouareonlyhandlingsmallfiles,usingmultipartuploadisnotnecessary. AWSDirectConnect ● UsingAWSDirectConnect,datathatwouldhavepreviouslybeentransportedovertheInternetcannow bedeliveredthroughap rivatephysicalnetworkconnectionbetweenAWSandyourdatacenteror https://portal.tutorialsdojo.com/ 2 10 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● ● ● ● ● ● corporatenetwork.Customers’trafficwillremaininAWSglobalnetworkbackbone,afteritentersAWS globalnetworkbackbone. BenefitsofDirectConnectvsinternet-basedconnections ○ reducedcosts ○ increasedbandwidth ○ amoreconsistentnetworkexperience EachAWSDirectConnectconnectioncanbeconfiguredwithoneormorev irtualinterfaces.Virtual interfacesmaybeconfiguredtoaccessAWSservicessuchasAmazonEC2andAmazonS3using publicIPspace,orresourcesinaVPCusingprivateIPspace. YoucanrunIPv4andIPv6onthesamevirtualinterface. DirectConnectdoesnotsupportmulticast. ADirectConnectconnectionisn otredundant.Therefore,asecondlineneedstobeestablishedif redundancyisrequired.EnableB idirectionalForwardingDetection(BFD)whenconfiguringyour connectionstoensurefastdetectionandfailover. AWSDirectConnectoffersSLA. DirectConnectvsIPsecVPN ○ AVPCVPNConnectionutilizesIPSectoestablishe ncryptednetworkconnectivitybetweenyour intranetandAmazonVPCo vertheInternet.VPNConnectionscanbeconfiguredinminutesand areagoodsolutionifyouhaveanimmediateneed,havelowtomodestbandwidth requirements,andcantoleratetheinherentvariabilityinInternet-basedconnectivity.AWSDirect Connectd oesnotinvolvethepublicInternet;instead,itusesd edicated,privatenetwork connectionsbetweenyourintranetandAmazonVPC. YoucancombineoneormoreDirectConnectdedicatednetworkconnectionswiththeAmazonVPC VPN.ThiscombinationprovidesanIPsec-encryptedprivateconnectionthatalsoincludesthebenefits ofDirectConnect. AWSVPN ● ● ● ● ● ● AWSVPNiscomprisedoftwoservices: ○ AWSSite-to-SiteVPNenablesyoutosecurelyconnectyouron-premisesnetworkorbranch officesitetoyourAmazonVPC. ○ AWSClientVPNenablesyoutosecurelyconnectuserstoAWSoron-premisesnetworks. DatatransferredbetweenyourVPCanddatacenterroutesoveranencryptedVPNconnectiontohelp maintaintheconfidentialityandintegrityofdataintransit. IfdatathatpassesthroughDirectConnectmovesinadedicatedprivatenetworkline,AWSVPNinstead encryptsthedatabeforepassingitthroughthepublicInternet. VPNconnectionthroughputcandependonmultiplefactors,suchasthecapabilityofyourcustomer gateway,thecapacityofyourconnection,averagepacketsize,theprotocolbeingused,TCPvs.UDP, andthenetworklatencybetweenyourcustomergatewayandthevirtualprivategateway. AlltheVPNsessionsaref ull-tunnelVPN.(cannotsplittunnel) AWSSite-to-SiteVPNenablesyoutocreatef ailoverandCloudHubsolutionsw ithAWSDirectConnect. https://portal.tutorialsdojo.com/ 2 11 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● AWSClientVPNisdesignedtoconnectdevicestoyourapplications.Itallowsyoutousean OpenVPN-basedclient. SnowballEdge ● ● ● ● ● ● ● ● ● ● ● ● SnowballEdgeisap etabyte-scaledatatransportsolutionthatusessecureappliancestotransferlarge amountsofdataintoandoutofAWS. BenefitsofSnowballEdgeinclude: ○ lowernetworkcosts, ○ Shortertransfertimes, ○ andsecurityusing256-bitencryptionkeysyoumanagethroughAWSKeyManagementService (KMS).. Optionsfordeviceconfigurations ○ Storageoptimized–thisoptionhasthemoststoragecapacityatupto80TBofusablestorage space,24vCPUs,and32GiBofmemoryforcomputefunctionality.Youcantransferupto1 00 TBwithasingleSnowballEdgeStorageOptimizeddevice. ○ Computeoptimized–thisoptionhasthemostcomputefunctionalitywith52vCPUs,208GiBof memory,and7.68TBofdedicatedNVMeSSDstorageforinstance.Thisoptionalsocomeswith 42TBofadditionalstoragespace. ○ ComputeOptimizedwithGPU–identicaltothecompute-optimizedoption,saveforaninstalled GPU,equivalenttotheoneavailableintheP3AmazonEC2instancetype. SimilartoDirectConnect,AWSSnowballEdgeisp hysicalhardware.Itincludesa10GBaseTnetwork connection.Youcanorderadevicewitheither5 0TBo ran80TBstoragecapacity. DatatransportedviaSnowballEdgearestoredinAmazonS3oncethedevicearrivesatAWScenters. AWSSnowballEdgeisnotonlyforshippingdataintoAWS,butalsooutofAWS. AWSSnowballEdgecanbeusedasaquickorderforadditionaltemporarypetabytestorage. YoucanclusterSnowballEdgedevicesforlocalstorageandcomputejobstoachieve99.999percent datadurabilityacross5–10devices,andtolocallygrowandshrinkstorageondemand. Forsecuritypurposes,datatransfersmustbecompletedw ithin360daysofaSnowballEdge’s preparation. Whenthetransferiscompleteandthedeviceisreadytobereturned,theEInkshippinglabelwill automaticallyupdatetoindicatethecorrectAWSfacilitytoshipto,andyoucantrackthejobstatusby usingAmazonSimpleNotificationService(SNS),textmessages,ordirectlyintheconsole. SnowballEdgeisthebestchoiceifyouneedtomoresecurelyandquicklytransferterabytestomany petabytesofdatatoAWS.SnowballEdgecanalsobetherightchoiceifyoudon’twanttomake expensiveupgradestoyournetworkinfrastructure,ifyoufrequentlyexperiencelargebacklogsofdata, ifyou’relocatedinaphysicallyisolatedenvironment,orifyou’reinanareawherehigh-bandwidth Internetconnectionsarenotavailableorcost-prohibitive. Forlatency-sensitiveapplicationssuchasmachinelearning,youcandeployap erformance-optimized SSDvolume(sbp1).PerformanceoptimizedvolumesontheSnowballEdgeComputeOptimizeddevice https://portal.tutorialsdojo.com/ 2 12 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● useNVMeSSD,andontheSnowballEdgeStorageOptimizeddevicetheyuseSATASSD.Alternatively, youcanusecapacity-optimizedH DDvolumes(sbg1)onanySnowballEdge. IfyouwillbetransferringdatatoAWSonanongoingbasis,itisbettertouseAWSDirectConnect. IfmultipleuserslocatedindifferentlocationsareinteractingwithS3continuously,itisbettertouseS3 TA. Youc annotexportdatadirectlyfromS3Glacier.ItshouldbefirstrestoredtoS3. Snowmobile ● ● ● ● ● ● ● SnowmobileisSnowballEdgewithlargerstoragecapacity.Snowmobileisliterallyamobiletruck. SnowmobileisanE xabyte-scaledatatransferservice. Youcantransferupto1 00PBperSnowmobile. Snowmobileusesmultiplelayersofsecuritytohelpprotectyourdataincludingdedicatedsecurity personnel,GPStracking,alarmmonitoring,24/7videosurveillance,andanoptionalescortsecurity vehiclewhileintransit.Alldataisencryptedwith256-bitencryptionkeysyoumanagethroughtheAWS KeyManagementService(KMS). Afterthedatatransferiscomplete,theSnowmobilewillbereturnedtoyourdesignatedAWSregion whereyourdatawillbeuploadedintotheAWSstorageservicessuchasS3orGlacier. SnowballEdgevsSnowmobile ○ Tomigratelargedatasetsof10PBormoreinasinglelocation,youshoulduseSnowmobile.For datasetslessthan10PBordistributedinmultiplelocations,youshoulduseSnowballEdge. ○ IfyouhaveahighspeedbackbonewithhundredsofGb/sofsparethroughput,thenyoucanuse Snowmobiletomigratethelargedatasetsallatonce.Ifyouhavelimitedbandwidthonyour backbone,youshouldconsiderusingmultipleSnowballEdgetomigratethedataincrementally. ○ Snowmobiled oesnotsupportdataexport.UseSnowballEdgeforthiscause. Whenthedataimporthasbeenprocessedandverified,AWSperformsasoftwareerasurebasedon NISTguidelines. https://portal.tutorialsdojo.com/ 2 13 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonEBSvsEC2InstanceStore AmazonEBSvolumes EC2instancestore Definition Diskdrivesthatyoucanvirtually mountontoEC2instancesfor persistent,block-levelstorage. Lifespan AnEBSvolumeexistsindependently Theinstancestoreisdeletedonceyou fromEC2instances.EvenifyourEC2 stop,r ebootorterminatetheEC2 instancesareterminated,youcan instance. retainyourEBSvolumes. VolumeTypes 1. GeneralpurposeSSD(gp2, gp3) 2. ProvisionedIOPSSSD(io1, io2) 3. ThroughputOptimizedHDD (st1) 4. ColdHDD(sc1) Physicaldisksmounteddirectlyonthe hostcomputerofyourEC2instances thatprovidetemporaryblock-level storage. 1. HDD 2. SSD 3. NVMeS SD Availability OnlyavailableintheAZwhereitwas launched,butsnapshotscanbe copiedtoanotherAWSRegion. Onlyavailableontheinstancewhereit waslaunchedwith. Sizingconstraints Minof1GiBandmaxof16TiBper volume.Sizeofvolumescanbe upgradedwithoutdowntime. Storagesizedependsontheinstance typeyouuse.Ifitisusedasaroot volume,themaximumsizeis10GB. Remountingcapabilities Canbedetachedandreattachedto anotherEC2instance Noremountingcapabilitiessince physicaldisksaredirectlyattachedto thehostcomputer. Multi-attachfeatures LetsyouattachasingleProvisioned IOPSSSD(io1orio2)volumeto multipleinstancesthatareinthe sameAvailabilityZone. Notsupported Backupandrestore ViaEBSsnapshotswhichare incrementalbackupsofyourEBS volumes.BackupsarestoredinS3 whichyoucannotdirectlyaccess exceptthroughtheEBSinterface. AMIbackups https://portal.tutorialsdojo.com/ 2 14 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Nativeencryption support AWSKMSencryption AWShardwareencryption Pricing Youarebilledfortheamountof storageprovisioned,amountofIOPS provisioned,and/oramountof throughputprovisioned.Pricing variesbetweenAWSRegionsand volumetypes. IncludedaspartoftheEC2instance's usagecost. Usecases ● ● ● ● ● ● ● Bootvolume Persistentdatastoreevenafter EC2instanceisstopped. Backupandrestorecapabilities Multiattachcapabilities HighIO/Throughputvolumes Canbeswappedbetween instances EncryptionviaKMS ● ● ● Bootvolumeforsomeinstance types VeryhighIO/Throughputbecause directlyattachedtothephysical machine Temporarystorage https://portal.tutorialsdojo.com/ 2 15 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonS3vsEBSvsEFS https://portal.tutorialsdojo.com/ 2 16 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 2 17 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSGlobalAcceleratorvsAmazonCloudFront ● ● ● ● CloudFrontusesmultiplesetsofdynamicallychangingIPaddresseswhileGlobalAcceleratorwill provideyouasetofstaticIPaddressesasafixedentrypointtoyourapplications. CloudFrontpricingismainlybasedondatatransferoutandHTTPrequestswhileGlobalAccelerator chargesafixedhourlyfeeandanincrementalchargeoveryourstandardDataTransferrates,also calledaDataTransfer-Premiumfee(DT-Premium). CloudFrontusesEdgeLocationstocachecontentwhileGlobalAcceleratorusesEdgeLocationstofind anoptimalpathwaytothenearestregionalendpoint. CloudFrontisdesignedtohandleHTTPprotocolmeanwhileGlobalAcceleratorisbestusedforboth HTTPandnon-HTTPprotocolssuchasTCPandUDP. https://portal.tutorialsdojo.com/ 2 18 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran InterfaceEndpointvsGatewayEndpointvsGatewayLoadBalancerEndpoint InterfaceEndpoint ● ● ● ● ● ● Anelasticnetworkinterface withaprivateIPaddressthat servesasanentrypointfor trafficdestinedtoasupported AWSservice,endpoint service,orAWSMarketplace service. Foreachinterfaceendpoint, youcanchooseonlyone subnetperAvailabilityZone. Endpointsareregional,which meanstheyareonlyusable withinthesameregionthey arecreatedin. Sinceinterfaceendpointsuse ENIs,theyalsousesecurity groupstocontroltraffic. Canbeaccessedthrough AWSVPNconnectionsor AWSDirectConnect connections,through intra-regionVPCpeering connectionsfromNitro instances,andthrough inter-regionVPCpeering connectionsfromanytypeof instance. Anendpointonlyreturns responsestotrafficthatis initiatedfromresourcesin yourVPC. Aninterfaceendpoint supportsIPv4TCPtraffic only. GatewayEndpoint ● ● ● ● ● ● Agatewaythatisatargetfor aspecificrouteinyourroute table,usedfortrafficdestined toasupportedAWSservice whichiseitherDynamoDBor S3. Youcancreatemultiple gatewayendpointsinasingle VPC,forexample,tomultiple services.Youcanalsocreate multipleendpointsfora singleservice,anduse differentroutetablesto enforcedifferentaccess policiesfromdifferent subnetstothesameservice. Butyoucannothavemultiple endpointroutestothesame serviceinasingleroutetable. Youcanmodifytheendpoint policythat’sattachedtoyour gatewayendpoint,andaddor removetheroutetablesthat areusedbytheendpoint. Gatewayendpointsare supportedwithinthesame regiononly.Youcannot createanendpointbetweena VPCandaserviceina differentregion. Gatewayendpointssupport IPv4trafficonly. YoumustenableDNS resolutioninyourVPC,orif GatewayLoadBalancerEndpoint ● ● ● ● ● ● Enablesyoutointercept trafficandrouteittoaservice thatyou'veconfiguredusing GatewayLoadBalancers. YouchoosetheVPCand subnetthatyourendpoint shouldbecreatedin.An endpointnetworkinterfaceis assignedaprivateIPaddress fromtheIPaddressrangeof yoursubnet.Youcannot changethesubnetlater. AfteryoucreatetheGateway LoadBalancerendpoint,it's availabletousewhenit's acceptedbytheservice provider.Theserviceprovider canconfiguretheserviceto acceptrequests automaticallyormanually. Securitygroupsandendpoint policiesarenotsupported. EndpointssupportIPv4traffic only. Youcannottransferan endpointfromoneVPCto another,orfromoneservice toanother. https://portal.tutorialsdojo.com/ 2 19 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● Youcanaddendpointpolicies tointerfaceendpoints.The AmazonVPCendpointpolicy defineswhichprincipalcan performwhichactionson whichresources.Anendpoint policydoesnotoverrideor ● replaceIAMuserpoliciesor service-specificpolicies.Itis aseparatepolicyfor controllingaccessfromthe endpointtothespecified service. Afteryoucreateaninterface ● endpoint,it'savailabletouse whenit'sacceptedbythe serviceprovider.Theservice providermustconfigurethe servicetoacceptrequests automaticallyormanually. AWSservicesandAWS Marketplaceservices generallyacceptallendpoint requestsautomatically. Aninterfaceendpoint(except S3interfaceendpoint)has correspondingprivateDNS hostnames. you’reusingyourownDNS server,ensurethatDNS requeststotherequired serviceareresolvedcorrectly totheIPaddresses maintainedbyAWS. Whenyouassociatearoute toyourgatewayendpoint,all instancesinsubnets associatedwiththisroute tableautomaticallyusethe endpointtoaccessthe service. Agatewayendpointcannot beusedbeyondthescopeof theVPCitislinkedto. https://portal.tutorialsdojo.com/ 2 20 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonKinesisvsAmazonSQS AmazonKinesisisareal-timedatastreamingservicethatcanhandleanyamountofstreamingdataand processdatafromhundredsofthousandsofsourceswithverylowlatencies.AmazonSQSisamessage queueingservicethatdecouplesyourapplications,andalthoughitprovideshighmessagethroughput,itisnot asfastasKinesis.Consumerapplicationsbothpolldatafromthesetwoservices.Multipleconsumerscan processKinesisstreamdataatthesametime,whileonlyasingleconsumercanprocessasinglemessage fromSQS. TherearefourtypesofKinesisstreams: 1. KinesisDataStreams 2. KinesisVideoStreams 3. KinesisDataFirehose 4. KinesisDataAnalytics TherearetwotypesofSQSqueues: 1. Standardqueue 2. FIFOqueue InKinesisstreams,datarecordsarestoredintheordertheyarrivein.SQSstandardqueuedoesabesteffortin maintainingmessageordering,whileSQSFIFOqueuestoresmessagesintheordertheyarrivein.Youneedto useKinesislibrariestointeractwithyourKinesisstreams.ForSQS,youonlyneedtouseAWSAPIorAWSSDK tohandleyourmessages. InKinesis,dataiskeptinthestreamforaslongastheretentionperiodisnotup,andconsumerscanchoose whichchunksofdatatheywillconsume.ThisalsomeansthatconsumerscanreplaymessagesinKinesis DataStreamsinthesameexactordertheyarrivedin.InSQS,themessageafterpollingbecomesinvisiblefrom otherconsumersforasetamountoftime,andyouneedtomanuallydeletethemessagefromthequeueforit tobecompletelyremoved. InKinesisDataStreams,tohandlealargeamountofstreamingdata,youmustmakesurethatyouhave enoughshardsinyourstream.InSQS,youmustmakesurethatyourproducersdonotgoovertheAPI throughputlimitforsendingmessages. Kinesishasmanybuiltinbigdata,analytics,&ETLfeaturesandintegrations.Forexample,KinesisData Streamsenablesreal-timeprocessingofstreamingbigdata.KinesisDataAnalyticsletsyourunSQLqueries immediatelyonthestreameddata.KinesisFirehoseimmediatelycaptures,transforms,andloadsstreaming dataintoyourtargetconsumers.SQSStandardqueueprovidesat-least-oncedelivery.SQSFIFOqueue providesexactly-onceprocessing,whichmeansthateachmessageisdeliveredonceandremainsavailable untilaconsumerprocessesitanddeletesit.Duplicatesarenotintroducedintothequeue. https://portal.tutorialsdojo.com/ 2 21 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran LatencyBasedRoutingvsAmazonCloudFront ThegoalofusingRoute53latencybasedroutingand/orAmazonCloudFrontistospeedupdeliveryofcontent toyourusers.Thedifferencebetweenthetwotechnologiesdependsonafewfactors: 1. Yourinfrastructuresetup 2. Thecontentyouwishtodeliver 3. Yourgoalinusingthetechnology Forinfrastructuresetup,ifyouarecurrentlyusingmultipleAWSregionstodelivercontenttoyourusersaround theglobe,thenRoute53latencybasedroutingmakessurethatyourusersareredirectedtotheapplication endpointthatprovidesthemthebestlatency.WithCloudFront,youdon’tnecessarilyneedtodeployyour applicationsinmultipleregions.Instead,youjustdeployyourapplicationinasingleregionandconfigurethe locationswhereyouwantCloudFronttocacheandserveyourcontent.Thissetupcansaveyouhugeamounts ofmoneyifyoudon’trequireusingmultipleAWSregions. Forthecontentyouwishtodeliver,latencybasedroutingalwaysdeliversthelatestcontentthatyour applicationhas.Thismightbeimportantforyouifforexampleyouareservingrealtimedata.CloudFront,on theotherhand,letsyoucachestaticanddynamiccontentthatmatchthecachingrulesyouspecify(e.g. matchingheaders).Ifyoudonotenablecaching,thenCloudFrontdoesnothelpreducethelatencyofcontent deliverytoyourglobalcustomers.Therearealsoinstanceswhereinyou’donlywanttocachespecificobjects, whichinthiscase,CloudFrontwillbeuseful. Asidefromreducingthelatencyforcontentdeliverytoyourcustomers,youmighthaveotherreasonswhyyou woulduselatencybasedroutingorCloudFront.Forexample,youcancombinelatencybasedroutingwith weightedroutingtocreateahighlyavailableglobalinfrastructure.Oryoumightwanttocustomizeyourcontent dependingontheregionthatthecontentoriginatesfrom.Youmightalsowanttorunsomeanalyticsonyour globalcustomersandwhichregionisaccessedthemost. PerhapsyouwanttointegrateRoute53routingrecordswithsomeendpointshealthchecks.ForCloudFront, youmightwanttoputsomegeorestrictionrules.Youmightwanttocontrolhowyourcachedcontentisserved tocustomers.OryoumightliketorunLambda@Edgetoperformsomeedgelocationcomputing.Perhapsyou arenotonlyusingCloudFronttoreducenetworklatency,butalsoasananti-DDoSsolutionforyourweb applications,sinceCloudFrontintegrateswithAWSWAF.CloudFrontcanalsoletyouservecustomerrorpages ifyouneedto.TherearemanyotherfeaturesthatyoucanusealongwithRoute53latencybasedroutingor CloudFrontdependingonyourneeds.Thereisalsonorulesayingthatyoucan’tusebothtechnologies together. https://portal.tutorialsdojo.com/ 2 22 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonEFSvs.AmazonFSxforWindowsFileServervs.AmazonFSxforLustre AmazonEFS ● ● ● ● ● AmazonFSxforWindowsFile Server AmazonEFSisa serverless,scalable, high-performancefile systeminthecloud. ● EFSfilesystemscanbe accessedbyAmazonEC2 Linuxinstances,Amazon ECS,AmazonEKS,AWS Fargate,andAWSLambda functionsviaafilesystem interfacesuchasNFS protocol. AmazonEFSsupportsfile systemaccesssemantics suchasstrongconsistency andfilelocking. EFSfilesystemscan automaticallyscalein storagetohandle petabytesofdata.With Burstingmode,the throughputavailabletoa filesystemscalesasafile systemgrows.Provisioned Throughputmodeallows youtoprovisionaconstant filesystemthroughput independentoftheamount ofdatastored. EFSfilesystemscanbe concurrentlyaccessedby thousandsofcompute serviceswithoutsacrificing performance. ● ● ● ● ● AmazonFSxforWindowsFile Serverisafullymanaged, scalablefilestoragethatis accessibleoverSMBprotocol. SinceitisbuiltonWindows Server,itnativelysupports administrativefeaturessuchas userquotas,end-userfile restore,andMicrosoftActive Directoryintegration. FSxforWFSisaccessiblefrom Windows,Linux,andMacOS computeinstancesand devices.Thousandsof computeinstancesand devicescanaccessafile systemconcurrently. FSxforWFScanconnectyour filesystemtoAmazonEC2, AmazonECS,VMwareCloud onAWS,AmazonWorkSpaces, andAmazonAppStream2.0 instances. Everyfilesystemcomeswitha defaultWindowsfileshare, named“share”. CommonusecasesforFSxfor WFSincludeCRM,ERP,custom or.NETapplications,home directories,dataanalytics, mediaandentertainment workflows,softwarebuild environments,andMicrosoft AmazonFSxforLustre ● ● ● ● ● ● AmazonFSxforLustreisa serverlessfilesystemthatruns onLustreーanopen-source, high-performancefilesystem. TheLustrefilesystemis designedforapplicationsthat requirefaststorage.FSxfor Lustrefilesystemscanscaleto hundredsofGB/softhroughput andmillionsofIOPS.FSxfor Lustrealsosupportsconcurrent accesstothesamefileor directoryfromthousandsof computeinstances. UnlikeEFS,storagecapacity needstobemanuallyincreased, andonlyeverysixhourscanyou doso. AmazonFSxforLustrealso integrateswithAmazonS3, whichletsyouprocesscloud datasetswiththeLustre high-performancefilesystem. CommonusecasesforLustre includemachinelearning, high-performancecomputing (HPC),videoprocessing, financialmodeling,genome sequencing,andelectronic designautomation(EDA). FSxforLustrecanonlybeused byLinux-basedinstances.To accessyourfilesystem,youfirst https://portal.tutorialsdojo.com/ 2 23 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ● ● ● ● ● ● Commonusecasesfor EFSfilesystemsinclude bigdataandanalytics workloads,media processingworkflows, contentmanagement,web serving,andhome directories. AmazonEFShasfour storageclasses:Standard, StandardInfrequent Access,OneZone,andOne ZoneInfrequentAccess Youcancreatelifecycle managementrulestomove yourdatafromstandard storageclassesto infrequentaccessstorage classes. EveryEFSfilesystem objectofStandardstorage isredundantlystored acrossmultipleAZs. EFSofferstheabilityto encryptdataatrestandin transit.Dataencryptedat restusingAWSKMSfor encryptionkeys.Data encryptionintransituses TLS1.2 ToaccessEFSfilesystems fromon-premises,you musthaveanAWSDirect ConnectorAWSVPN connectionbetweenyour on-premisesdatacenter andyourAmazonVPC. ● ● ● ● ● ● SQLServer. YoucanaccessFSxfile systemsfromyour on-premisesenvironmentusing anAWSDirectConnectorAWS VPNconnectionbetweenyour on-premisesdatacenterand yourAmazonVPC. Youcanchoosethestorage typeforyourfilesystem:SSD storageforlatency-sensitive workloadsorworkloads requiringthehighestlevelsof IOPS/throughput.HDDstorage forthroughput-focused workloadsthataren’t latency-sensitive. EveryFSxforWFSfilesystem hasathroughputcapacitythat youconfigurewhenthefile systemiscreatedandthatyou canchangeatanytime. EachWindowsFileServerfile systemcanstoreupto64TB ofdata.Youcanonlymanually increasethestoragecapacity. Yourfilesystemcanbe deployedinmultipleAZsora singleAZonly.Multi-AZfile systemsprovideautomatic failover. FSxforWindowsFileServer alwaysencryptsyourfile systemdataandyourbackups at-restusingkeysyoumanage throughAWSKMS. Data-in-transitencryptionuses SMBKerberossessionkeys. ● installtheopen-sourceLustre clientonthatinstance.Thenyou mountyourfilesystemusing standardLinuxcommands. Lustrefilesystemscanalsobe usedwithAmazonEKSandAWS Batch. FSxforLustreprovidestwo deploymentoptions: 1) Scratchfilesystemsarefor temporarystorageand shorter-termprocessingof data.Dataisnotreplicated anddoesnotpersistifafile serverfails. 2) Persistentfilesystemsare forlonger-termstorageand workloads.Thefileservers arehighlyavailable,anddata isautomaticallyreplicated withintheAZthatis associatedwiththefile system. ● Youcanchoosethestoragetype foryourfilesystem:SSDstorage forlatency-sensitiveworkloads orworkloadsrequiringthe highestlevelsof IOPS/throughput.HDDstorage forthroughput-focused workloadsthataren’t latency-sensitive. ● FSxforLustrealwaysencrypts yourfilesystemdataandyour backupsat-restusingkeysyou managethroughAWSKMS.FSx encryptsdata-in-transitwhen accessedfromsupportedEC2 instances. https://portal.tutorialsdojo.com/ 2 24 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AmazonRDSvsDynamoDB https://portal.tutorialsdojo.com/ 2 25 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 2 26 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran Redis(clustermodeenabledvsdisabled)vsMemcached https://portal.tutorialsdojo.com/ 2 27 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSWAFvsAWSShieldBasicvsAWSShieldAdvanced AWSWAF SecurityFeatures AWSWAFcanmonitor webrequeststransmitted overHTTPorHTTPS. AWSWAFhelpsprotect webapplicationsfrom attacksbyallowingyouto configurerulesthatallow, block,rate-limit,ormonitor webrequestsbasedon conditionsthatyoudefine. Theseconditionsinclude IPaddresses,HTTP headers,HTTPbody,URI strings,SQLinjection,and cross-sitescripting. Rate-basedrulesalsohelp youfromweb-layerDDoS attacks,bruteforcelogin attempts,andbadbots. Integration Pricing AWSWAFistightly integratedwithAmazon CloudFront,Application LoadBalancer,Amazon APIGateway,andAWS AppSync AWSShieldBasic AWSShieldAdvanced AWSShieldprovides protectionagainstcommon andmostfrequently occurringOSIlayer3and4 attackslikeSYN/UDP floods,reflectionattacks, andDDoSattacksfor applicationsrunningon AWS. AWSShield’sdetectionand mitigationsworkwithIPv4 andIPv6traffic. AWSShieldAdvanced providesadditional protectionsagainstmore sophisticatedandlarger attacksforyour applicationsrunningin AWS. Providesnearreal-time notificationsofsuspected DDoSincidents.Also employsadvancedattack mitigationandrouting techniquesfor automaticallymitigating attacks. HavingaBusinessor Enterprisesupportplan letsyouengagewiththe AWSDDoSResponse Team. MostoftheAWSresources areautomaticallyintegrated andprotectedfrom commonandfrequently occurringnetworkand transportlayerDDoS attacks. Canbeintegratedwith AmazonEC2,ElasticLoad Balancing,Amazon CloudFront,AWSGlobal Accelerator,andRoute53 forahigherlevelofDDoS attackmitigation. Youarechargedbasedon AWSShieldStandardis thenumberofwebaccess automaticallyenabledtoall controllists(webACLs) AWScustomersatnocost. thatyoucreate,the numberofrulesthatyou addperwebACL,andthe numberofwebrequests thatyoureceive. Youpayamonthlyfeeof $3,000permonthper organization.Inaddition, youalsopayforAWS ShieldAdvancedData Transferusagefeesfor AWSresourcesenabled foradvancedprotection. https://portal.tutorialsdojo.com/ 2 28 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran https://portal.tutorialsdojo.com/ 2 29 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran AWSKMSvsAWSCloudHSM ManyAWSservicesprovidenativeencryptionsupportfordatain-transitanddataatrest.Knowingwhatyou needtoprotectandhowtoprotectitwillletyoudeterminewhichAWSencryptionserviceyoushoulduse. WhentouseKMS: Whenyouencryptdata,youneedtoprotectyourencryptionkey.Tofurthersecureyourdata,youshouldalso encryptyourencryptionkey.Thefinalencryptionkey,ormasterkey,isthemostcrucialsegmentinyour encryptionprocess,sinceitcandecipherallthedatakeysthatyouusedtoencryptyourdata.AWSKey ManagementService,orAWSKMS,letsyoucreate,store,andmanagecustomermasterkeys(CMKs)securely. YourCMKsneverleaveAWSKMSunencrypted,andCMKscanonlybeusedthroughAWSKMStodecrypt objects.AWSKMShaskeypoliciesthatletyouspecifywhohasaccesstoyourCMKsandwhattheycando withit. ACMKcanbeusedtoencryptsmallamountsofdata(upto4096bytes).Ifyouneedtoencryptlargercontent, usetheCMKtogenerate,encrypt,anddecryptthedatakeysthatarethenusedtoencryptyourdata,inplaceof theCMK.Datakeyscanencryptdataofanysizeandformat,includingstreameddata.However,dokeepin mindthatAWSKMSdoesnotstoreormanagedatakeys,andyoucannotuseKMStoencryptordecryptwith datakeys.AWSKMSonlymanagestheCMKs. WithAWSKMS,youcancreatesymmetricandasymmetrickeysanddatakeypairs,aswellasimportyourown symmetrickeymaterial.KeysgeneratedbyAWSKMScanbescheduledtoautomaticallyrotateonanannual basis.WhencreatingaCMK,youmustspecifywhetherthekeywillbeusedforencryption/decryptionor sign/verifyoperations. WhentouseCloudHSM: AWSKMSCMKsarestoredinFIPS-validatedhardwareservicemodules(HSMs)thatKMSmanages(shared tenancyamongAWScustomers).Ahardwaresecuritymodule(HSM)isaspecializedsecuritydevicethat generatesandstorescryptographickeys.IfyouprefertomanageyourownHSMstostoreyourkeysinKMS,or yourequireFIPS140-2type3,youmayuseAWSCloudHSM.Onceyou’vecreatedyourownHSM,youcanhave theHSMgenerateandstoreyourencryptionkeys,andcreateusersandsettheirpermissionsforyourHSM. ForsecurityandisolationfromotherAWScustomers,CloudHSMmustbeprovisionedinsideanAmazonVPC. Additionally,youcanoffloadSSL/TLScryptographicprocessingforHTTPSsessionstoyourCloudHSM module,whichcannotbedoneonAWSKMS.Offloadingtheprocesslessensthecomputationalburdenonyour servers.SomeotherusesforCloudHSMincludesecuringtheprivatekeysforanissuingCertificateAuthority (CA),andenablingTransparentDataEncryptionforOracledatabases. https://portal.tutorialsdojo.com/ 2 30 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran RDSReadReplicavsRDSMulti-AZvsVerticalScalingvsElasticache Therearemanywaystoincreasetheperformance,availabilityandscalabilityofanAmazonRDSinstance. However,someimplementationsoverlapeachotherinusecasesandmayseemredundant.Choosingthe correctimplementationforacertainsituationmaynotnecessarilybeasobviousasitseems,butthereare definitelysomenuancesthatyoucanmakenoteof. AmazonRDSReadReplicasprovideenhancedperformanceanddurabilityforyourDBinstances.Theyprovide horizontalscalingforread-heavydatabases.ReadreplicascanalsobemanuallypromotedtomasterDB instancesifthemasterinstancestartsfailing.Databetweenthemasterinstanceandreadreplicasare replicatedasynchronously.Rememberthatreadreplicascanonlyread-onlyconnections;writeconnectionswill notgothrough.Readreplicasprovidescalingonreadcapacitywhilereducingtheburdenonyourmaster instance. AmazonRDSMulti-AZisasolutionthatincreasestheavailabilityofyourRDSmasterinstance.Intheeventof anoutage,RDSwilldoanautomaticfailovertoyourbackupDBinstanceintheotherAZ.RDSAurorauses asynchronousdatareplicationtokeepthemasterandstandbyinstancesupdated.Non-Auroraenginesuse synchronousreplication.WithMulti-AZenabled,yourdatabasewillalwaysspanatleasttwoAvailabilityZones withinasingleregion.Yourstandbyreplicacannothandlereadandwritequeries. WhenyouneedmoreresourcesforyourmasterDBinstance,youcanalwayss caleuptheinstancesizetogain moreCPU,memory,networkthroughput,anddedicatedEBSbandwidth.YouusuallyscaleupyourDBinstance ifyouneedmorereadandwritecapacity,andthatreadreplicasareunnecessaryforyourneeds.Oftentimes, theinitialsizeyouchooseforyourRDSinstanceisincorrectorinadequate.AnAmazonRDSperformancebest practiceistoallocateenoughRAMsothatyourworkingsetresidesalmostcompletelyinmemory.The workingsetisthedataandindexesthatarefrequentlyinuseonyourinstance.Thereisminimaldowntime whenyouarescalinguponaMulti-AZenvironmentbecausethestandbydatabasegetsupgradedfirst,thena failoverwilloccurtothenewlysizeddatabase.ASingle-AZinstancewillbeunavailableduringthescale operation. AddinganElasticacheinfrontofyourRDSinstanceincreasesthereadperformanceforyourapplicationsince thedataresidesinmemory.Ifyouhaveitemsthatarefrequentlyaccessed,youcancachetheminElasticache andreducetheburdenonyourDBinstance.Elasticacheisnotagoodoptionifyourdatabaseismore write-heavythanread-heavy,unlessyoureallyneedthatextrabumpinreadperformance.Comparingacache toareadreplica,acacheisbettersuitediftheapplicationqueriesthesameitemsoverandoveragainorthe resultsarestatic.IfyouhavebeenpreviouslyusingRedisorMemcachedalready,Elasticachealsoallowsyou toliftandshiftyoursolutionover.Iftheitemsthatarebeingreadvarywaytoomuch,areadreplicamightbea betterchoiceinstead. https://portal.tutorialsdojo.com/ 2 31 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ScalingDynamoDBRCUvsDynamoDBAccelerator(DAX)vsSecondaryIndexesvs ElastiCache SimilartoAmazonRDS,therearealsomultipleoptionsavailabletoDynamoDBwhenyouwanttoincreasethe performanceofyourtables.Eachoptionhasitsownusecase,pros,andconsthatyoushouldconsiderall togetherwhenchoosingforthebestsolution. ScalingDynamoDBReadCapacitycanbeachievedintwoways,dependingonyourcapacitymode.For On-DemandMode,youdonotneedtoperformcapacityplanning.DynamoDBautomaticallyscalesyourread andwritecapacitytomeetdemands.However,ifyourworkloadsspikeveryoften,On-Demandmodemight becomeverycostlyforyouifyoudonotmanageyourcapacitylimitsproperly.ForProvisionedMode,you specifythenumberofreadsandwritespersecondthatyourequireforyourapplicationtomeetallthetime. Youcanuseautoscalingtoadjustyourtable’sprovisionedcapacityautomaticallyinresponsetotraffic changes.Thishelpsyoumanageyourusagetostayatorbelowadefinedrequestrateinordertomakecost morepredictable.DynamoDBautoscalingwillactivelymanagethethroughputcapacityforyourtablesand globalsecondaryindexes.Youjustdefineanupperandlowerlimitforthereadandwritecapacityunits.You alsodefineatargetutilizationpercentagewithinthatrange.Youshouldscaleyourreadcapacityunitswhen yourDynamoDBtablesandindexesexperiencehighreadoperationsandtheitemsbeingreadarenotsuited forcache. DynamoDBDAXisafullymanaged,in-memorycacheforDynamoDB.YouuseDynamoDBDAXifyouwishto achievemicrosecondresponsetime.WithDynamoDBDAX,thereisnoneedtochangeyourcode.Youcan continueusingDynamoDBSDKsandAPIsasis.Ifyouhaveverystrictperformancerequirements,orifyou havecommontableitemsthatarebeingqueriedrepeatedly,DynamoDBDAXisthesolutionforyou.Youalso avoidhavingtooverprovisionreadcapacityforyourDynamoDB.Youonlypayforthecapacityyouprovisionin DynamoDBDAX.SinceDAXisacache,itispossiblethatyourapplicationsmightquerystaledata.Ifyour applicationsrequirestronglyconsistentreadsorhavewrite-intensiveworkloads,thenyoushouldnotuseDAX. SecondaryIndexescanspeedupreadoperationsbyhelpingyouavoidscanningyourwholetablewhen queryingnon-primarykeyattributes.YoucanretrievedatafromtheindexusingaQ ueryo peration,inmuchthe samewayasyouuseQ ueryw ithatable.YoucanalsoS cana nindex,inmuchthesamewayasyouwouldS can atable.Atablecanhavemultiplesecondaryindexes,allowingyoutohavemultiplequerypatterns.Every secondaryindexisalsoautomaticallymaintainedbyDynamoDB.Whenyouadd,modify,ordeleteitemsinthe basetable,anyindexesonthattablearealsoupdatedtoreflectthesechanges.Donotethattheread performanceofyoursecondaryindexesarestillboundbythereadcapacityunitsofyourDynamoDBtable. Also,ratherthanboostingtheperformanceofyourtable,indexesaremorelikeoptimizingyourdatastructure tohelpyouquerytheresultsyouneedfaster. Forcachingrequirements,youwouldusuallygowithDynamoDBAccelerator,sinceitdoesnotrequireanycode modificationifyou’vebeenusingDynamoDBalready.You’llonlypreferAmazonElasticacheasyourcaching https://portal.tutorialsdojo.com/ 2 32 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran serviceifyou’respecificallyrequiredtouseRedisorMemcached,orifyouhaveafeatureinElasticachethatis notcurrentlysupportedinDAX.Someoftheunsupportedfeaturesforexampleare: ● DAXdoesnotsupportTransportLayerSecurity(TLS). ● DAXonlysupportsapplicationswritteninGo,Java,Node.js,Python,and.NET. ● DAXmaynotbeavailableinyourdesiredregion. ● Youwanttomanagethecacheinvalidationlogic. https://portal.tutorialsdojo.com/ 2 33 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran FINALREMARKSANDTIPS That’sawrap!ThankyouonceagainforchoosingourStudyGuideandCheatSheetsfortheAWSCertified SolutionsArchitectAssociate(SAA-C02)exam.TheT utorialsDojoteamspentconsiderabletimeandeffortto producethiscontenttohelpyoupasstheAWSexam. WealsorecommendthatbeforeyoutaketheactualSAA-C02exam,allocatesometimetocheckyour readinessfirstbytakingourA WSpracticetestcourseintheTutorialsDojoPortal.Youcanalsotrythefree samplerversionofourfullpracticetestcourseh ere.Thiswillhelpyouidentifythetopicsthatyouneedto improveonandhelpreinforcetheconceptsthatyouneedtofullyunderstandinordertopasstheSAA-C02 exam.ItalsohasdifferenttrainingmodesthatyoucanchoosefromsuchasTimedmode,Reviewmode, Section-Basedtests,Topic-basedtests,andFinaltestplusbonusflashcards.Inaddition,youcanreadthe technicaldiscussionsinourforumsorpostyourqueriesifyouhaveone.Ifyouhaveanyissues,concernsor constructivefeedbackonoureBook,feelfreetocontactusats upport@tutorialsdojo.com. OnbehalfoftheTutorialsDojoteam,IwishyouallthebestinyourupcomingAWSCertifiedSolutionsArchitect -Associateexam.Mayithelpadvanceyourcareer,aswellasincreaseyourearningpotential. Withtherightstrategy,hardwork,andunrelentingpersistence,youcandefinitelymakeyourdreamsareality! Youcanmakeit! Sincerely, JonBonso,AdrianFormaranandtheTutorialsDojoTeam https://portal.tutorialsdojo.com/ 2 34 T utorialsDojoStudyGuideandCheatSheets-AWSCertifiedSolutionsArchitectAssociate byJonBonsoandAdrianFormaran ABOUTTHEAUTHORS JonBonso(10xAWSCertified) Born and raised in the Philippines, Jon is the Co-Founder of Tutorials Dojo. Now based in Sydney, Australia, hehasovera decadeofdiversifiedexperienceinBanking,FinancialServices, and Telecommunications. He's 10x AWS Certified, an AWS Community Builder, and has worked with various cloud services such as Google Cloud, and Microsoft Azure. Jon is passionate about what he does and dedicates a lot of time creating educational courses. He has given IT seminars to different universities in the Philippines for free and has launched educational websites using his own money and withoutanyexternalfunding. AdrianFormaran(3xAWSC ertified) AsaComputerScientistandaprouduniversityscholar,Adrian has a passion for learning cuttingedgetechnologies,suchas blockchain, cloud services, and information security, and is passionateaboutteachingthesetoothersaswell.Hecurrently has 3 AWS certifications under his belt, including the AWS Certified Solutions Architect Professional. Healsohasadeep love for mathematics, sciences, and philosophy. A gamer at heart. https://portal.tutorialsdojo.com/ 2 35