简体   繁体   English

使用AWS Powershell部署到AWS弹性beanstalk

[英]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

  • Get-EBEnvironment -ApplicationName evcfacade Get-EBEnvironment -ApplicationName evcfacade
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    • CategoryInfo : InvalidOperation: (Amazon.PowerShe...vironmentCmdlet:GetEBEnvironmentCmdlet) [Get-EBEnvironment], InvalidOperationException CategoryInfo:InvalidOperation :( Amazon.PowerShe ... vironmentCmdlet:GetEBEnvironmentCmdlet)[Get-EBEnvironment],InvalidOperationException
    • FullyQualifiedErrorId : InvalidOperationException,Amazon.PowerShell.Cmdlets.EB.GetEBEnvironmentCmdlet FullyQualifiedErrorId:InvalidOperationException,Amazon.PowerShell.Cmdlets.EB.GetEBEnvironmentCmdlet

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种可能的解决方案:

  1. Include the -Region parameter, such as -Region us-east-1 . 包括-Region参数,例如-Region us-east-1 See Get-EBEnvironment Cmdlet . 请参阅Get-EBEnvironment Cmdlet Or 要么
  2. Use the Set-DefaultAWSRegion cmdlet to set the default region. 使用Set-DefaultAWSRegion cmdlet设置默认区域。 See Set-DefaultAWSRegion Cmdlet 请参见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.

相关问题 无法使AWS Elastic Beanstalk命令行工具在Windows 8上运行。获取以下PowerShell错误? - Can't get AWS Elastic Beanstalk Command Line Tool to work on Windows 8. Get the following PowerShell error? 使用 Powershell 的 AWS SES - AWS SES using powershell 在PowerShell中是否存在等效的“ aws deploy push”? - Does the equivalent of “aws deploy push” in PowerShell exist? 如何获得在AWS Beanstalk Windows实例上运行的PostInstall PowerShell脚本 - How to get a postInstall PowerShell script working on an AWS Beanstalk Windows instance 使用AWS PowerShell API的AWS SSO登录 - AWS SSO login using aws powershell api 如何在 AWS Elastic Beanstalk 中将应用程序池分配给不同的 ASP.Net Core 网站? - How to assign Application Pools to different ASP.Net Core web sites in AWS Elastic Beanstalk? 如何在 Windows 服务器上的 Elastic Beanstalk 部署中正确使用 AWS Secrets Manager - How to properly use AWS Secrets Manager in a Elastic Beanstalk Deployment on Windows Server 如何在 azure 管道中部署 Elastic beanstalk - How to deploy Elastic beanstalk in azure pipelines 使用 IAM 角色,脚本在 AWS cli 中有效,但在 AWS Tools for powershell 中无效 - Using an IAM Role, a script works in AWS cli, but not in AWS Tools for powershell aws cli:aws kms使用powershell加密/解密 - aws cli: aws kms encrypt/decrypt using powershell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM