AWS Elastic Beanstalk Temporary Credentials


(stellerm) #1

Does the Elastic Beanstalk Step Template support the use of a profile for temporary credentials. When trying to do this I get the following error:

Starting AWSdeploy
09:22:55 Info | Scanning configuration.
09:22:55 Info | …inspecting application ‘XXX’ for environment ‘XXXXX’ and version ‘v20180515142255’
09:22:55 Info | [Error]: Caught AmazonElasticBeanstalkException probing for existing app XXX with environment XXXX, message No account found for the given parameters
09:22:55 Error | Failed to parse deployment configuration file: Deployment failed during post-processing of configuration settings.
09:23:29 Error | Get-EBEnvironment : No credentials specified or obtained from persisted/shell defaults.
09:23:29 Error | At C:\Octopus\Work\20180515142249-51935-356\Script.ps1:52 char:17
09:23:29 Error | + $ebHealth = Get-EBEnvironment -AccessKey “$AccessKey” -SecretKey "$SecretKey …
09:23:29 Error | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
09:23:29 Error | + CategoryInfo : InvalidOperation: (Amazon.PowerShe…vironmentCmdlet:GetEBEnvironmentCmdlet) [Get-EBEnvi
09:23:29 Error | ronment], InvalidOperationException
09:23:29 Error | + FullyQualifiedErrorId : InvalidOperationException,Amazon.PowerShell.Cmdlets.EB.GetEBEnvironmentCmdlet
09:23:29 Verbose | Process C:\Windows\system32\WindowsPowershell\v1.0\PowerShell.exe in C:\Octopus\Work\20180515142249-51935-356 exited with code 1
09:23:29 Verbose | Updating manifest with output variables
09:23:29 Verbose | Updating manifest with action evaluated variables
09:23:29 Error | The remote script failed with exit code 1

(Shaun Marx) #2

Hi stellerm, thanks for reaching out.

I believe this is something you would have to ask the community step author as we don’t officially support these. The step is open source so you are more than welcome to have a look at the step here as well.

The step does seem to suggest that a profile can be used, but one thing to keep in mind is that the community steps are usually script steps, so you could copy the Powershell and change it as needed. In this case, though, it does seem like the profile could not be found for the associated account wherever the step is executing whether that be tentacle or server.

Shaun Marx

(stellerm) #3

Thanks for getting back to me Shaun. Yeah, I ended up copying the script and made my own custom step template that just required a Profile Name. The error was happening because on a previous deployment step - when I created the profile - it was stored under a different user (system) and when the actual AWS deploy step ran it was running under our service account. So, it couldn’t find the profile based on current user. Cheers!!!

(Shaun Marx) #4

No problem at all. I am glad to hear you managed to get it working.

Let us know if there is anything else we can help with! :slight_smile:

Shaun Marx