[英]Using AWS Powershell to deploy to AWS elastic beanstalk
Hi I am trying to deploy onto Elastic Beanstalk using AWS Powershell. 您好我正在尝试使用AWS Powershell部署到Elastic Beanstalk。
Currently I am just trying to get the EB environment using the following cmdlet: + Get-EBEnvironment -ApplicationName -EnvironmentId -VersionLabel -EnvironmentName -IncludedDeletedBackTo -IncludeDeleted 目前我只是尝试使用以下cmdlet获取EB环境:+ Get-EBEnvironment -ApplicationName -EnvironmentId -VersionLabel -EnvironmentName -IncludedDeletedBackTo -IncludeDeleted
This is the cmdlet I used: Get-EBEnvironment -ApplicationName appName 这是我使用的cmdlet:Get-EBEnvironment -ApplicationName appName
However, I am getting the following error: 但是,我收到以下错误:
Get-EBEnvironment : No region specified or obtained from persisted/shell defaults. Get-EBEnvironment:没有指定或从持久/ shell默认值获取的区域。 At C:\\Users\\lowong\\Desktop\\script.ps1:22 char:1
在C:\\ Users \\ lowong \\ Desktop \\ script.ps1:22 char:1
Am I missing other fields I have to put onto the cmdlet? 我是否遗漏了我必须放在cmdlet上的其他字段? or what's the problem?
或者有什么问题?
(Here's the link to the documentation of the cmdlet: http://docs.aws.amazon.com/powershell/latest/reference/index.html?page=New-EBApplicationVersion.html&tocid=New-EBApplicationVersion ) (以下是cmdlet文档的链接: http : //docs.aws.amazon.com/powershell/latest/reference/index.html? page = New-EBApplicationVersion.html& tocid = New-EBApplicationVersion )
The error mentions the following: 该错误提到以下内容:
No region specified or obtained from persisted/shell defaults.
没有指定或从持久/ shell默认值获取的区域。
So, you have 2 possible resolutions: 所以,你有2种可能的解决方案:
-Region
parameter, such as -Region us-east-1
. -Region
参数,例如-Region us-east-1
。 See Get-EBEnvironment Cmdlet . Set-DefaultAWSRegion
cmdlet to set the default region. Set-DefaultAWSRegion
cmdlet设置默认区域。 See Set-DefaultAWSRegion Cmdlet Note that Set-DefaultAWSRegion
is not persisted (you have to specify it for every powershell session). 请注意,
Set-DefaultAWSRegion
不会保留(您必须为每个PowerShell会话指定它)。
If you want to persist region, it can be done as part of setting up your credentials with: 如果您想要保留区域,可以在设置凭据时执行以下操作:
Initialize-AWSDefaults -ProfileName {profileName} -Region {region}
For more information see: Specifying Credentials 有关更多信息,请参阅: 指定凭据
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.