4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:python tag:aws — newest first
  • Apache Hadoop Amazon Web Services support – Working with IAM Assumed Roles
    April 22, 2020 - permalink - https://hadoop.apache.org/docs/current/hadoop-aws/tools/hadoop-aws/assumed_roles.html
    assume aws hadoop python role spark
  • GitHub - jkehler/awslambda-psycopg2
    September 2, 2019 - permalink - https://github.com/jkehler/awslambda-psycopg2
    aws lambda postgresql psycopg2 python
  • AWS re:Invent 2014 | (DEV307) Introduction to Version 3 of the AWS SDK for Python (Boto) - YouTube
    May 12, 2019 - permalink - https://www.youtube.com/watch?v=Cb2czfCV4Dg
    aws boto3 python
  • Note: some draft about monitoring beanstalk applications health with boto3 python script

    import pprint
    p = pprint.PrettyPrinter(indent=4)
    p.pprint(x)

    or

    import pprint
    pprint.pformat(x)

    import logging
    import pprint
    logging.info(pprint.pformat(dict))

    $ cat monitor_beanstalk.py

    !/bin/python

    import boto3
    import pprint
    pp = pprint.PrettyPrinter(indent=4)

    List all env and status and instances health

    client = boto3.client('elasticbeanstalk')

    envs = client.describe_environments()['Environments']

    pp.pprint(envs)

    for env in envs:
    print 'ApplicationName: {} EnvironmentName: {} Health: {} HealthStatus: {} Status: {}'.format(env['ApplicationName'].ljust(30),env['EnvironmentName'].ljust(30),env['Health'].ljust(10),env.get('HealthStatus', 'N/A').ljust(10),env['Status'].ljust(10))
    if (env['Health'] != 'Green') or (env.get('HealthStatus', 'N/A') != 'Ok' and env.get('HealthStatus', 'N/A') != 'N/A'):
    print '\nProblem'
    details = client.describe_environment_health(EnvironmentName=env['EnvironmentName'],AttributeNames=['All'])
    #pp.pprint(details)
    print details['Causes']
    print details['InstancesHealth']
    print '\n'

    June 15, 2017 - permalink - https://links.infomee.fr/shaare/eFFzMg
    aws beanstalk boto nomarkdown pprint python
  • Note: boto3 subnet sorted by name

    subnets = ec2.subnets.all()
    subnets_sorted = sorted(subnets, key=lambda k: k.tags[next(index for (index, d) in enumerate(k.tags) if d["Key"] == "Name")]['Value'])

    Well, my python level is not good enough to clearly understand this but my Google level was largely enough to build this

    March 24, 2017 - permalink - https://links.infomee.fr/shaare/Fn--jw
    aws boto boto3 python
  • Quickstart — Boto 3 Docs 1.4.0 documentation
    September 29, 2016 - permalink - http://boto3.readthedocs.io/en/latest/guide/quickstart.html
    aws boto python
  • Kit SDK AWS pour Python

    Un sdk en python pour aws

    https://boto3.readthedocs.io/en/latest/guide/resources.html

    August 16, 2016 - permalink - https://aws.amazon.com/fr/sdk-for-python/
    aws python sdk