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

Add support for local code artifacts #30

Open
gurdiga opened this issue Oct 14, 2019 · 0 comments
Open

Add support for local code artifacts #30

gurdiga opened this issue Oct 14, 2019 · 0 comments

Comments

@gurdiga
Copy link

gurdiga commented Oct 14, 2019

The example code in the Uploading Local Artifacts to an S3 Bucket doc says that the Code property of a AWS::Lambda::Function resource can be a string (pathname) for the purpose of using it with the aws cloudformation package command which then replaces it (in its output) with a proper Code value.

I’m not sure how to incorporate this new type option for Code, or if it’s the right way to approach it, so I’m just bringing it up for discussion here.


NOTE: The docs are a bit outdated and there is a PR to fix them, but I have tested it with aws cloudformation package command and it seems to accept and properly handle the pathname as documented.

NOTE2: For now, I worked around this limitation with a “double type assertion”:

import {Code} from "cloudform-types/types/lambda/function";

/* ... */
const FunctionCode = new Lambda.Function({
  /* ... more props */
  Code: ("/Users/vlad/src/repetitor.tsx/src/cloud/aws/lambda/test-lambda/" as any) as Code
}
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

1 participant