aws-cdk: Add ability to tag assets uploaded to S3
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 74
Description
### Describe the feature
I want the ability to tag assets (primarily Lambda code, but I can see this being useful for other assets as well).
In an ideal world, I would be able to add tags to the [AssetCode](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_assets.AssetOptions.html) in order to be able to manage the resources outside of the CDK (for purposes of redeployment, or cleanup).
### Use Case
I am looking for a mechanism to add the ability to "rollback" a CDK deployment. The way I see it, there are two ways to do so:
1. Clone the repository, checkout the old commit, and deploy from my machine.
2. Find the assets in S3 and deploy to CloudFormation using that
I would be happy with simply being able to rollback the Lambda code, as that would already be an operational win for us.
Since all our builds are performed via CodePipeline, the first option is less than ideal because it means leaving our CI/CD process. I want to know which assets were used for which deployment and when. Right now, it is difficult to see exactly where CDK stores assets, and even less simple to re-deploy.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.45.0
### Environment details (OS name and version, etc.)
MacOS 12.5.1 (21G83)
Contributor guide
Research direction
Start with the AssetCode and AssetOptions API mentioned in the issue, then trace how assets are uploaded to S3. Determine how tags should be represented and associated with Lambda and other assets, including the interaction with CloudFormation deployments. Done means supported asset tags reach the uploaded S3 objects and the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100