Boto Config File
Boto是AWS SDK for Python,可以通过pip安装,也可以下载源码直接安装。直接安装挺方便的。
安装后参照AWS给出的Sample Project,连接S3,遍历一下buckets,获取指定的bucket,都挺简单的。
但是忘记了做一件事,没有“export access keys to environment variables”。模仿Sample只能把access key ID和secret access key作为参数写在代码里。
回过头看文档,再找到Boto Config的文档,然后就傻乎乎地试图去找到文档里提到的"boto.cfg"和".boto",折腾半天没找到。
浪费不少时间之后才明白,boto installer是不会自动创建这个config文件的。手动创建一个,放到该放的地方就可以了。
哪些地方是该放的地方呢?Unix/Linux系统里,boto按照这个顺序寻找config文件。
- /etc/boto.cfg - for site-wide settings that all users on this machine will use
- ~/.boto - for user-specific settings
- ~/.aws/credentials - for credentials shared between SDKs
当然,这也不是必须的,可以把config文件放到任何地方,然后在环境变量里配置BOTO_CONFIG
。如果是Windows系统咋办?Stackoverflow上这个问题的回答可行。
- Create your file with the name you want(e.g boto_config.cfg) and place it in a location of your choice
- Create an environment variable with the Name='BOTO_CONFIG' and Value= file_location/file_name
- Boto is now ready to work with credentials automatically configured!
当然,最权威的是仔细看Boto Config文档,这里也介绍了在config文件里如何配置Credentials。
Boto Config File的更多相关文章
- [笔记]HAproxy reload config file with uninterrupt session
HAProxy is a high performance load balancer. It is very light-weight, and free, making it a great op ...
- error in config file "/etc/rabbitmq/rabbitmq.config"
记录一次RabbitMQ配置文件配置错误 error信息: dill@ubuntu-vm:/usr/share/doc/rabbitmq-server$ sudo /usr/lib/rabbitmq/ ...
- .NET错误The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework
错误描述: The 'targetFramework' attribute in the <compilation> element of the Web.config file is u ...
- No connection string named '***' could be found in the application config file
Code-First时更新数据库遇到妖孽问题“No connection string named '***' could be found in the application config fil ...
- Camel routes in Spring config file
The normal spring bean definition configuration file, the xsi:schemaLocation only has two: beans and ...
- 为 vsftpd 启动 vsftpd:500 OOPS: bad bool value in config file for: pasv_enable
每行的值都不要有空格,否则启动时会出现错误,举个例子,假如我在listen=YES后多了个空格,那我启动时就出现.. 为 vsftpd 启动 vsftpd:500 OOPS: bad bool val ...
- Warning: World-writable config file '/etc/my.cnf' is ignored
1. 问题描述: 重启mysql服务时出现以下信息: Warning: World-writable config file '/etc/my.cnf' is ignored 出现这种情况的原因是:m ...
- MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored
MySQL无法重启问题解决Warning: World-writable config file ‘/etc/my.cnf’ is ignored
- Create a custom configSection in web.config or app.config file
config file: <?xml version="1.0" encoding="utf-8" ?> <configuration> ...
随机推荐
- flask开发微信公众号
1.进入微信公众号首页,进行注册登录 https://mp.weixin.qq.com/ 2.进入个人首页,进行公众号设置 可参照 公众号文档 进行开发 开发前 先阅读 接口权限列表 3.配置服务器 ...
- C++程序员面试题目总结(涉及C++基础、多线程多进程、网络编程、数据结构与算法)
说明:C++程序员面试题目总结(涉及C++基础知识.多线程多进程.TCP/IP网络编程.Linux操作.数据结构与算法) 内容来自作者看过的帖子或者看过的文章,个人整理自互联网,如有侵权,请联系作者 ...
- JavaScript初探三
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...
- spring boot 自动更新静态文件和后台代码 -- 热部署
在spring boot使用的过程中, 发现我修改了静态文件, 前台刷新后, 没有任何变化, 必须重新启动, 才能看到, 这简直不能让人接受. 那有什么方法来解决这个问题呢. Baidu之后, 得到了 ...
- SpringBoot入门 (九) MQ使用
本文记录学习在Spring Boot中使用MQ. 一 什么是MQ MQ全称(Message Queue)又名消息队列,是一种异步通讯的中间件.它的作用类似于邮局,发信人(生产者)只需要将信(消息)交给 ...
- PPT定时器小记
在日常会议汇报中,往往会出现超时的情况.此时需要一种优雅提醒讲演者加快速度的方式.PPT定时器就是其中的一种方法. ppttimer,一款在GitHub上发布的开源软件,基本能满足我在本项工作中的需求 ...
- js设计模式之发布/订阅模式模式
一.前言 发布订阅模式,基于一个主题/事件通道,希望接收通知的对象(称为subscriber)通过自定义事件订阅主题,被激活事件的对象(称为publisher)通过发布主题事件的方式被通知. 就和用户 ...
- HashMap底层原理分析(put、get方法)
1.HashMap底层原理分析(put.get方法) HashMap底层是通过数组加链表的结构来实现的.HashMap通过计算key的hashCode来计算hash值,只要hashCode一样,那ha ...
- C# Owin 创建与测试自己的中间件Middleware(二)
本文纯属介绍怎么简单地创建自己的Owin.还没有理解owin概念的请看上一篇文章:http://www.cnblogs.com/alunchen/p/7049307.html 目录 1.创建项目 2. ...
- 【转】GDI+中发生一般性错误的解决办法
今天在开发.net引用程序中,需要System.Drawing.Image.Save 创建图片,debug的时候程序一切正常,可是发布到IIS后缺提示出现“GDI+中发生一般性错误”的异常. 于是开始 ...