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

AMI environmental context provider #1417

Closed
ggoodman opened this issue Dec 20, 2018 · 9 comments
Closed

AMI environmental context provider #1417

ggoodman opened this issue Dec 20, 2018 · 9 comments
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI

Comments

@ggoodman
Copy link

During execution, I would like to be able to perform an ec2.describeImages() operation in the context of the privileges available to my CDK App. I would use the resulting image list to seed the image map in an AutoScaleGroup.

@eladb
Copy link
Contributor

eladb commented Dec 20, 2018

to seed the image map in an AutoScaleGroup

Can you elaborate a little bit about what you mean, or provide a sketch of how would you expect the API to look like from a user's point of view?

@ggoodman
Copy link
Author

I feel like I don't have a good enough understanding of the canonical way of using the CDK or its long-term vision so I don't feel like I can make a good API suggestion. Let me present the use case instead.

  • There is another team that produces AMIs and tags these so that they can be filtered by different criteria. These AMIs are produced regularly to capture security patches and other little things.
  • I would like to capture the newest such AMI according to a set of criteria. This exercise would need to be done on a per-region basis to seed things like AutoScaleGroup launch configurations.
  • Because the produced AMIs are private, listing these requires appropriate credentials. It would simplify the experience if the credential provider(s) made available by the CDK could be leveraged.
  • I've also produced a Credentials Plugin to facilitate assuming a role w/ 2FA. This is the logic I would like to cleanly re-use (if needed, subject to opt-out via instance profile flag).

@eladb
Copy link
Contributor

eladb commented Dec 23, 2018

@ggoodman thanks, very helpful. Can you provide an example for a describeImages invocation (with query details) that you might use?

@eladb eladb added feature-request A feature should be added or improved. package/tools Related to AWS CDK Tools or CLI labels Dec 23, 2018
@otterley
Copy link
Contributor

I'm interested in such a feature, though the implementation details/design may be different.

Here's a user story:

As a user, I want to be able to determine at runtime which AMI to use for an EC2 instance or Auto Scaling Group, based on a set of predicate attributes I provide; and if multiple images are returned that match the predicate, use the latest one.

It'd be useful to look at Terraform's AMI data source for inspiration.

@eladb
Copy link
Contributor

eladb commented Jan 29, 2019

Sounds that this will exactly fit our environmental context provider model.

@otterley
Copy link
Contributor

@eladb Sounds good to me, but I didn't see an AMI provider yet. Should we make this the issue requesting one be made?

@eladb
Copy link
Contributor

eladb commented Jan 29, 2019

Looks like this issue is good enough!

@otterley
Copy link
Contributor

otterley commented Jan 29, 2019

Shall we rename it? I don't have the privileges to do so.

@eladb eladb changed the title Provide extension point to provide user-defined AMIs based on query AMI environmental context provider Jan 29, 2019
@shivlaks shivlaks added the effort/medium Medium work item – several days of effort label Feb 3, 2020
@shivlaks shivlaks added the p2 label Aug 7, 2020
@NGL321 NGL321 assigned rix0rrr and unassigned shivlaks Jan 25, 2021
@rix0rrr rix0rrr removed their assignment Jun 3, 2021
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 3, 2022
@github-actions github-actions bot closed this as completed Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

5 participants