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

deploy-serverless fails if all resources do not have Properties keys #30

Closed
ndabas opened this issue Aug 22, 2018 · 2 comments
Closed
Labels
bug This issue is a bug. module/cli-ext

Comments

@ndabas
Copy link

ndabas commented Aug 22, 2018

When running dotnet lambda deploy-serverless, it fails if I have a minimal resource definition with no Properties key like this:

...
  UploadsBucket:
    Type: AWS::S3::Bucket

I get:

...
Uploading to S3. (Bucket: xxx Key: xxx.zip)
... Progress: 10%
... Progress: 21%
... Progress: 24%
... Progress: 29%
... Progress: 40%
... Progress: 51%
... Progress: 54%
... Progress: 59%
... Progress: 70%
... Progress: 81%
... Progress: 84%
... Progress: 89%
... Progress: 100%
Unknown error executing command: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Amazon.Lambda.Tools.LambdaUtilities.UpdateCodeLocationInYamlTemplate(String templateBody, String s3Bucket, String
s3Key)
   at Amazon.Lambda.Tools.Commands.DeployServerlessCommand.<PerformActionAsync>d__63.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Amazon.Common.DotNetCli.Tools.Commands.BaseCommand`1.<ExecuteAsync>d__10.MoveNext()

If I just change that definition to this it works fine:

...
  UploadsBucket:
    Type: AWS::S3::Bucket
    Properties: {}
@normj normj added the bug This issue is a bug. label Aug 23, 2018
@normj
Copy link
Member

normj commented Aug 23, 2018

Thanks for the bug report. I'll take a look.

@normj
Copy link
Member

normj commented Sep 17, 2019

The fix for this has been shipped as part of version 3.3.1 of Amazon.Lambda.Tools 3.3.1

eae664c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. module/cli-ext
Projects
None yet
Development

No branches or pull requests

3 participants