Closed jufemaiz closed 10 years ago
AWS EC2 Metadata (/opt/aws/bin/ec2-metadata) can provide an instance's region via its availability zone in much the same method as the instance_id is obtained.
In this case:
availability_zone = `/opt/aws/bin/ec2-metadata -z | awk '{print $2}'`.strip region = availability_zone[0..availability_zone.length-1]
https://github.com/dignoe/whenever-elasticbeanstalk/pull/10
Fixed in https://github.com/dignoe/whenever-elasticbeanstalk/pull/16
AWS EC2 Metadata (/opt/aws/bin/ec2-metadata) can provide an instance's region via its availability zone in much the same method as the instance_id is obtained.
In this case: