providers
S3

S3

The s3 block declares an s3 bucket, using the localstack/localstack image.

Declaring a bucket

stack {
    s3 {
        bucket("test-bucket") {
            // Creates a file named hello.txt with the content of Hello World
            // in a bucket named test-bucket
            file("hello.txt", "Hello, world")
        }
    }
}

Returned values

When an s3 component is declared, the following data is returned:

KeyDescription
accessKeyThe access key of the running AWS stack
secretKeyThe secret key of the running AWS stack
endpointOverrideThe endpoint override of the running AWS stack