Neptune can provision and manage cloud resources alongside your application deployments. Resources are defined in your neptune.json configuration and automatically wired to your application.
Available Resources
Adding Resources
The easiest way to add resources is to ask your AI assistant:
“Add an S3 bucket for user uploads to my project”
Or you can define them directly in your neptune.json:
{
"kind": "Service",
"name": "my-app",
"resources": [
{
"kind": "StorageBucket",
"name": "uploads"
},
{
"kind": "Secret",
"name": "STRIPE_API_KEY"
},
{
"kind": "Database",
"name": "my-app-db"
}
]
}
Resource Lifecycle
Define
Add resources to your neptune.json configuration (or ask your AI assistant to add them)
Provision
Neptune provisions the cloud resources and returns the physical resource names to your AI assistant.
Code
Write your application code using the physical resource names, or let your AI assistant write it for you.
Deploy
Your app is deployed with all IAM permissions pre-configured to access its resources.
Your AI assistant handles this flow automatically - it provisions resources, knows the physical names, and can write code that accesses them correctly.
How Resources Work
When Neptune provisions a resource, it creates:
- A unique physical name - e.g.,
neptune-abc123-uploads for global uniqueness
- IAM permissions - Your service automatically has access to its own resources
- No manual credential setup - Just use standard AWS SDKs like
boto3
Your AI assistant receives the physical resource names after provisioning and can use them when writing code for you.
Example: Web App with Storage and Secrets
Here’s a complete configuration for a typical web application:
{
"kind": "Service",
"name": "my-saas-app",
"port_mappings": [
{ "container_port": 3000, "host_port": 8080 }
],
"resources": [
{
"kind": "StorageBucket",
"name": "user-uploads"
},
{
"kind": "Secret",
"name": "STRIPE_SECRET_KEY"
},
{
"kind": "Secret",
"name": "RESEND_API_KEY"
},
{
"kind": "Database",
"name": "myapp-db"
}
]
}
Your application can then access these resources using standard AWS SDKs:
import boto3
import stripe
from resend import Resend
# Physical names provided by your AI assistant after provisioning
BUCKET_NAME = "neptune-abc123-user-uploads"
STRIPE_SECRET_NAME = "neptune-abc123-STRIPE_SECRET_KEY"
RESEND_SECRET_NAME = "neptune-abc123-RESEND_API_KEY"
# Storage - permissions are pre-configured
s3 = boto3.client("s3")
s3.put_object(Bucket=BUCKET_NAME, Key="example.txt", Body=b"Hello!")
# Secrets - accessed via AWS Secrets Manager
sm = boto3.client("secretsmanager")
stripe_key = sm.get_secret_value(SecretId=STRIPE_SECRET_NAME)['SecretString']
stripe.api_key = stripe_key
resend_key = sm.get_secret_value(SecretId=RESEND_SECRET_NAME)['SecretString']
resend = Resend(api_key=resend_key)
Managing Resources
Ask your AI assistant to help with common resource operations:
| Task | Example Request |
|---|
| Add a resource | ”Add an S3 bucket called ‘uploads’ to my project” |
| Add a database | ”Add a database called ‘app’ to my project” |
| Set a secret | ”Set my STRIPE_API_KEY secret” |
| List bucket files | ”What files are in my uploads bucket?” |
| Check status | ”What’s the status of my resources?” |
| Get resource names | ”What are the physical names of my resources?” |