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

aws_cloud9_alpha: Give user ability to specify image ID, and make default to use recommended Amazon Linux 2 #20908

Closed
2 tasks
sean-beath opened this issue Jun 29, 2022 · 4 comments · Fixed by #21194
Labels
@aws-cdk/aws-cloud9 Related to AWS Cloud9 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@sean-beath
Copy link
Contributor

sean-beath commented Jun 29, 2022

Describe the feature

Implement a way for users to change the default image ID for their Cloud9 instance.
Further, default the image ID to be Amazon Linux 2 (amazonlinux-2-x86_64) aligning to recommendation from AWS.

This would allow a user to implement the following to specify Amazon Linux 2 as their EC2 image:

cloud9_env = cloud9.Ec2Environment(self, "Cloud9Env",
            vpc=self.vpc,
            subnet_selection=ec2.SubnetSelection(
                        subnet_type=ec2.SubnetType.PUBLIC
            ),
            image_id="amazonlinux-2-x86_64"
)

Use Case

I am not currently able to deploy a Cloud9 environment using the recommended image from AWS.

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.25.0a0

Environment details (OS name and version, etc.)

MacOS Big Sur 11.6.5

@sean-beath sean-beath added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 29, 2022
@github-actions github-actions bot added the @aws-cdk/aws-cloud9 Related to AWS Cloud9 label Jun 29, 2022
@corymhall
Copy link
Contributor

@sean-beath I agree this should be a feature!

This issue has been classified as p2. That means a workaround is available or it is deemed a nice-to-have feature. Given the amount of work there is to do and the relative priority of this issue, the CDK team is unlikely to address it. That does not mean the issue will never be fixed! If someone from the community submits a PR to fix this issue, and the PR is small and straightforward enough, and meets the quality bars to be reviewed and merged with little effort we will accept that PR. PRs that do not build or need complex or multiple rounds of reviews are unlikely to be merged and will be closed to keep our backlog manageable.

In the mean time, remember that you can always use the escape hatch (https://docs.aws.amazon.com/cdk/v2/guide/cfn_layer.html) mechanism to have fine control over the CloudFormation output you want. We will keep the issue open for discoverability, to collect upvotes, and to facilitate discussion around this topic.

We use +1s on this issue to help prioritize our work, and are happy to re-evaluate the prioritization of this issue based on community feedback. You can reach out to the cdk.dev community on Slack (https://cdk.dev/) to solicit support for reprioritization.

@corymhall corymhall added effort/small Small work item – less than a day of effort p2 and removed needs-triage This issue or PR still needs to be triaged. labels Jun 30, 2022
@corymhall corymhall removed their assignment Jun 30, 2022
@jumic
Copy link
Contributor

jumic commented Jul 10, 2022

@corymhall
I've created a pull request to support parameter imageId.

Should we also change the default value to Amazon Linux 2 as requested? If yes, can we skip the feature flag because cloud9 is an experimental module?

Without feature flag, we could just add this line to change the default behaviour.

imageId: props.imageId ? props.imageId : 'amazonlinux-2-x86_64',

I found this note in the Cloud9 API documentation:

From July 1, 2022, the parameter for Amazon Linux will no longer be available when you specify an AMI for your instance. Amazon Linux 2 will then become the default AMI, which is used to launch your instance if no parameter is explicity defined.

Will the default value be also changed to Amazon Linux 2 in CloudFormation? In this case, we could close this issue after merging the PR.

@sean-beath
Copy link
Contributor Author

@corymhall
I created a different pull request incorporating comments from @jumic's PR.

The build is failing as this is a breaking change by making the imageId a mandatory field.

Apologies for the duplicate PR but I wanted to use this for my own learning so hopefully I can keep contributing. Please let me know if there is something I have missed.

@mergify mergify bot closed this as completed in #21194 Jul 19, 2022
mergify bot pushed a commit that referenced this issue Jul 19, 2022
Allows users to include the imageId parameter to specify which EC2 AMI to be used when creating the environment.

closes: #20908.

Shout out to @jumic for beginning the fix.

Unable to run yarn integ due to breaking change.

BREAKING CHANGE: The imageId parameter is now required and deployments will fail without it

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

comcalvi pushed a commit to comcalvi/aws-cdk that referenced this issue Jul 25, 2022
…1194)

Allows users to include the imageId parameter to specify which EC2 AMI to be used when creating the environment.

closes: aws#20908.

Shout out to @jumic for beginning the fix.

Unable to run yarn integ due to breaking change.

BREAKING CHANGE: The imageId parameter is now required and deployments will fail without it

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloud9 Related to AWS Cloud9 effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants