Hi Team, looking for help on pulumi - java , can w...
# aws
n
Hi Team, looking for help on pulumi - java , can we expose as a rest end point to create stack, lambda etc with pulumi Java? looks like we have only standalone support.. please let me know
l
Stacks are a Pulumi feature, lambdas are an AWS feature. These are separate questions. Stacks can be created via the automation-api features, and lambdas via the aws-classic and aws-native providers. The Pulumi rest api does support creating stacks too. I'm not aware of a client for this though, you have to use the API through your own preferred tools or libraries. https://www.pulumi.com/docs/pulumi-cloud/cloud-rest-api/
n
thank you but I am looking java sdk . I mean i am planning to develop a spring boot application to create ec2 etc but I dont see on pulumi docs
l
What don't you see? Creating a stack is documented here https://www.pulumi.com/docs/concepts/stack/ and here https://www.pulumi.com/docs/using-pulumi/automation-api/getting-started-automation-api/ (that second link doesn't have a Java example, but it will when Java SDK is no longer beta). Creating a lambda is documented here https://www.pulumi.com/registry/packages/aws/api-docs/lambda/function/ and here https://www.pulumi.com/registry/packages/aws-native/api-docs/lambda/function/
n
looks like I am not putting right question.. looking for pulumi over http using java
i mean deploy as spring boot application and expose a end point to create aws resources
b
There is the Automation API feature (https://www.pulumi.com/docs/using-pulumi/automation-api/getting-started-automation-api/) but it’s not available in Java at the moment. You can raise an issue in the Pulumi Java repository: https://github.com/pulumi/pulumi-java if you’d like to see this built
l
Even when it is available, you will need to write the application yourself: there isn't a standard "create resource X using credentials Y" API. You need to provide that API, and call the AWS (or whatever) API via the Pulumi libraries. If you want this in the short term, you can create the API and app in a different language, and create its client library as a Java jar. That way, your Java clients can create AWS resources via Pulumi (automation-api).