aws / aws/aws-toolkit-visual-studio
Publish to AWS Lambda error - Unable to load the service index for source
- Dominant language
- No language data
- Stars
- 135
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Publish to AWS Lambda gives following error:
```
Processing CloudFormation resource ProxyFunction
Initiate packaging of . for resource ProxyFunction
Executing publish command
Deleted previous publish folder
... invoking 'dotnet publish', working folder '...\.\bin\Release\netcoreapp2.1\publish'
... Disabling compilation context to reduce package size. If compilation context is needed pass in the "/p:PreserveCompilationContext=false" switch.
... publish: Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
... publish: Copyright (C) Microsoft Corporation. All rights reserved.
... publish: Restore completed in 83.26 ms for ....csproj.
... publish: Restore completed in 83.26 ms for ....csproj.
... publish: Restore completed in 1.06 sec for ....csproj.
... publish: C:\Program Files\dotnet\sdk\2.2.401\NuGet.targets(123,5): error : Unable to load the service index for source https://ournugetstore.pkgs.visualstudio.com/_packaging/ourname/nuget/v3/index.json. [....csproj]
... publish: C:\Program Files\dotnet\sdk\2.2.401\NuGet.targets(123,5): error : Response status code does not indicate success: 401 (Unauthorized). [....csproj]
Failed to create application package
Error packaging up project in ...\. for CloudFormation resource ProxyFunction
```
**To Reproduce**
* have a private NuGet packages source that your use in your project
* publish the project to AWS Lambda
**Expected behavior**
Publish the project to AWS Lambda should work
**Computer (please complete the following information):**
- Windows Version: Windows 10
- Visual Studio Version: Microsoft Visual Studio Professional 2019 Version 16.2.2
- AWS Toolkit for Visual Studio Version: 1.15.2.1
Contributor guide
Research direction
Start with the AWS Lambda publish flow and the packaging step that invokes dotnet publish, then trace how NuGet restore handles the private source shown in the error. Reproduce with a private NuGet feed and verify that publishing completes and creates the Lambda application package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100