racl101 + aws   299

Enable Access Logs for Your Classic Load Balancer - Elastic Load Balancing
TLDR: this is the page that demonstrates how to create a bucket in S3, give it the policies it needs for the Elastic Load Balancer service to write access logs to it.
amazon  aws  s3  howto  enable  load  balancer  access  logs  elb  logging  example  guide  reference  documentation  tutorial 
october 2018 by racl101
Running Commands on Your Linux Instance at Launch - Amazon Elastic Compute Cloud
In practice, this feature works for a few commands, like installing the SSM agent, but it doesn't work for a lot of commands, especially if they take time (are blocking). For that it's better to launch them with the bare minimum (install ssm agent, python) and then use an ansible playbook to install the rest.
aws  documentation  guide  reference  howto  run  shell  commands  linux  instance  launch  ansible  playbook 
august 2018 by racl101
Launching an Instance from a Launch Template - Amazon Elastic Compute Cloud
Launch templates actually work if you launch ec2 instances the same way every time. By 'same way', however, I mean same volume size, same volume type, same security groups, same subnet, etc. However, this service is not ideal for launching, say LAMP servers, with same configuration. For that you should either use an Ansible playbook or and/or create your own AMI and launch instances from that. In other words, don't use the User Data EC2 setting to run a bunch of commands as it is not reliable.
aws  documentation  guide  reference  howto  tutorial  launch  instance  ec2  from  template 
august 2018 by racl101
Boto 3 Documentation — Boto 3 Docs 1.7.80 documentation
Excellent library to use the AWS CLI but with a Python library wrapping it. If you hate using the Bash Shell script to work with AWS CLI and love Python 2.7 then use this library.

So far, I've tried it for the following services:

- EC2
- S3
- Scaling Groups
boto3  python  python2.7  documentation  guide  reference  aws  cli  sdk  ec2  s3  library  module 
august 2018 by racl101
ansible - how to define ssh private key for servers fetched by dynamic inventory in files - Stack Overflow
if you don't want to have to create a file in group_vars with an odd name like tag_Name_server1.yml and you happen to know that all your AWS EC2 instances might share the same SSH keys you could do something like this: ansible -i ./inventory/ec2.py --limit "tag_Name_server1" -m ping all and then just create this file: ./inventory/group_vars/all.yml . So even though you're using all the --limit option filters the number of hosts to only those with the right tag/value combination.
stackoverflow  ansible  howto  define  ssh  private  key  aws  ec2  servers  hosts  fetched  from  dynamic  inventory  scripts  connection  interpreter  example  guide  reference  group  variables  group_vars 
july 2018 by racl101
Ansible dynamic inventory with AWS EC2 · Keep moving
Really good tutorial explaining how to actually use AWS EC2 dynamic inventory script (ec2.py) AND how to limit the instances you want to run your ansible commands or ansible playbooks on using the --limit option by leveraging EC2 tags.
blog  tutorial  howto  example  guide  reference  ansible  dynamic  inventory  script  python  aws  ec2  tags 
july 2018 by racl101
Working With Dynamic Inventory — Ansible Documentation
When working with AWS EC2 dynamic inventory script refer to this blog post tutorial which demonstrates how to use the --limit option when running the ansible / ansible-playbook commands in tandem with EC2 tags to target the hosts you want to run playbook on.

ansible  documentation  guide  reference  howto  dynamic  inventory  example  tutorial  amazon  aws  ec2  script 
july 2018 by racl101
Troubleshooting Systems Manager Run Command - AWS Systems Manager
If your instances don't show up on SSM service console check the following:

- If using non admin/account owner users (i.e. IAM users) check if they have the right policies attached to them.
- Do the EC2 instances in question have SSM Agent software installed on them
- Do the EC2 instances in question have the Role containing the policy named AmazonEC2RoleforSSM attached to it and, if so, has the instance been restarted after having the role attached to it?
- Is type of command that is being run available for the OS in question
aws  amazon  ssm  howto  troubleshoot  guide  reference  ec2  instance  role  policy  user  iam  fix  toread  tolearn  tounderstand 
july 2018 by racl101
Configuring Access to Systems Manager - AWS Systems Manager
To be able to use AWS SSM service on EC2 instances (which allows one to run shell scripts by having AWS invoke script execution directly) you need to configure the users invoking the ssm service directly with the right policies and configure the EC2 instances with the proper roles.
aws  documentation  guide  reference  ssm  systems  manager  prerequisite  toread  tolearn  tounderstand  configuration  policy  policies  roles  ec2  iam  users 
july 2018 by racl101
Using aws-cli --query Option To Simplify Output - Alestic.com
Nice little tutorial demonstrating how to capture AWS command output from Bash Shell scripts into variables to use in scripts.

e.g. Get the status of an RDS Instance e.g. started, stopped, starting, stopping, modifying that sort of thing. You can do it like this:

rds_instance_status=$(aws --profile my-profile rds describe-db-instances --db-instance-identifier helis-staging-rds-instance-1 --query 'DBInstances[0].DBInstanceStatus')

Note that the query option drills down the output, which, by default is returned as JSON text.
blog  tutorial  howto  example  guide  reference  capture  aws  cli  commandline  output  bash  shell  script  query  json  totry  tolearn  tounderstand 
july 2018 by racl101
RDS — Boto 3 Docs 1.7.50 documentation

waiter = rds_client.get_waiter('db_instance_available')

boto3  aws  python  python2.7  library  module  documentation  guide  reference  rds  service  waiter  wait  classes 
july 2018 by racl101
RDS — Boto 3 Docs 1.7.50 documentation
e.g. response=rds_client.start_db_instance(DBInstanceIdentifier=rds_instance_identifier)
boto3  aws  python  python2.7  library  module  documentation  guide  reference  rds  service  client  commands 
july 2018 by racl101
How to use Python Boto3 to list Instances in Amazon AWS – Super Library of Solutions
Shows a simple example of how to begin using boto3 library for Python in the simplest of ways.

When reading through the library it's not very clear from the get go how to select a saved profile your ~/.aws/credentials directory which you create when you install the awscli tool into your development machine and configure with $ aws configure command. So here's how you quickly select a profile to create a session for boto3 and then create an s3 client for example.

session = boto3.Session(profile_name='my-profile-name')

s3_client = session.client('s3')

Now with your client you run commands. For example, to list all buckets run:

blog  tutorial  boto3  python  python2.7  aws  amazon  cli  script  howto  example  ec2  guide  reference  totry  tolearn  tounderstand 
july 2018 by racl101
Update Amazon RDS max_connections with Parameter Group · Issue #16 · jollygoodcode/jollygoodcode.github.io
This thread discussion might provide some insight into manually increasing the mysql max_connections option / setting manually and overriding Amazon's AWS "sensible" defaults.
github  forum  aws  amazon  howto  override  change  mysql  database  db  option  variable  max_connections  setting  totry  example  guide  reference 
april 2018 by racl101
« earlier      
per page:    204080120160

related tags

--query  access  account  accounts  acl  add  additional  advice  agent  aim  alarm  algorithm  all  allow  amazon  amazonlinux  amazonlinux2  Amazons3  ami  Analytics  analyzer  ansible  apache  api  app  application  arn  arns  askubuntu  assume  athena  attach  attack  Auth  Authenticate  authentication  authorization  authorized_keys  auto  Autthentication  availability  available  aws  awscli  Awstats  back  backend  bad  balancer  balancing  based  bash  beanstalk  best  bestpractices  billing  bitnami  bittorrent  block  blog  boto  boto3  bower  browser  bucket  Buckets  Bug  cache  calculator  cancel  capistrano  capture  cdn  certificate  certificates  certification  change  check  checklist  checks  chrome  classes  classic  cli  client  cloud  cloudfront  cloudwatch  code  Codes  COgnito  COgnitoidentity  command  commandline  commandlineinterface  commands  comparison  composer  compute  config  configuration  configure  connect  connection  connections  content  continuous  continuousintegration  control  conventions  cookie  copy  core  Cors  cost  costs  course  cpu  create  creation  Credential  credentials  crossorigin  custom  customer  DATa  database  databases  db  define  delegate  delete  delivery  deploy  deployment  deregister  describe  desired  developer  development  device  devops  difference  disconnect  discussion  diy  dns  documentation  domain  download  dynamic  dzone  ebs  ec2  ecu  elastic  elasticache  elasticbeanstalk  elb  elements  email  enable  encryption  end  endpoint  endpoints  entry  environment  error  errors  etag  Event  example  examples  existing  explanation  expression  extra  facing  facts  faq  fees  fetched  file  files  filesystem  filter  Fineuploader  firewall  fix  flow  Forge  format  forum  forums  framework  free  from  gateway  generator  get  getting  gettingstarted  gist  Git  github  Google  gotcha  grant  group  groups  group_vars  guide  guides  handle  header  headless  health  host  hosting  hostname  hosts  hotlinking  howto  htaccess  http  https  iam  icmp  ID  identifiers  identities  identity  image  Images  importing  inbound  index  information  infrastructure  input  install  installation  instance  instances  integration  Inter  interesting  interfaces  internet  interpreter  intro  inventory  io  iops  ip  issue  iterator  JAVA  javascript  jenkins  jmespath  json  key  keys  lambda  lamp  landingpage  language  laravel  laravel4  laravel5  launch  less  library  lightsail  limit  limitation  limitations  linux  list  listener  listing  load  local  localhost  locations  log  logfile  logging  login  logs  lumen  machine  macos  macosx  management  manager  manual  mapping  mariadb  marketplace  Mattstauffer  max  maximum  max_connection  max_connections  medium  memory  metadata  method  metrics  microservices  migration  min  missing  mitm  module  money  monitoring  mount  multi  mysql  name  naming  net  netstat  network  networking  new  nginx  node  nodejs  notifications  object  official  operations  option  options  output  override  overview  package  packagist  paginator  paginators  pair  parse  partition  password  PATH  pattern  pays  peformance  pem  performance  permission  permissions  php  php-fpm  php5.6  phpmyadmin  ping  plan  plans  platform  platforms  playbook  policies  policy  polling  port  prerequisite  prerequisites  prevent  pricing  primer  private  product  production  products  programmatically  project  promises  provider  public  python  python2.7  query  queue  quickstart  rails  ram  rates  rds  read  redirect  redis  reference  regex  region  regions  regularexpression  relational  remote  replace  replicas  report  request  requester  requests  requirements  reserved  resource  resources  responsecodes  responses  rest  RESTrictions  results  robin  role  roles  root  ror  round  ruby  rubyonrails  rule  run  run-instance  s3  s3client  S3stat  sample  scaling  scenarios  school  scp  screencast  script  scripts  sdk  secret  secret.yml  secure  security  securitytokenservice  selenium  server  serverfault  serverless  servers  service  services  ses  Set  setting  settings  setup  share  sharing  shell  sierra  signing  silent  simple  Simplestorageservice  single  size  sizes  snap  Software  specialist  specify  specs  spreadsheets  sqs  ssd  ssh  ssl  ssm  stack  stackexchange  stackoverflow  started  status  stickiness  storage  storing  stream  sts  support  supported  systems  tag  tagging  tags  tcpdump  telnet  template  temporary  testing  the  thread  tier  timeout  tips  tocheckout  toleaern  tolearn  tool  toread  totry  tounderstand  traffic  transactional  transferring  tricks  troubleshoot  troubleshooting  troubleshot  tunderstand  tutorial  tutorials  Type  types  ubuntu  ubuntu16.04  udemy  unit  units  unix  unmount  update  upgrade  upload  url  usage  use  user  users  Uuid  V2  V3  variable  variables  video  virtual  volume  vpc  vps  wait  waiter  walkthrough  web  webservices  worker  workflow  wrapper  write  Xmal  yaml  youtube  zone 

Copy this bookmark: