Last active
March 14, 2019 01:40
-
-
Save ginokent/0d726fb6e662b867786ea964bc23d3b6 to your computer and use it in GitHub Desktop.
boto3 で profile 名を指定して new client
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from boto3.session import Session | |
session = Session(profile_name='YOUR_AWS_PROFILE_NAME') | |
ec2 = session.client('ec2') | |
ec2.describe_instances() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment