Skip to content
the broadcast

networking, computing, virtualization, automation

AWS

Amazon AWS – Use IAM-role to authenticate python-script on EC2-Instance to S3-API

2018-02-28
By: ron
On: 2018-02-28
In: automation, AWS, Cloud
With: 0 Comments

Today i wanted to stop using hard-coded S3-Credentials in my scripts running on EC2-Instances. Create an IAM-Role Services IAM Roles [Create Role] Select type of trusted entity AWS-Service EC2 [Next: Permissions] Attach permissions policies AmazonS3ReadOnlyAccess Review Role name: READ_S3 Attach Role to EC2-Instance Services EC2 Instances Instance Settings attach IAM-Role READ_S3 Prepare Linux Setup Within the EC2-Instance to which the IAM-Role has been attached. Check Access to „meta-data“ => „IAM“ => „Security-Credentials“ The Script has to know the name of the role to use. Fetch the IAM-Role-Credentials using python.requests() Attention: recreated the Role in the meantime, so the credentials have been modified. Use the credentialsRead More →

Kategorien

  • AI
  • automation
  • awayfromevernote
  • AWS
  • Azure
  • client
  • Cloud
  • linux
  • pub
  • Scripting
  • stupid defaults
  • Uncategorized
  • wan
  • Windows

Neueste Beiträge

  • Visio Diagrams with Python: Resize to fit
  • Visio Diagrams with Python: Colors
  • Visio Diagrams with Python: Connectors
  • Visio Diagrams with Python: Stencils
  • Visio Diagrams with Python using COM

Schlagwörter

ACU AI Ansible Automation AWS Azure bestpractice chrome Cisco COM Compute Unit Controller cot CSR1000v Ethernet Firefox hsts Hyperconverged KVM Lab Linux Monitoring MTU NAPALM Nested nexus nxos PowerShell Proactive productivity Python QoS REST Scapy Scripting Security SKU todo UCSD Virtualization Visio VMware WAN Windows Wordpress

Impressum

Impressum

Designed using Dispatch. Powered by WordPress.