Check that you are using a trusty
distro, on Ubuntu:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Check that you are using a trusty
distro, on Ubuntu:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
Make sure the following packages are installed
sudo apt-get install gdebi libncurses5:i386 libstdc++6:i386
Then install the Intel Phone Flash Tool Lite (cfr. their website), the key tool chain Intel provides to flash the Intel Edison board.
sudo gdebi phoneflashtoollite_5.2.4.0_linux_x86_64.deb
Then you should be able to find the gui (graphical user interface) at /usr/bin/phoneflashtoollite
and the cli (command line interface) at /usr/bin/phoneflashtoollitecli
.
// YYYY-MM-DDTHH:mm:ssZ
// date ---> string
java.time.format.DateTimeFormatter.ISO_INSTANT.format(java.time.ZonedDateTime.now().truncatedTo(java.time.temporal.ChronoUnit.SECONDS))
// string ---> date
java.time.ZonedDateTime.parse('2016-07-18T13:26:45Z', java.time.format.DateTimeFormatter.ISO_INSTANT.withZone(java.time.ZoneOffset.UTC))
To get temporary credentials from within an EC2 instance for a given IAM role iam_role
:
import urllib2
import json
# Instance metadata docs:
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#instance-metadata-security-credentials
http_data = urllib2.urlopen('http://169.254.169.254/latest/meta-data/iam/security-credentials/'+iam_role)