AWS Credentials

Get the role name wget http://169.254.169.254/latest/meta-data/iam/info will get something like: { “Code” : “Success”, “LastUpdated” : “2020-03-06T20:34:08Z”, “InstanceProfileArn” : “arn:aws:iam::3940394039403:instance-profile/ProfileName”, “InstanceProfileId” : “kasdjaksjakjsa” } or better yet, get the role name from: wget http://169.254.169.254/latest/meta-data/iam/security-credentials It will be the name of the only entry returned. then get credentials with: wget http://169.254.169.254/latest/meta-data/iam/security-credentials/ProfileName Read more…

AWS: VPC DNS Server

From a running ec2, as long as the vpc has DNS support enabled, you can use the vpc dns server to resolve DNS names. It will resolve public AWS names to private IPs if within the VPC. DNS Server 169.254.169.253 References: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html

ElasticBeanstalk logs to Elasticsearch

Install filebeat on RPM Based: sudo rpm –import https://packages.elastic.co/GPG-KEY-elasticsearch create /etc/yum.repos.d/elastic.repo [elastic-6.x] name=Elastic repository for 6.x packages baseurl=https://artifacts.elastic.co/packages/6.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md sudo yum install filebeat on deb based: wget -qO – https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add – sudo apt-get install apt-transport-https echo “deb https://artifacts.elastic.co/packages/6.x/apt stable main” | sudo tee Read more…

RabbitMq Setup

The instructions in this recipe assume a server running Ubuntu 16.04. Update/Upgrade Packages sudo apt-get update sudo apt-get upgrade Install RabbitMq At the time of writing this, Ubuntu 16.04 includes RabbitMq server version 3.6.3. To get a more up-to-date version (3.6.12), you can get it from the rabbitmq “testing” repo. Read more…