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

Pipelines: Support creating lambdas where code is in another repository #13600

Closed
2 tasks
Gtofig opened this issue Mar 15, 2021 · 2 comments
Closed
2 tasks

Pipelines: Support creating lambdas where code is in another repository #13600

Gtofig opened this issue Mar 15, 2021 · 2 comments
Assignees
Labels
@aws-cdk/aws-lambda Related to AWS Lambda @aws-cdk/pipelines CDK Pipelines library feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.

Comments

@Gtofig
Copy link
Contributor

Gtofig commented Mar 15, 2021

Provide a mechanism to construct lambda Code object from a build artifact

Use Case

In the standard CodePipeline world I would use CfnParametersCode to pass lambda code and would use CloudFormationCreateUpdateStackAction with parameterOverrides to pass lambda code from the build artifact. However, CDK Pipeline has no means to override CFN parameters, therefore this method no longer works. Using Code.fromAsset only works when lambda code is in the same repo, and I don't think there is any other way to create lambda function where code comes from another repository.

I also tried using Code.fromBucket(Bucket.fromBucketName(this, 'ServiceBuildArtifactBucket', serviceBuildArtifact.bucketName), serviceBuildArtifact.objectKey) but this fails with Template Error: Encountered unsupported function: Fn::GetArtifactAtt.

Proposed Solution

Either allow overriding CFN parameters in CDK Pipeline, or provide a new mechanism to create Code object (ex: Code.fromArtifact) with a solution around Fn::GetArtifactAtt issue.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@Gtofig Gtofig added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 15, 2021
@github-actions github-actions bot added @aws-cdk/aws-lambda Related to AWS Lambda @aws-cdk/pipelines CDK Pipelines library labels Mar 15, 2021
@Gtofig Gtofig changed the title Pipelines: Support constructing @aws-cdk/aws-lambda.Code from build artifact Pipelines: Support creating lambdas where code is in another repository Mar 15, 2021
@rix0rrr
Copy link
Contributor

rix0rrr commented Mar 16, 2021

I see where you're coming from, but this is not a design goal we're targeting for CDK Pipelines.

We are targeting CDK apps using assets.

If you want a "just-so" Pipeline that looks and behaves exactly like you want to, I recommend you use the aws-codepipeline construct library to build that pipeline.

@rix0rrr rix0rrr closed this as completed Mar 16, 2021
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

99heitor added a commit to 99heitor/telegram-command-handler-cdk that referenced this issue Mar 20, 2021
The former doesn't support lambdas with code in another repository: aws/aws-cdk#13600
99heitor added a commit to 99heitor/telegram-command-handler-cdk that referenced this issue Mar 20, 2021
The former doesn't support lambdas with code in another repository: aws/aws-cdk#13600
mergify bot pushed a commit that referenced this issue Sep 13, 2024
…nt Target (#31435)

### Issue # (if applicable)

Closes #31428.

### Reason for this change
Kinesis Stream Event Target supports Dead Letter Queue (DLQ).
But current [KinesisStream](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.KinesisStream.html) class in `events-target` does not support it.


### Description of changes
Modified [KinesisStreamProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.KinesisStreamProps.html) to extend [TargetBaseProps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.TargetBaseProps.html), enabling the configuration of DLQ and retry policy.

This change has also been applied to other resources in #13600.



### Description of how you validated changes
Add a unit test and an integ test.



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https:/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https:/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*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 @aws-cdk/pipelines CDK Pipelines library feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

3 participants