Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not honouring ProfileName parameter #65

Open
codemonkee opened this issue Jul 9, 2020 · 1 comment
Open

Not honouring ProfileName parameter #65

codemonkee opened this issue Jul 9, 2020 · 1 comment

Comments

@codemonkee
Copy link

I've authenticated with AWS and defined a profile named 'et' in the .aws\credentials file.

When doing something like

    $PSCfnPackageParams = @{
      TemplateFile = '.\assets\templates\core-monitoring.yaml'
      OutputTemplateFile = '.\dist\core-monitoring-outps.yaml'
      S3Bucket = $S3BucketAsset
      S3Prefix = 'transformation-lambda'
      ProfileName = 'et'
      Verbose
    }
New-PSCFNPackage @PSCfnPackageParams
VERBOSE: Creating: C:\Users\[user]\AppData\Local\Temp\9d7df934-11a2-4eb0-965e-659b25fcad14\.zip
VERBOSE: Added: index.js
VERBOSE: Added: mapping.js
VERBOSE: Added: package.json
VERBOSE: Invoking Amazon Simple Storage Service (S3) operation 'ListObjects' in region 'us-east-1'
No credentials specified or obtained from persisted/shell defaults.
at Write-S3PackageArtifact, C:\Users\[user]\Documents\PowerShell\Modules\PSCloudFormation\3.0.0\Private\Packager\Write-S3PackageArtifact.ps1: line 85
at Write-Resource, C:\Users\[user]\Documents\PowerShell\Modules\PSCloudFormation\3.0.0\Private\Packager\Write-Resource.ps1: line 141
at <ScriptBlock>, C:\Users\[user]\Documents\PowerShell\Modules\PSCloudFormation\3.0.0\Public\New-PSCFNPackage.ps1: line 390
at New-PSCFNPackage<End>, C:\Users\[user]\Documents\PowerShell\Modules\PSCloudFormation\3.0.0\Public\New-PSCFNPackage.ps1: line 366
at <ScriptBlock>, <No file>: line 1
Exception: C:\Users\[user]\Documents\PowerShell\Modules\PSCloudFormation\3.0.0\Public\New-PSCFNPackage.ps1:441
Line |
 441 |              throw "Error processing template '$TemplateFile'"
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Error processing template '.\assets\templates\core-monitoring.yaml'

If I authenticate and create a profile of 'default' the command works. Setting the ProfileName to et still results in it loading the default profile.

@fireflycons
Copy link
Owner

Hi codemonkee

Sorry for the delayed response. I've been busy rewriting it from the ground up as binary cmdlets to improve performance and code legibility. Please upgrade to the latest version which should now honour ProfileName according to the rules used by other AWS cmdlets.

Let me know if this works.

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants