Author:
erics , July 29th, 2021
I was getting error “You must specify a region” when running any aws CLI command. The fix: Using the aws command:
aws configure set region us - east - 1 -- profile demo
which will automatically add the following to the file ~/.aws/config:
[ profile demo ]
region = us - east - 1
You many simply edit the ~/.aws/config file yourself and append the same thing:
vi ~ / . aws / config
[ profile demo ]
region = us - east - 1
Categories: How-To's , Technology Tags: AWS , aws cli , aws command , aws configure , aws set , cli , Command , Config , configure , Error , Region , You must specify a region
| No comments
Author:
erics , July 1st, 2019
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
DATE = ` date `
(
echo "From: Your Full Name <you@yourdomain.com>"
echo "To: you@yourdomain.com"
echo "Subject: AWS Instances Report for All Customers as of $DATE"
cat << EOT
MIME - Version : 1.0
Content - Type : text / html
Content - Disposition : inline
< html >
< body >
< pre style = "font: monospace" >
EOT
for profile in customer1 customer2 customer3 ; do
for region in ` aws ec2 describe - regions -- output text | cut - f3 ` ; do
echo - e "\nListing Instances for profile $profile in region: '$region'..."
aws ec2 describe - instances \
-- filters "Name=instance-state-name,Values=running" \
-- query 'Reservations[*].Instances[*].[InstanceId, PublicIpAddress, LaunchTime, InstanceType, Tags[?Key==`Name`] | [0].Value]| sort_by(@, &@[0][2])' \
-- region $region \
-- profile $profile \
-- output table
done
done
cat << EOT
< / pre >
< / body >
< / html >
EOT
) | / usr / sbin / sendmail - t
Categories: How-To's , Technology Tags: AWS , aws ec2 , Date , EC2 , Email , Font , Format , howto , html , LaunchTime , mail , monospace , monospaced , Multiple , Region , Regions , SendMail , sort , Sort By , time , tips
| No comments
Author:
erics , June 30th, 2015
/opt/aws/bin/ec2-metadata | grep placement
Categories: How-To's , Technology Tags: Amazon , Availability Zone , AWS , AZ , cli , ec2-metadata , howto , ID , Instance , Instance ID , meta , metadata , Placement , Region , tips , Zone
| No comments
Author:
erics , December 18th, 2012
Today AWS announced the ability to copy EBS snapshots to other regions, with the ability to copy AMIs coming soon. This is a HUGE improvement, and one that will allow IT architects to create automated DR solutions across AWS regions providing significant resilience against outages. Dear Amazon EC2 Customer, We are delighted to announce the […]
Categories: Technology Tags: Amazon , AWS , Copy , EBS , Region , Snapshot
| No comments