published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Registers a Lake Formation resource (e.g., S3 bucket) as managed by the Data Catalog. In other words, the S3 path is added to the data lake.
Choose a role that has read/write access to the chosen Amazon S3 path or use the service-linked role. When you register the S3 path, the service-linked role and a new inline policy are created on your behalf. Lake Formation adds the first path to the inline policy and attaches it to the service-linked role. When you register subsequent paths, Lake Formation adds the path to the existing policy.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var exampleBucket = Aws.S3.GetBucket.Invoke(new()
{
Bucket = "an-example-bucket",
});
var exampleResource = new Aws.LakeFormation.Resource("exampleResource", new()
{
Arn = exampleBucket.Apply(getBucketResult => getBucketResult.Arn),
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/lakeformation"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/s3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleBucket, err := s3.LookupBucket(ctx, &s3.LookupBucketArgs{
Bucket: "an-example-bucket",
}, nil)
if err != nil {
return err
}
_, err = lakeformation.NewResource(ctx, "exampleResource", &lakeformation.ResourceArgs{
Arn: *pulumi.String(exampleBucket.Arn),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.S3Functions;
import com.pulumi.aws.s3.inputs.GetBucketArgs;
import com.pulumi.aws.lakeformation.Resource;
import com.pulumi.aws.lakeformation.ResourceArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var exampleBucket = S3Functions.getBucket(GetBucketArgs.builder()
.bucket("an-example-bucket")
.build());
var exampleResource = new Resource("exampleResource", ResourceArgs.builder()
.arn(exampleBucket.applyValue(getBucketResult -> getBucketResult.arn()))
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const exampleBucket = aws.s3.getBucket({
bucket: "an-example-bucket",
});
const exampleResource = new aws.lakeformation.Resource("exampleResource", {arn: exampleBucket.then(exampleBucket => exampleBucket.arn)});
import pulumi
import pulumi_aws as aws
example_bucket = aws.s3.get_bucket(bucket="an-example-bucket")
example_resource = aws.lakeformation.Resource("exampleResource", arn=example_bucket.arn)
resources:
exampleResource:
type: aws:lakeformation:Resource
properties:
arn: ${exampleBucket.arn}
variables:
exampleBucket:
fn::invoke:
Function: aws:s3:getBucket
Arguments:
bucket: an-example-bucket
Create Resource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Resource(name: string, args: ResourceArgs, opts?: CustomResourceOptions);@overload
def Resource(resource_name: str,
args: ResourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Resource(resource_name: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
role_arn: Optional[str] = None)func NewResource(ctx *Context, name string, args ResourceArgs, opts ...ResourceOption) (*Resource, error)public Resource(string name, ResourceArgs args, CustomResourceOptions? opts = null)
public Resource(String name, ResourceArgs args)
public Resource(String name, ResourceArgs args, CustomResourceOptions options)
type: aws:lakeformation:Resource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ResourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleresourceResourceResourceFromLakeformationresource = new Aws.LakeFormation.Resource("exampleresourceResourceResourceFromLakeformationresource", new()
{
Arn = "string",
RoleArn = "string",
});
example, err := lakeformation.NewResource(ctx, "exampleresourceResourceResourceFromLakeformationresource", &lakeformation.ResourceArgs{
Arn: pulumi.String("string"),
RoleArn: pulumi.String("string"),
})
var exampleresourceResourceResourceFromLakeformationresource = new com.pulumi.aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource", com.pulumi.aws.lakeformation.ResourceArgs.builder()
.arn("string")
.roleArn("string")
.build());
exampleresource_resource_resource_from_lakeformationresource = aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource",
arn="string",
role_arn="string")
const exampleresourceResourceResourceFromLakeformationresource = new aws.lakeformation.Resource("exampleresourceResourceResourceFromLakeformationresource", {
arn: "string",
roleArn: "string",
});
type: aws:lakeformation:Resource
properties:
arn: string
roleArn: string
Resource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Resource resource accepts the following input properties:
- Arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- Role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- Arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- Role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn String
- Amazon Resource Name (ARN) of the resource, an S3 path.
- role
Arn String Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn str
- Amazon Resource Name (ARN) of the resource, an S3 path.
- role_
arn str Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn String
- Amazon Resource Name (ARN) of the resource, an S3 path.
- role
Arn String Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
Outputs
All input properties are implicitly available as output properties. Additionally, the Resource resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - (Optional) The date and time the resource was last modified in RFC 3339 format.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- id str
- The provider-assigned unique ID for this managed resource.
- last_
modified str - (Optional) The date and time the resource was last modified in RFC 3339 format.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Modified String - (Optional) The date and time the resource was last modified in RFC 3339 format.
Look up Existing Resource Resource
Get an existing Resource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ResourceState, opts?: CustomResourceOptions): Resource@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
last_modified: Optional[str] = None,
role_arn: Optional[str] = None) -> Resourcefunc GetResource(ctx *Context, name string, id IDInput, state *ResourceState, opts ...ResourceOption) (*Resource, error)public static Resource Get(string name, Input<string> id, ResourceState? state, CustomResourceOptions? opts = null)public static Resource get(String name, Output<String> id, ResourceState state, CustomResourceOptions options)resources: _: type: aws:lakeformation:Resource get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- Last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- Role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- Arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- Last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- Role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn String
- Amazon Resource Name (ARN) of the resource, an S3 path.
- last
Modified String - (Optional) The date and time the resource was last modified in RFC 3339 format.
- role
Arn String Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn string
- Amazon Resource Name (ARN) of the resource, an S3 path.
- last
Modified string - (Optional) The date and time the resource was last modified in RFC 3339 format.
- role
Arn string Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn str
- Amazon Resource Name (ARN) of the resource, an S3 path.
- last_
modified str - (Optional) The date and time the resource was last modified in RFC 3339 format.
- role_
arn str Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
- arn String
- Amazon Resource Name (ARN) of the resource, an S3 path.
- last
Modified String - (Optional) The date and time the resource was last modified in RFC 3339 format.
- role
Arn String Role that has read/write access to the resource. If not provided, the Lake Formation service-linked role must exist and is used.
NOTE: AWS does not support registering an S3 location with an IAM role and subsequently updating the S3 location registration to a service-linked role.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Mar 10, 2026 by Pulumi
