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

Go (golang) language support #547

Closed
eladb opened this issue Aug 12, 2018 · 59 comments
Closed

Go (golang) language support #547

eladb opened this issue Aug 12, 2018 · 59 comments
Assignees
Labels
effort/large feature/new-language feature-request language/go language/support management/tracking

Comments

@eladb
Copy link
Contributor

eladb commented Aug 12, 2018

Developer Preview is here!

Go read all about it...
https://aws.amazon.com/blogs/developer/getting-started-with-the-aws-cloud-development-kit-and-go/

@Doug-AWS
Copy link
Contributor

Doug-AWS commented Aug 31, 2018

I've closed #648 as a duplicate.

@debora-ito debora-ito added the language/go label Oct 31, 2018
@rix0rrr rix0rrr changed the title Go language support Go (golang) language support Dec 8, 2018
@rix0rrr rix0rrr mentioned this issue Dec 8, 2018
@kurtmaile
Copy link

kurtmaile commented Dec 17, 2018

+1 please

@kurtmaile
Copy link

kurtmaile commented Dec 17, 2018

Is this under way at all?

@x6j8x
Copy link

x6j8x commented Jan 19, 2019

@eladb Even though Go support is not underway, yet (if I understood it correctly), it would be very nice to see this happen.

@eladb eladb added the language/support label Mar 12, 2019
@universam1
Copy link

universam1 commented Mar 28, 2019

+1

@stevensu1977
Copy link

stevensu1977 commented May 25, 2019

+1

1 similar comment
@auser
Copy link

auser commented May 29, 2019

+1

@richard-mauri
Copy link

richard-mauri commented Jun 5, 2019

In my case, I need a struct for json marshal/unmarshal for cloudwatch DashboardBody.
I'm really surprised the GetDashboard aws cloudwatch api returns a json string for the body.

WTF right?

See also https://medium.com/poka-techblog/cloudwatch-dashboards-as-code-the-right-way-using-aws-cdk-1453309c5481

@Tanax
Copy link

Tanax commented Jul 30, 2019

Yes please! This would be amazing if Go was supported! Any updates on this?

@gus-maurizio
Copy link

gus-maurizio commented Jul 31, 2019

+1

1 similar comment
@binhvodevpanel
Copy link

binhvodevpanel commented Aug 5, 2019

+1

@lukekhamilton
Copy link

lukekhamilton commented Aug 28, 2019

+2 (Asking for a friend too)

@alext234
Copy link

alext234 commented Sep 3, 2019

+3 please

@KnownTraveler
Copy link

KnownTraveler commented Sep 11, 2019

+1

@andreimcristof
Copy link

andreimcristof commented Sep 20, 2019

Yes, please. One more vote for Golang support here.
Best regards,

@wrkngu0
Copy link

wrkngu0 commented Sep 23, 2019

+1

@SomayaB SomayaB added the management/tracking label Sep 24, 2019
@pcariel
Copy link

pcariel commented Sep 27, 2019

+1

4 similar comments
@steadysupply
Copy link

steadysupply commented Sep 30, 2019

+1

@nmarcetic
Copy link

nmarcetic commented Oct 7, 2019

+1

@bvanneerven
Copy link

bvanneerven commented Oct 17, 2019

+1

@neil85
Copy link

neil85 commented Oct 23, 2019

+1

@Norbinsh
Copy link

Norbinsh commented Apr 19, 2020

Looking forward to seeing Golang support, can't wait.

Any actual plans? any technical limitation or it's just a matter of product decision / prioritization?

Thank you!

@mgaidia
Copy link

mgaidia commented Apr 22, 2020

It is on the public roadmap. I guess it is a matter of time.
https://github.com/orgs/aws/projects/7

@cristim
Copy link

cristim commented May 7, 2020

Is there a way we can contribute to this? I see lots of people +1 it, if just a small minority of them were able to help we'd probably have it by now.

@dtherhtun
Copy link

dtherhtun commented Jun 3, 2020

+1 for Go

@RafalWilinski
Copy link
Contributor

RafalWilinski commented Jun 4, 2020

I've published a simple PoC of GolangFunction construct here: https://github.com/RafalWilinski/aws-lambda-golang-cdk

Haven't figured out the JSII part yet, works only with TS-based stacks and Go ^1.11.

Feedback and contributions more than welcome.

Edit: Figured out the JSII part, works with all languages now!

@alanmpitts
Copy link

alanmpitts commented Jun 4, 2020

+1 for Go

@yemin7
Copy link

yemin7 commented Jun 5, 2020

+1

@josephphyo
Copy link

josephphyo commented Jun 5, 2020

+1 for Go

@cristim
Copy link

cristim commented Jun 5, 2020

Please let's stop these +1 comments and just click the thumbs-up icons

@SomayaB SomayaB assigned ccfife and unassigned fulghum Jul 10, 2020
@ccfife ccfife added the effort/large label Jul 15, 2020
@EnzoAliatis
Copy link

EnzoAliatis commented Aug 6, 2020

+1

3 similar comments
@Juberstine
Copy link

Juberstine commented Aug 25, 2020

+1

@olmax99
Copy link

olmax99 commented Sep 16, 2020

+1

@hrugani
Copy link

hrugani commented Nov 2, 2020

+1

@ericzbeard ericzbeard added the feature/new-language label Apr 6, 2021
@ericmatchi
Copy link

ericmatchi commented Apr 8, 2021

"Working on it" 🥰

@ccfife
Copy link
Contributor

ccfife commented Apr 12, 2021

Developer Preview is here!

Go read all about it...
https://aws.amazon.com/blogs/developer/getting-started-with-the-aws-cloud-development-kit-and-go/

@justin8
Copy link
Contributor

justin8 commented Aug 10, 2021

@ccfife is there any (vague) ETA on when Go support will reach GA? The story on the roadmap board only links to this issue and a closed/completed board for reaching developer preview.

Edit: I found this board linked from the above blog post: https://github.com/aws/jsii/projects/3

But it wasn't attached to the go issue on the roadmap, turns out I can edit that though, so I added the link

@addihorowitz
Copy link
Contributor

addihorowitz commented Jan 23, 2022

You may track the Go GA project board here. We would love to hear your feedback on the Dev Preview version!

@cgarvis cgarvis assigned addihorowitz and unassigned ccfife Jan 31, 2022
@brunetto
Copy link

brunetto commented Feb 9, 2022

Hi,
thank you very much for the effort you are putting in this. <3
I tried it but I didn't get anywhere.

Example use case: I was trying to deploy:

  • SQS queue with DLQ and subscription to a SNS topic
  • Lambda triggered by the previous point SQS queue
  • Another lambda triggered by ApiGateway HTTP inside a VPC
  • DynamoDB table
  • Lambda triggered by scheduled CloudWatch event

Pain points:

  • Documentation: besides the basic examples (still hard to understand without having a previous good knowledge of CDK) there's anything useful to start from
  • Types: e.g. queue retention period RetentionPeriod: awscdk.Duration_Seconds(jsii.Number(1209600)), could be int, could be time.Time, and it's very difficult to get that jsii.Number(1209600) is what you need
  • Credentials: SDK v2 let you do anything just by specifying the profile, here we need something like jsii.String(os.Getenv("CDK_DEFAULT_ACCOUNT")) and no profile

At this point there was already too much friction to get things done in a reasonable amount of time and I had to revert to Serverless.

I'd can't wait to see this project grow and shine in the future but for the moment, without docs, examples, and with unfriendly APIs it's quite hard to use. Maybe someone more skilled with CDK in another language would have a better experience.

@jonny-rimek
Copy link

jonny-rimek commented Feb 22, 2022

not sure this is the place to post GA feedback.

I finally got to play around with the go version. I used CDK itself since GA and use it at work to manage our prod infrastructure.

Overall I enjoyed the experience, but it is noticeable that it's not built with go in mind and can at times look a bit awkward.

	testIntegration := awscdkapigatewayv2integrationsalpha.NewHttpLambdaIntegration(jsii.String("FirstTestIntegration"), firstTestFunction, &awscdkapigatewayv2integrationsalpha.HttpLambdaIntegrationProps{})

My only pain point, which is a pretty big one imo, is that you can't see the default values and if the value is required or not. Using TS the IDE tells me what values are must haves and what the default values are. As go doesn't have the possibility for either, you simply don't know, which is a huge bummer.

The easiest fix would probably be to duplicate both value into the description of the attribute.

I also tested pulumi in go and wasn't convinced, mostly because you just type the value as string, instead of having defined types and let your IDE show you what values are acceptable

e.g. cdk:

	awsdynamodb.NewTable(stack, jsii.String("Table"), &awsdynamodb.TableProps{
		PartitionKey: &awsdynamodb.Attribute{
			Name: jsii.String("PK"),
			Type: awsdynamodb.AttributeType_STRING,
		},
		SortKey: &awsdynamodb.Attribute{
			Name: jsii.String("SK"),
			Type: awsdynamodb.AttributeType_STRING,
		},
		BillingMode:   awsdynamodb.BillingMode_PAY_PER_REQUEST,
		RemovalPolicy: awscdk.RemovalPolicy_DESTROY,
	})

Summary:

I will continue to use the go version for my projects, but would recommend TS for everyone else, unless you are a huge go nerd and have previous cdk experience, otherwise you will probably have a hard time.

The whole dev experience is just more cohesive in TS and there are more examples for beginners to learn from.

hope that helps

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

⚠️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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/large feature/new-language feature-request language/go language/support management/tracking
Projects
None yet
Development

No branches or pull requests