aws / aws/aws-cdk

(aws-codepipeline-actions): setting logRetention of a lambdaFunction breaks a previously working pipeline

Open
#12,958 7 comments 3 reactions 0 assignees View on GitHub
@aws-cdk/aws-codepipeline effort/medium feature-request feature/service-integration p2
Dominant language
TypeScript
Stars
12.9k
Forks
4.6k
Avg merge
2d 3h
Merged PRs (30d)
83

Description

I have a little zoo of lambda/codepipeline combinations. They all worked fine until I started setting log retention oof the lambdas by using

```typescript

const handlerFunction = new Function(this, lambdaResourceName.resource, {
logRetention: RetentionDays.ONE_MONTH,
runtime,
code,
timeout: Duration.seconds(120),
handler,
functionName: lambdaResourceName.name,
});
```

Which makes my pipeline error out on 'CloudFormationCreateUpdateStackAction' with a

```
Latest action execution message
Parameters: [AssetParametersHash1S3Bucket8795CE3D, AssetParametersHash1ArtifactHash8DB7EB35, AssetParametersHash1VersionKeyFC482B2A] must have values (Service: AmazonCloudFormation; Status Code: 400; Error Code: ValidationError; Request ID: e6e582d0-1b43-4d51-bf08-be3722dfd580)
```
### Reproduction Steps

1. Create Pipeline/lambda like along https://docs.aws.amazon.com/cdk/latest/guide/codepipeline_example.html
2. deploy (success)
3. Set log retention on the lambda
4. commit / trigger pipeline .... deploy breaks

### What did you expect to happen?

I did expect the deploy to update the retention period of the cloudwatch log group

### What actually happened?

The deploy fails with a 'no info in the s3 bucket referenced in parameterOverrides' found.

### Environment

- **CDK CLI Version : 1.60 and 1.88.0
- **Framework Version:
- **Node.js Version: v12.16.1
- **OS :osx
- **Language (Version): Typescript

---

This is :bug: Bug Report

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reproducing the pipeline from the AWS CDK CodePipeline example and inspect CloudFormationCreateUpdateStackAction parameterOverrides before and after adding logRetention. Done means the pipeline deploys successfully and updates the Lambda's CloudWatch log retention period.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.