建立一个流浪框在EC2上,如何让"会话令牌" [英] Setting up a Vagrant box on EC2, how to get the "session token"
本文介绍了建立一个流浪框在EC2上,如何让"会话令牌"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有:
- 在一个AWS账户免费梯队
- 在一个Ubuntu 14.04 LTS笔记本采用了PEM文件,我可以创建EC2 实例和SSH放进去。
- 在安装在我的笔记本电脑AWS命令行
- 安装在笔记本电脑流浪
- 在安装上流浪AWS插件
- An AWS account with free tier
- An Ubuntu 14.04 LTS laptop with a PEM file, and I can create EC2 instances, and SSH into them.
- AWS command line installed on my laptop
- Vagrant installed on the laptop
- AWS plugin installed on Vagrant
在 AWS插件自述文件它给出了一个流浪文件的模板:
In the AWS plugin readme file it gives a template for a Vagrant file:
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "YOUR KEY"
aws.secret_access_key = "YOUR SECRET KEY"
aws.session_token = "SESSION TOKEN"
aws.keypair_name = "KEYPAIR NAME"
aws.ami = "ami-7747d01e"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
end
end
我要如何aws.session_token =会话令牌?
How do I get aws.session_token = "SESSION TOKEN" ?
推荐答案
session_token
是STS(安全令牌服务)会话令牌。
session_token
is the STS (Security Token Service) session token.
您将获得从亚马逊CLI值(安装和配置您的帐户工作)
you would get the value from amazon CLI (installed and configured to work with your account)
fhenri@machine:~$ aws sts get-session-token --duration-seconds 129600
{
"Credentials": {
"SecretAccessKey": "xxxxxxxx",
"SessionToken": "your token value",
"Expiration": "2015-11-12T14:23:22Z",
"AccessKeyId": "xxxxxx"
}
}
这篇关于建立一个流浪框在EC2上,如何让"会话令牌"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文