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
  • Certification
  • client
  • Cloud
  • Development
  • homelab
  • linux
  • pub
  • Scripting
  • stupid defaults
  • Uncategorized
  • wan
  • Windows

Neueste Beiträge

  • Cisco UCS – set SSH idle-timeout
  • IPv4 Documentation Address-Blocks
  • Refresh ENVironment Variables
  • Windows Client Setup: Disable Teredo/ISATAP
  • Cloud-Init for VMs in private and public Clouds

Schlagwörter

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

Impressum

Impressum

Designed using Dispatch. Powered by WordPress.