Professional Documents
Culture Documents
Author:JasonAlloway Company:AllTechSolutionsLLC
Table of Contents
Introduction ManuallychangingtheImagerunningstate AutomatingtheImagerunningstate ObtainandConfigureasupportedJAVAJRE ObtainandConfiguretheAmazonEC2APITools SchedulingaStopInstanceTaskinWindowsTaskScheduler Appendix
Introduction
Oneoftheobviousbenefitsofcloudcomputingisthepayasyougomodelandonlypayingfor whatyouuse.AmazonEC2Cloudimagesofferusersgreatflexibilityinthisregardbyallowing instancestobeeasilyturnedofforterminatedwhennotinuse.SinceAmazoninstanceusage ismeteredyoumayhavelargechunksoftimewhereyoudonotwishtoleavetheclock running,andprefertobringtheinstancedown(whichwillstopthebilling).Thisdocument providesstepbystepdirectionsforschedulingautomatedinstancestopsandstarts,soyoucan easilyreducetheoverallcostoftheinstance.Althoughthefocusofthisdocumentwasinitiating scheduledstopandstartactionsfromaWindowsWorkstation.Unixcroncommandscanalso beutilizedtoachievethesameresult.
Next,editthePATHSystemVariablebyadding:%JAVA_HOME%\bin
Note:EnsuretheentryappearsbeforeanymentionofotherJREsonthesystemPath
TesttheconfigurationbyopeninganewCMDpromptandissuingthecommand:javaversion YoushouldseetheJAVAversiondisplayed
ExpandtheAccessKeyssectiononthefollowingscreen:
HereyoucannoteyourAccessKeyID,butasofthetimeofwritingyoumustfollowthelinkin thelowerrighttoobtaintheSecretAccessKey:
Usethese2valuestoaddtheSystemEnvironmentVariables:
AtthispointtheAmazonEC2CLIToolsareinstalledandcommandscanbeissuedfromthe CMDpromptinanydirectory.
TheCreateBasicTaskWizardwillLaunchandguideyouthroughcreatingthetaskcreationand scheduling.WhenpromptedenteranameanddescriptionandclickNEXT:
SelectyourtriggerfrequencyandclickNEXT,forthisexamplewearechoosingDaily:
Youwillbepromptedtoprovidemoredetailonthethedates,time,andfrequencyyouwantthe tasktorun.ClickNEXT:
ChoosetoStartaprogram,andclickNEXT:
Note:TheInstanceIDcanberetrievedfromtheAmazonEC2Dashboard ReviewthedetailsofthetaskandclickFINISH:
ReturntotheAmazonEC2Dashboardandverifythestatushaschangedfromrunningto stoppedbyrefreshingthescreen:
Appendix
ThedownloadlocationfortheAmazonEC2APIToolsasofwritingishere: http://aws.amazon.com/developertools/351 ThemostrecentfulllistofallAmazonCLICommandsislocatedhere: http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/commandreference.ht ml TheOracleJAVAJREDownloadsiteishere: http://www.oracle.com/technetwork/java/javase/downloads/index.html