Skip to content

feat: add AWS S3 createBucket, getBucket and deleteBucket components#5703

Draft
felixgateru wants to merge 1 commit into
superplanehq:mainfrom
felixgateru:feat/aws-s3-bucket
Draft

feat: add AWS S3 createBucket, getBucket and deleteBucket components#5703
felixgateru wants to merge 1 commit into
superplanehq:mainfrom
felixgateru:feat/aws-s3-bucket

Conversation

@felixgateru

Copy link
Copy Markdown
Collaborator

What changed

Added a new AWS S3 service integration with three action components for managing buckets:

  • Create Bucket (aws.s3.createBucket) — creates a new S3 bucket.
  • Get Bucket (aws.s3.getBucket) — retrieves a bucket's resolved region and ARN.
  • Delete Bucket (aws.s3.deleteBucket) — deletes an (empty) S3 bucket.

Why

To let workflows manage S3 buckets directly — provisioning storage as part of infrastructure flows, verifying a bucket's region/existence before downstream steps, and tearing down buckets during cleanup or rollback.

How

Backend

Added pkg/integrations/aws/s3/:

  • client.go — a SigV4-signed S3 REST/XML client (CreateBucket, GetBucketLocation, DeleteBucket, ListBuckets) using the regional path-style endpoint, mirroring the existing SQS client's signing approach.
  • create_bucket.goaws.s3.createBucket; sends a CreateBucketConfiguration with LocationConstraint for regions other than us-east-1. Emits the bucket name, region, and ARN.
  • get_bucket.goaws.s3.getBucket; resolves the bucket's region via GetBucketLocation (empty constraint → us-east-1) and emits name/region/ARN.
  • delete_bucket.goaws.s3.deleteBucket; deletes the bucket and emits a deletion confirmation.
  • resources.goListBuckets, backing the s3.bucket resource picker used by the get/delete bucket selectors.
  • example.go + example output JSON for each component.
  • Registered the three actions in aws.go and added the s3.bucket case to resources.go (ListResources dispatch).
  • Added backend tests for each component (setup validation, execute success, missing-credentials, API errors, plus location-constraint and empty-location cases).

Frontend

Added web_src/src/pages/app/mappers/aws/s3/:

  • create_bucket.ts, get_bucket.ts, delete_bucket.ts — node mappers with metadata, execution details, and event sections.
  • index.ts barrel; registered the three mappers and their event-state entries in aws/index.ts.
  • Added spec tests for each mapper.

Docs regenerated (docs/components/AWS.mdx).

Notes

  • The frontend mappers use the generic aws.svg icon since there is no dedicated aws.s3.svg asset yet; happy to switch to a proper S3 logo if one is added.
  • getBucket returns name/region/ARN via GetBucketLocation (S3 has no single "describe bucket" API); deleteBucket requires the bucket to be empty (an AWS constraint). The region selector is used to sign requests, consistent with the SQS/EC2 components.

Add an S3 service package with three new actions:

- aws.s3.createBucket: create a bucket (sends LocationConstraint for
  non us-east-1 regions)
- aws.s3.getBucket: resolve a bucket's region via GetBucketLocation and
  emit name/region/ARN
- aws.s3.deleteBucket: delete an empty bucket

Includes a SigV4-signed S3 REST client, an s3.bucket resource picker
(ListBuckets), example outputs, backend tests, frontend mappers with
spec tests, registration in aws.go/resources.go/mappers index, and
regenerated docs.

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
@superplanehq-integration

Copy link
Copy Markdown

👋 Commands for maintainers:

  • /sp start - Start an ephemeral machine (takes ~30s)
  • /sp stop - Stop a running machine (auto-executed on pr close)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant