feat(synthetics): lifecycle rules for auto-generated artifact buckets#22863
feat(synthetics): lifecycle rules for auto-generated artifact buckets#22863
Conversation
…buckets This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. fixes aws#22634
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
There was a problem hiding this comment.
Hi @mackensen! This looks good! I'll run the integ test sometime today. In the meantime, can you add this somewhere to the readme?
| * Lifecycle rules for the generated canary artifact bucket. | ||
| * | ||
| * @default - No rules applied. This has no effect if a bucket is passed | ||
| * to `artifactsBucketLocation`. | ||
| */ |
There was a problem hiding this comment.
| * Lifecycle rules for the generated canary artifact bucket. | |
| * | |
| * @default - No rules applied. This has no effect if a bucket is passed | |
| * to `artifactsBucketLocation`. | |
| */ | |
| * Lifecycle rules for the generated canary artifact bucket. Has no effect | |
| * if a bucket is passed to `artifactsBucketLocation`. If you pass a bucket | |
| * to `artifactsBucketLocation`, you can add lifecycle rules to the bucket | |
| * itself. | |
| * | |
| * @default - no rules applied to the generated bucket. | |
| */ |
| handler: 'index.handler', | ||
| code: synthetics.Code.fromInline('/* Synthetics handler code */'), | ||
| }), | ||
| runtime: synthetics.Runtime.SYNTHETICS_1_0, |
There was a problem hiding this comment.
| runtime: synthetics.Runtime.SYNTHETICS_1_0, | |
| runtime: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_3_8, |
|
@kaizencc thanks for the feedback, I've updated the branch. |
|
@mackensen I ran the integ test for you. It is somehow here. Not sure what went on to make it not a part of this particular branch, but Ill leave it to you to merge your branch with the commit that has the updated snapshot. In addition, this PR needs a readme update that mentions the ability to add lifecycle rules to the created s3 bucket. |
|
@kaizencc thanks, cherry-picked your commit and updated the README. |
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
kaizencc
left a comment
There was a problem hiding this comment.
Hi @mackensen! Apologies for not getting back to you sooner. This is ready to go once the build succeeds. My comments on the readme, when addressed, should fix the build.
| enforceSSL: true, | ||
| }); | ||
|
|
||
| const canary = new synthetics.Canary(this, 'MyCanary', { |
There was a problem hiding this comment.
Looks like the build is failing because we are creating two canary consts in the same example.
|
|
||
| You can pass an S3 bucket to store artifacts from canary runs. If you do not, one will be auto-generated when the canary is created. You may add [lifecycle rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lifecycle-mgmt.html) to the auto-generated bucket. | ||
|
|
||
| Artifact bucket examples: |
There was a problem hiding this comment.
Lets delete this line and move it in to the ts example
| ```typescript | ||
| // Auto-generated bucket with lifecycle rules. |
There was a problem hiding this comment.
| ```typescript | |
| // Auto-generated bucket with lifecycle rules. | |
| ```ts | |
| // configure lifecycle rules on the auto-generated artifact bucket. |
|
|
||
| // Custom bucket as artifact bucket. |
There was a problem hiding this comment.
github ui doesn't like when my suggestions involve "```" so I'll just describe what i want here.
we should split up the example into two here and change the comment to the one below:
// configure lifecycle rules on a custom artifact bucket.|
This PR has been in the BUILD FAILING state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week. |
|
This PR has been deemed to be abandoned, and will be automatically closed. Please create a new PR for these changes if you think this decision has been made in error. |
…#26290) A re-roll of #22863. Thanks for getting this started @mackensen! This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. Fixes #22634 Co-authored-by: Charles Fulton fultonc@lafayette.edu ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
…aws#26290) A re-roll of aws#22863. Thanks for getting this started @mackensen! This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth. Fixes aws#22634 Co-authored-by: Charles Fulton fultonc@lafayette.edu ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
This change exposes the lifecycle rules property for new and existing auto-generated artifact buckets so that workload owners can easily manage growth.
fixes #22634
I'm not able to run the integration tests.
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integto deploy the infrastructure and generate the snapshot (i.e.yarn integwithout--dry-run)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license