aws ami automation

Discover aws ami automation, include the articles, news, trends, analysis and practical advice about aws ami automation on alibabacloud.com

Example of how AWS uses packer to build an aws AMI Image

AWS provides a wide variety of mirrors for users, but in most cases the AMI provided in the community do not fully meet our needs, such as the more disgusting some mirrored root partitions are only 10g, so we generally use the community's public image to create a EC2, And then configure her, and then hit a mirror for the project, Packer can make us more automated to generate

Aws-ami narrow the root partition and create a new AMI example

Environment and Requirements: 1. The AMI root partition now has 25G2 25G a bit more, so want to reduce 25G to 12G3. View disk Information # df-hFileSystem Size Used Avail use% mounted on/DEV/XVDA1 17G 1.5G 15G 9%/Tmpfs 498M 0 498M 0%/dev/shm Operation Steps: 1. Mount a new 12G plate (/DEV/XVDF) 2. Partition and format new disks # fdisk-lDevice Boot Start End Blocks Id System/DEV/XVDF1 1 1045 8393931 Linux/DEV/XVDF2 1046 1566 4184932+ Linux Swap/

Powershell AWS Automation Management (2)

Yesterday I learned the basics of preparation and successfully linked AWS with PowerShell. Take a look today at how to use PowerShell to manage AWS services.Ec2,s3,vpc,security group,rds and so on. These early AWS services can be said to be his core skeleton, the goal of the beans is to finally use PowerShell to achieve a highly available blog, such as HTTP/ bean

Powershell AWS Automation Management (12)-Create a highly available WordPress blog (bottom)

" '-comparisonoperator ' Lessthanorequaltothreshold "-threshold60-evaluationperiod 1$stepadjustment =new-object Amazon.AutoScaling.Model.StepAdjustment $stepadjustment. Metricintervallowerbound=20$stepadjustment. Scalingadjustment=-1write-asscalingpolicy-autoscalinggroupname My-asg-adjustmenttype "ChangeInCapacity"- PolicyName "MyScaleInPolicy1"-policytype "stepscaling"-stepadjustment $stepadjustmentWrite-cwmetricalarm- actionsenabled $true-alarmname "Testonly"-alarmaction {arn:aws:autoscaling:

PowerShell Automation Management AWS (1)

be omitted directly650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/83/63/wKiom1dx_iKhLygDAAAvES_DlNI872.png "style=" float: none; "title=" 9.PNG "alt=" Wkiom1dx_ikhlygdaaaves_dlni872.png "/>If I don't remember the full name, I can match it with a regular command, such as I need to know any service operation related to Securitygroup.Get-awscmdletname–apioperation Securitygroup-matchwithregex650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/63/wKiom1dx_ieDBoJ7AADvME6rZuU645

Powershell AWS Automation Management (6)-IAM

/wyfs02/M00/83/C9/wKioL1d8mVDwO_AuAABzWFt89vU649.png "title=" 9.PNG " Style= "Float:none;" alt= "Wkiol1d8mvdwo_auaabzwft89vu649.png"/>The next step is to specify the resources that EC2 can access, specifying all of the S3 resources$policy 2 = @ "{" "Version": "2012-10-17", "Statement": [{"Effect": "Allow", "notaction": "s3:*", "Resource": "*" }]} "@ write-iamrolepolicy-policydocument $policy 2-rolename" newec2-s31 "-policyname" ALLOWS3 "After execution, you can see that it's been configured.650)

Powershell AWS Automation Management (10)-Create a highly available WordPress blog (top)

CloudFront distribution points, bind S3 buckets Preparing the WordPress configuration document Preparing the configuration document for VirtualHost Uploading the configuration document into the S3 bucket Configure bash shell scripts, including Lamp,wordpress,aws,crontab and S3 synchronization, and more Create a EC2 virtual machine, specify the bootstrap command created in 14 steps Update DNS records, point to the virtual machi

Powershell AWS Automation Management (5)-ELB and Auto Scaling

://s3.51cto.com/wyfs02/M02/83/AA/wKioL1d6CmWR2StsAADCflHoudk047.png "title=" 13.PNG "alt=" Wkiol1d6cmwr2stsaadcflhoudk047.png "/>In fact, the auto scaling group created the corresponding policy and alarm so I took a lot of effort. Because AWS does not know for what reason, his creation command is Write-asscalingpolicy, and the corresponding read command is get-aspolicy, the Delete command is Remove-aspolicy, completely does not conform to the naming s

Powershell AWS Automation Management (9)-Route 53

-objectamazon.route53.model.change$ Change1. action= "DELETE" $change 1. Resourcerecordset=new-objectamazon.route53.model.resourcerecordset$change1. resourcerecordset.name= "blog.beanxyz.com" $change 1. resourcerecordset.type= "A" $change 1. Resourcerecordset.ttl=300$change1. RESOURCERECORDSET.RESOURCERECORDS.ADD (@{value= "52.63.115.148"}) $change 3=new-object Amazon.route53.model.change$change3. action= "CREATE" $change 3. Resourcerecordset=new-objectamazon.route53.model.resourcerecordset$chan

Powershell AWS Automation Management (8)-CloudFront

' -DefaultCacheBehavior_MinTTL1000 ' -distributionconfig_ priceclass "Priceclass_all" ' -cachebehaviors_quantity0 ' -Aliases_Quantity1 ' -aliases_item "Test.beanxyz.com"After the command has been executed, it is created and can be used in about 15 minutes.650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/25/wKiom1eHBWfyxdcSAAA0x-_PLbY218.png "style=" float: none; "title=" 1.PNG "alt=" Wkiom1ehbwfyxdcsaaa0x-_plby218.png "/>At the same time, on my GoDaddy DNS I added an alias to m

PowerShell Automation Management AWS (4)-VPC

} #Add new Routenew-ec2route-destinationcidrblock "0.0.0.0/0"-gatewayid $igwid-routetableid $ RouteTable. RoutetableidAs shown below650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/8E/wKioL1d1_z7zG2PeAAArGIDYbJY472.png "style=" float: none; "title=" 10.PNG "alt=" Wkiol1d1_z7zg2peaaargidybjy472.png "/>I can also force associations to the corresponding subnets. If it is in the default main routing table, all subnets will automatically inherit VPC-related routes, of course, I created a

Powershell AWS Automation Management (7)-RDS

/wKiom1eFsjjhmJY2AABI9C9reeY614.png "title=" 5.PNG " alt= "Wkiom1efsjjhmjy2aabi9c9reey614.png"/>Next, do a simple test.Beans directly created a CentOS 7 server, after installing MARIADB, connect to the endpoint of my RDS instance to seeConnection Successful650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/19/wKiom1eFsAuSTHNQAAA8-IM8uXY046.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1efsausthnqaaa8-im8uxy046.png "/>View Database650) this.width=650; "src=" Http://s3.51cto.com/

Powershell AWS Automation Management (11)-Create a highly available WordPress blog (middle)

' -cookies_forwardall ' -WhitelistedNames_Quantity0 ' -TrustedSigners_Enabled $false ' -trustedsigners_quantity 0 ' -defaultcachebehavior_viewerprotocolpolicyallow-all ' -DefaultCacheBehavior_MinTTL1000 ' -DistributionConfig_PriceClass "Priceclass_all" -CacheBehaviors_Quantity0 ' -aliases_quantity0650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/57/wKioL1eNyw3Ap-mJAADCdHrVpJk799.png "title=" 8.PNG " Style= "Float:none;" alt= "Wkiol1enyw3ap-mjaadcdhrvpjk799.png"/>This articl

PowerShell AWS Automation Management (3)

/yuanpicture/myobject.txt" Start-process-filepath $url650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/83/7C/wKiom1d0ktnSv4ymAAAieOcRIcs574.png "style=" float: none; "title=" 13.PNG "alt=" Wkiom1d0ktnsv4ymaaaieocrics574.png "/>If you want to download a file, you can implement it by Read-s3objectFor example, I downloaded this file to the current folder, named Test.txtRead-s3object Yuanpicture-key myobject.txt-file Test.txt650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/83/7B/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.