or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

Files

docs

application.mdcompute.mddatabase.mdglobal-data-sources.mdindex.mdnetworking.mdprovider.mdsecurity.mdstorage.md

storage.mddocs/

0

# Storage Services

1

2

Comprehensive storage solutions including object storage (S3), block storage (EBS), file systems (EFS), and data archival services for all storage needs.

3

4

## Capabilities

5

6

### S3 - Object Storage

7

8

Simple Storage Service provides scalable object storage with industry-leading durability and availability.

9

10

```typescript { .api }

11

/**

12

* S3 bucket for object storage

13

*/

14

class s3.Bucket extends pulumi.CustomResource {

15

constructor(name: string, args?: s3.BucketArgs, opts?: pulumi.CustomResourceOptions);

16

17

/** Bucket ARN */

18

readonly arn: pulumi.Output<string>;

19

/** Bucket name */

20

readonly bucket: pulumi.Output<string>;

21

/** Bucket domain name */

22

readonly bucketDomainName: pulumi.Output<string>;

23

/** Regional domain name */

24

readonly bucketRegionalDomainName: pulumi.Output<string>;

25

/** Hosted zone ID */

26

readonly hostedZoneId: pulumi.Output<string>;

27

/** AWS region */

28

readonly region: pulumi.Output<string>;

29

/** Website endpoint */

30

readonly websiteEndpoint: pulumi.Output<string>;

31

/** Resource tags */

32

readonly tags: pulumi.Output<{[key: string]: string}>;

33

}

34

35

interface s3.BucketArgs {

36

/** Bucket name (globally unique) */

37

bucket?: pulumi.Input<string>;

38

/** Canned ACL to apply */

39

acl?: pulumi.Input<string>;

40

/** CORS configuration */

41

corsRules?: pulumi.Input<pulumi.Input<s3.BucketCorsRule>[]>;

42

/** Lifecycle configuration */

43

lifecycleRules?: pulumi.Input<pulumi.Input<s3.BucketLifecycleRule>[]>;

44

/** Logging configuration */

45

loggings?: pulumi.Input<pulumi.Input<s3.BucketLogging>[]>;

46

/** Versioning configuration */

47

versioning?: pulumi.Input<s3.BucketVersioning>;

48

/** Website configuration */

49

website?: pulumi.Input<s3.BucketWebsite>;

50

/** Server-side encryption configuration */

51

serverSideEncryptionConfiguration?: pulumi.Input<s3.BucketServerSideEncryptionConfiguration>;

52

/** Replication configuration */

53

replicationConfiguration?: pulumi.Input<s3.BucketReplicationConfiguration>;

54

/** Resource tags */

55

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

56

}

57

58

/**

59

* S3 object storage

60

*/

61

class s3.BucketObject extends pulumi.CustomResource {

62

constructor(name: string, args: s3.BucketObjectArgs, opts?: pulumi.CustomResourceOptions);

63

64

/** Bucket name */

65

readonly bucket: pulumi.Output<string>;

66

/** Object key */

67

readonly key: pulumi.Output<string>;

68

/** Object ETag */

69

readonly etag: pulumi.Output<string>;

70

/** Object size in bytes */

71

readonly size: pulumi.Output<number>;

72

/** Storage class */

73

readonly storageClass: pulumi.Output<string>;

74

/** Version ID */

75

readonly versionId: pulumi.Output<string>;

76

/** Object content */

77

readonly source: pulumi.Output<pulumi.asset.Asset | pulumi.asset.Archive>;

78

}

79

80

interface s3.BucketObjectArgs {

81

/** Target bucket */

82

bucket: pulumi.Input<string>;

83

/** Object key (path) */

84

key: pulumi.Input<string>;

85

/** Object content */

86

source?: pulumi.Input<pulumi.asset.Asset | pulumi.asset.Archive>;

87

/** Raw content string */

88

content?: pulumi.Input<string>;

89

/** Content type */

90

contentType?: pulumi.Input<string>;

91

/** Content encoding */

92

contentEncoding?: pulumi.Input<string>;

93

/** Cache control header */

94

cacheControl?: pulumi.Input<string>;

95

/** Canned ACL */

96

acl?: pulumi.Input<string>;

97

/** Storage class */

98

storageClass?: pulumi.Input<string>;

99

/** Server-side encryption */

100

serverSideEncryption?: pulumi.Input<string>;

101

/** KMS key ID */

102

kmsKeyId?: pulumi.Input<string>;

103

/** Metadata map */

104

metadata?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

105

/** Object tags */

106

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

107

}

108

109

/**

110

* Query existing S3 buckets

111

*/

112

function s3.getBucket(args: s3.GetBucketArgs): Promise<s3.GetBucketResult>;

113

114

interface s3.GetBucketArgs {

115

/** Bucket name */

116

bucket: string;

117

}

118

119

interface s3.GetBucketResult {

120

readonly arn: string;

121

readonly bucket: string;

122

readonly bucketDomainName: string;

123

readonly hostedZoneId: string;

124

readonly region: string;

125

readonly websiteEndpoint: string;

126

}

127

```

128

129

**Usage Examples:**

130

131

```typescript

132

// Create a private S3 bucket with encryption

133

const bucket = new aws.s3.Bucket("app-data", {

134

bucket: "my-app-data-bucket-12345",

135

acl: "private",

136

versioning: {

137

enabled: true

138

},

139

serverSideEncryptionConfiguration: {

140

rule: {

141

applyServerSideEncryptionByDefault: {

142

sseAlgorithm: "AES256"

143

}

144

}

145

},

146

lifecycleRules: [{

147

enabled: true,

148

transitions: [{

149

days: 30,

150

storageClass: "STANDARD_IA"

151

}, {

152

days: 90,

153

storageClass: "GLACIER"

154

}]

155

}],

156

tags: {

157

Environment: "production",

158

Purpose: "application-data"

159

}

160

});

161

162

// Upload files to S3

163

const configFile = new aws.s3.BucketObject("config", {

164

bucket: bucket.bucket,

165

key: "config/app.json",

166

source: new pulumi.asset.FileAsset("./config/app.json"),

167

contentType: "application/json"

168

});

169

170

const staticAssets = new aws.s3.BucketObject("assets", {

171

bucket: bucket.bucket,

172

key: "assets/",

173

source: new pulumi.asset.FileArchive("./dist"),

174

acl: "public-read"

175

});

176

177

// Static website hosting

178

const websiteBucket = new aws.s3.Bucket("website", {

179

bucket: "my-website-bucket",

180

acl: "public-read",

181

website: {

182

indexDocument: "index.html",

183

errorDocument: "error.html"

184

},

185

corsRules: [{

186

allowedHeaders: ["*"],

187

allowedMethods: ["GET", "HEAD"],

188

allowedOrigins: ["*"],

189

maxAgeSeconds: 3000

190

}]

191

});

192

```

193

194

### EBS - Block Storage

195

196

Elastic Block Store provides high-performance block storage for EC2 instances.

197

198

```typescript { .api }

199

/**

200

* EBS volume for block storage

201

*/

202

class ebs.Volume extends pulumi.CustomResource {

203

constructor(name: string, args: ebs.VolumeArgs, opts?: pulumi.CustomResourceOptions);

204

205

/** Volume ARN */

206

readonly arn: pulumi.Output<string>;

207

/** Availability zone */

208

readonly availabilityZone: pulumi.Output<string>;

209

/** Volume ID */

210

readonly id: pulumi.Output<string>;

211

/** Volume size in GB */

212

readonly size: pulumi.Output<number>;

213

/** Volume type (gp2, gp3, io1, io2, sc1, st1) */

214

readonly type: pulumi.Output<string>;

215

/** IOPS for provisioned IOPS volumes */

216

readonly iops: pulumi.Output<number>;

217

/** Throughput for gp3 volumes */

218

readonly throughput: pulumi.Output<number>;

219

/** Encryption status */

220

readonly encrypted: pulumi.Output<boolean>;

221

/** KMS key ID */

222

readonly kmsKeyId: pulumi.Output<string>;

223

/** Snapshot ID used to create volume */

224

readonly snapshotId: pulumi.Output<string>;

225

}

226

227

interface ebs.VolumeArgs {

228

/** Availability zone */

229

availabilityZone: pulumi.Input<string>;

230

/** Volume size in GB */

231

size?: pulumi.Input<number>;

232

/** Volume type */

233

type?: pulumi.Input<string>;

234

/** IOPS (for io1, io2, gp3) */

235

iops?: pulumi.Input<number>;

236

/** Throughput in MB/s (for gp3) */

237

throughput?: pulumi.Input<number>;

238

/** Enable encryption */

239

encrypted?: pulumi.Input<boolean>;

240

/** KMS key for encryption */

241

kmsKeyId?: pulumi.Input<string>;

242

/** Source snapshot ID */

243

snapshotId?: pulumi.Input<string>;

244

/** Volume tags */

245

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

246

}

247

248

/**

249

* EBS snapshot for backups

250

*/

251

class ebs.Snapshot extends pulumi.CustomResource {

252

constructor(name: string, args: ebs.SnapshotArgs, opts?: pulumi.CustomResourceOptions);

253

254

/** Snapshot ARN */

255

readonly arn: pulumi.Output<string>;

256

/** Snapshot description */

257

readonly description: pulumi.Output<string>;

258

/** Volume ID */

259

readonly volumeId: pulumi.Output<string>;

260

/** Volume size */

261

readonly volumeSize: pulumi.Output<number>;

262

/** Owner ID */

263

readonly ownerId: pulumi.Output<string>;

264

/** Snapshot tags */

265

readonly tags: pulumi.Output<{[key: string]: string}>;

266

}

267

268

/**

269

* Volume attachment to EC2 instance

270

*/

271

class ec2.VolumeAttachment extends pulumi.CustomResource {

272

constructor(name: string, args: ec2.VolumeAttachmentArgs, opts?: pulumi.CustomResourceOptions);

273

274

/** Device name */

275

readonly deviceName: pulumi.Output<string>;

276

/** Instance ID */

277

readonly instanceId: pulumi.Output<string>;

278

/** Volume ID */

279

readonly volumeId: pulumi.Output<string>;

280

}

281

```

282

283

**Usage Examples:**

284

285

```typescript

286

// Create encrypted EBS volume

287

const dataVolume = new aws.ebs.Volume("data-volume", {

288

availabilityZone: "us-west-2a",

289

size: 100,

290

type: "gp3",

291

iops: 3000,

292

throughput: 125,

293

encrypted: true,

294

tags: {

295

Name: "DataVolume",

296

Backup: "daily"

297

}

298

});

299

300

// Attach volume to EC2 instance

301

const attachment = new aws.ec2.VolumeAttachment("data-attachment", {

302

deviceName: "/dev/xvdf",

303

volumeId: dataVolume.id,

304

instanceId: instance.id

305

});

306

307

// Create snapshot for backup

308

const backup = new aws.ebs.Snapshot("daily-backup", {

309

volumeId: dataVolume.id,

310

description: `Daily backup of ${dataVolume.id}`,

311

tags: {

312

Name: "DailyBackup",

313

Schedule: "daily"

314

}

315

});

316

```

317

318

### EFS - Elastic File System

319

320

Fully managed NFS file system for EC2 instances with automatic scaling.

321

322

```typescript { .api }

323

/**

324

* EFS file system

325

*/

326

class efs.FileSystem extends pulumi.CustomResource {

327

constructor(name: string, args?: efs.FileSystemArgs, opts?: pulumi.CustomResourceOptions);

328

329

/** File system ARN */

330

readonly arn: pulumi.Output<string>;

331

/** File system ID */

332

readonly id: pulumi.Output<string>;

333

/** DNS name */

334

readonly dnsName: pulumi.Output<string>;

335

/** Performance mode */

336

readonly performanceMode: pulumi.Output<string>;

337

/** Throughput mode */

338

readonly throughputMode: pulumi.Output<string>;

339

/** Provisioned throughput in MB/s */

340

readonly provisionedThroughputInMibps: pulumi.Output<number>;

341

/** Creation token */

342

readonly creationToken: pulumi.Output<string>;

343

/** Encryption status */

344

readonly encrypted: pulumi.Output<boolean>;

345

/** KMS key ID */

346

readonly kmsKeyId: pulumi.Output<string>;

347

}

348

349

interface efs.FileSystemArgs {

350

/** Creation token (unique identifier) */

351

creationToken?: pulumi.Input<string>;

352

/** Performance mode (generalPurpose or maxIO) */

353

performanceMode?: pulumi.Input<string>;

354

/** Throughput mode (provisioned or bursting) */

355

throughputMode?: pulumi.Input<string>;

356

/** Provisioned throughput in MB/s */

357

provisionedThroughputInMibps?: pulumi.Input<number>;

358

/** Enable encryption at rest */

359

encrypted?: pulumi.Input<boolean>;

360

/** KMS key for encryption */

361

kmsKeyId?: pulumi.Input<string>;

362

/** Lifecycle policy */

363

lifecyclePolicy?: pulumi.Input<efs.FileSystemLifecyclePolicy>;

364

/** File system tags */

365

tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

366

}

367

368

/**

369

* EFS mount target for subnet access

370

*/

371

class efs.MountTarget extends pulumi.CustomResource {

372

constructor(name: string, args: efs.MountTargetArgs, opts?: pulumi.CustomResourceOptions);

373

374

/** File system ID */

375

readonly fileSystemId: pulumi.Output<string>;

376

/** Subnet ID */

377

readonly subnetId: pulumi.Output<string>;

378

/** IP address */

379

readonly ipAddress: pulumi.Output<string>;

380

/** DNS name */

381

readonly dnsName: pulumi.Output<string>;

382

/** Security groups */

383

readonly securityGroups: pulumi.Output<string[]>;

384

}

385

386

/**

387

* EFS access point for application access

388

*/

389

class efs.AccessPoint extends pulumi.CustomResource {

390

constructor(name: string, args: efs.AccessPointArgs, opts?: pulumi.CustomResourceOptions);

391

392

/** Access point ARN */

393

readonly arn: pulumi.Output<string>;

394

/** File system ID */

395

readonly fileSystemId: pulumi.Output<string>;

396

/** Root directory configuration */

397

readonly rootDirectory: pulumi.Output<efs.AccessPointRootDirectory>;

398

/** POSIX user configuration */

399

readonly posixUser: pulumi.Output<efs.AccessPointPosixUser>;

400

}

401

```

402

403

**Usage Examples:**

404

405

```typescript

406

// Create EFS file system with encryption

407

const fileSystem = new aws.efs.FileSystem("shared-storage", {

408

performanceMode: "generalPurpose",

409

throughputMode: "provisioned",

410

provisionedThroughputInMibps: 100,

411

encrypted: true,

412

lifecyclePolicy: {

413

transitionToIa: "AFTER_30_DAYS"

414

},

415

tags: {

416

Name: "SharedStorage",

417

Purpose: "application-data"

418

}

419

});

420

421

// Create mount targets in multiple subnets

422

const mountTargets = privateSubnets.map((subnet, index) =>

423

new aws.efs.MountTarget(`mount-target-${index}`, {

424

fileSystemId: fileSystem.id,

425

subnetId: subnet.id,

426

securityGroups: [efsSecurityGroup.id]

427

})

428

);

429

430

// Create access point for application

431

const accessPoint = new aws.efs.AccessPoint("app-access", {

432

fileSystemId: fileSystem.id,

433

rootDirectory: {

434

path: "/app-data",

435

creationInfo: {

436

ownerUid: 1000,

437

ownerGid: 1000,

438

permissions: "755"

439

}

440

},

441

posixUser: {

442

uid: 1000,

443

gid: 1000

444

}

445

});

446

```

447

448

### FSx - High Performance File Systems

449

450

Fully managed file systems optimized for compute-intensive workloads.

451

452

```typescript { .api }

453

/**

454

* FSx Lustre file system for HPC workloads

455

*/

456

class fsx.LustreFileSystem extends pulumi.CustomResource {

457

constructor(name: string, args: fsx.LustreFileSystemArgs, opts?: pulumi.CustomResourceOptions);

458

459

/** File system ARN */

460

readonly arn: pulumi.Output<string>;

461

/** DNS name */

462

readonly dnsName: pulumi.Output<string>;

463

/** Storage capacity in GB */

464

readonly storageCapacity: pulumi.Output<number>;

465

/** Subnet IDs */

466

readonly subnetIds: pulumi.Output<string[]>;

467

/** Security group IDs */

468

readonly securityGroupIds: pulumi.Output<string[]>;

469

/** Mount name */

470

readonly mountName: pulumi.Output<string>;

471

}

472

473

/**

474

* FSx Windows file system

475

*/

476

class fsx.WindowsFileSystem extends pulumi.CustomResource {

477

constructor(name: string, args: fsx.WindowsFileSystemArgs, opts?: pulumi.CustomResourceOptions);

478

479

/** File system ARN */

480

readonly arn: pulumi.Output<string>;

481

/** DNS name */

482

readonly dnsName: pulumi.Output<string>;

483

/** Active Directory ID */

484

readonly activeDirectoryId: pulumi.Output<string>;

485

/** Storage capacity in GB */

486

readonly storageCapacity: pulumi.Output<number>;

487

/** Throughput capacity in MB/s */

488

readonly throughputCapacity: pulumi.Output<number>;

489

}

490

```