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

AppConfig: Get latest deployed configuration #29162

Open
1 of 2 tasks
0xBradock opened this issue Feb 19, 2024 · 2 comments
Open
1 of 2 tasks

AppConfig: Get latest deployed configuration #29162

0xBradock opened this issue Feb 19, 2024 · 2 comments
Labels
@aws-cdk/aws-appconfig Related to AWS AppConfig effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3

Comments

@0xBradock
Copy link

Describe the feature

Add a command to AppConfig to retrieve a deployed configuration during CDK synthesize step.

Use Case

I have a CDK application that deploys stacks like this:

const clients = [/*...*/]

clients.forEach( client => new ClientShop(app, `${client.name}-shop`, { client } ) )

Problem

For now clients is an array stored in code. The clients information is managed by another team. So, every time they want to modify it, they need to open a ticket.

Goal

I want to give them the ability to edit themselves the information of client using an AWS resource. This will allow me to change the CDK application to this:

//                              👇
const clients = new GetClientsFromConfig(app, 'config')

clients.forEach( client => new ClientShop(app, `${client.name}-shop`, { client } ) )

This would separate the logic from data with a good user experience.

Proposed Solution

One option would be to implement it similar to the static method SSM fromStringParameterAttributes.

Other Information

Options I considered to deploy the clients and read from GetClientsFromConfig:

  • AppConfig: It has the best user experience and allows to validate the configuration. But, I can't find a way to read a deployed configuration in a Stack in my CDK app const config = deployment.readFromLastVersion(/*...*/) (do not exist)
  • DynamoDB: Less intuitive and still can't find method to read from within CDK
  • SSM Parameter Store: Can read from CDK, but is not so intuitive and error prone to the other team to manage its content
  • S3: Easy to setup, hard for users to configure

I am still open to other solutions, if they exist.
But, as far as I gather AppConfig would be the best alternative.

Acknowledgements

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

CDK version used

2.128.0

Environment details (OS name and version, etc.)

MacOS Apple M1 Pro

@0xBradock 0xBradock added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2024
@github-actions github-actions bot added the @aws-cdk/aws-appconfig Related to AWS AppConfig label Feb 19, 2024
@pahud
Copy link
Contributor

pahud commented Feb 19, 2024

I want to give them the ability to edit themselves the information of client using an AWS resource.

Where would you like the information to be stored in AWS resource? Parameter store? Traditionally such information should be stored in the git repository as plain text configs or objects in S3 buckets and you can fetch them in your CDK code and pass to your constructs so we don't have to hack that in the L2 constructs. But this deserves more discussion here with the community.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Feb 19, 2024
@0xBradock
Copy link
Author

Yes, using S3 would be easy.
But, what I need is to provide an easy interface with validation to non-technical colleagues to configure a CDK application with free-form or feature flags.
AppConfig provides exactly that, but for running applications.
I need that same functionality during CDK synthesize step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-appconfig Related to AWS AppConfig effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3
Projects
None yet
Development

No branches or pull requests

2 participants