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

fix(lambda): deployment failure when layers are added to container functions #15037

Merged
merged 4 commits into from
Jun 10, 2021
Merged

fix(lambda): deployment failure when layers are added to container functions #15037

merged 4 commits into from
Jun 10, 2021

Conversation

mprencipe
Copy link
Contributor

@mprencipe mprencipe commented Jun 8, 2021

This change fixes #14143 by throwing an error during synthesis if layers are used in a container function.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Jun 8, 2021

@peterwoodworth peterwoodworth added the @aws-cdk/aws-lambda Related to AWS Lambda label Jun 8, 2021
@nija-at nija-at changed the title fix(lambda): do not allow layers in container functions fix(lambda): deployment failure when layers are added to container functions Jun 10, 2021
Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mprencipe - Thanks for submitting this PR.

See my comment below.

@@ -65,5 +65,8 @@ export class DockerImageFunction extends Function {
runtime: Runtime.FROM_IMAGE,
code: props.code._bind(),
});
if (props.layers) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to move this into Function instead. Check that the runtime is FROM_IMAGE and fail if a layer is specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

@mergify mergify bot dismissed nija-at’s stale review June 10, 2021 10:11

Pull request has been modified.

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for the PR @mprencipe

@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 66b6f20
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 8127cf2 into aws:master Jun 10, 2021
@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

hollanddd pushed a commit to hollanddd/aws-cdk that referenced this pull request Aug 26, 2021
…nctions (aws#15037)

This change fixes aws#14143 by throwing an error during synthesis if layers are used in a container function.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-lambda Related to AWS Lambda
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(@aws-cdk/aws-lambda): validate that layers must not be used with container functions
4 participants