AWS Notes: Difference between revisions
From Federal Burro of Information
Jump to navigationJump to search
(Created page with " Centos 7 products: https://aws.amazon.com/marketplace/fulfillment?productId=b7ee8a69-ee97-4a49-9e68-afaee216db2e&launch=oneClickLaunch accept lic nad choose a region -> ami...") |
No edit summary |
||
Line 5: | Line 5: | ||
accept lic nad choose a region -> ami id on this page. | accept lic nad choose a region -> ami id on this page. | ||
== blat keys == | |||
<pre> | |||
#!/bin/sh | |||
keypair=keyname # or some name that is meaningful to you | |||
publickeyfile=/the/file/me.pub | |||
regions=$(aws ec2 describe-regions \ | |||
--output text \ | |||
--query 'Regions[*].RegionName') | |||
for region in $regions; do | |||
echo $region | |||
aws ec2 import-key-pair \ | |||
--region "$region" \ | |||
--key-name "$keypair" \ | |||
--public-key-material "file://$publickeyfile" | |||
done | |||
</pre> |
Revision as of 14:39, 28 September 2016
Centos 7 products:
accept lic nad choose a region -> ami id on this page.
blat keys
#!/bin/sh keypair=keyname # or some name that is meaningful to you publickeyfile=/the/file/me.pub regions=$(aws ec2 describe-regions \ --output text \ --query 'Regions[*].RegionName') for region in $regions; do echo $region aws ec2 import-key-pair \ --region "$region" \ --key-name "$keypair" \ --public-key-material "file://$publickeyfile" done