1. Packages
  2. AWS Native

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi

AWS Native

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi

    AWS Native is in public preview. AWS Native provides coverage of all resources in the AWS Cloud Control API, including same-day access to all new AWS resources. However, some AWS resources are not yet available in AWS Native.

    For new projects, we recommend using AWS Native and AWS Classic side-by-side so you can get the speed and correctness benefits of AWS Native where possible. For existing projects, AWS Classic remains fully supported; at this time, we recommend waiting to migrate existing projects to AWS Native.

    The AWS Native provider for Pulumi can provision many of the cloud resources available in AWS. It manages and provisions resources using the AWS Cloud Control API, which typically supports new AWS features on the day of launch. Resources available in the Pulumi AWS Native provider are based on the resources defined in the AWS CloudFormation Registry.

    Hundreds of AWS resources are available in AWS Native. As AWS Cloud Control API adds resources, we will update AWS Native to include them.

    AWS Native must be configured with credentials to deploy and update resources in AWS; see Installation & Configuration for instructions.

    Examples

    Check out the examples below to try out AWS Native:

    import * as awsnative from "@pulumi/aws-native";
    
    const bucket = new awsnative.s3.Bucket("source");
    
    const accessPoint = new awsnative.s3.AccessPoint("ap", {
       bucket: bucket.id,
    });
    
    const objectlambda = new awsnative.s3objectlambda.AccessPoint("objectlambda-ap", {
       objectLambdaConfiguration: {
           supportingAccessPoint: accessPoint.arn,
           transformationConfigurations: [{
               actions: ["GetObject"],
               contentTransformation: {
                   AwsLambda: {
                       FunctionArn: fn.arn,
                   },
               },
           }]
       }
    });
    
    import pulumi
    import pulumi_aws_native as aws_native
    
    my_bucket = aws_native.s3.Bucket("myBucket")
    
    ap = aws_native.s3.AccessPoint("ap", bucket=my_bucket.id)
    
    objectlambdaap = aws_native.s3objectlambda.AccessPoint("objectlambdaap", object_lambda_configuration=aws_native.s3objectlambda.AccessPointObjectLambdaConfigurationArgs(
        supporting_access_point=ap.arn,
        transformation_configurations=[aws_native.s3objectlambda.AccessPointTransformationConfigurationArgs(
            actions=["GetObject"],
            content_transformation={
                "AwsLambda": {
                    "FunctionArn": fn.arn,
                },
            },
        )],
    ))
    
    var bucket = new AwsNative.S3.Bucket("my-bucket");
    
    var accessPoint = new AwsNative.S3.AccessPoint("ap", new AwsNative.S3.AccessPointArgs
    {
        Bucket = bucket.Id
    });
    
    var objectLambda = new AwsNative.S3ObjectLambda.AccessPoint("objectlambda-ap", new AwsNative.S3ObjectLambda.AccessPointArgs
    {
        ObjectLambdaConfiguration = new AwsNative.S3ObjectLambda.Inputs.AccessPointObjectLambdaConfigurationArgs
        {
            SupportingAccessPoint = accessPoint.Arn,
            TransformationConfigurations =
            {
                new AwsNative.S3ObjectLambda.Inputs.AccessPointTransformationConfigurationArgs
                {
                    Actions = { "GetObject" },
                    ContentTransformation = fn.Arn.Apply(arn => new Dictionary<string, object>
                    {
                        ["AwsLambda"] = new Dictionary<string, object>
                        {
                            ["FunctionArn"] = arn
                        }
                    }
                }
            }
        }
    });
    
    func main() {
        pulumi.Run(func(ctx *pulumi.Context) error {
            myBucket, err := s3.NewBucket(ctx, "myBucket", nil)
            if err != nil {
                return err
            }
            ap, err := s3.NewAccessPoint(ctx, "ap", &s3.AccessPointArgs{
                Bucket: myBucket.ID(),
            })
            if err != nil {
                return err
            }
    
            _, err = s3objectlambda.NewAccessPoint(ctx, "objectlambdaap", &s3objectlambda.AccessPointArgs{
                ObjectLambdaConfiguration: &s3objectlambda.AccessPointObjectLambdaConfigurationArgs{
                    SupportingAccessPoint: ap.Arn,
                    TransformationConfigurations: s3objectlambda.AccessPointTransformationConfigurationArray{
                        &s3objectlambda.AccessPointTransformationConfigurationArgs{
                            Actions: pulumi.StringArray{
                                pulumi.String("GetObject"),
                            },
                            ContentTransformation: pulumi.Map{
                                "AwsLambda": pulumi.Map{
                                    "FunctionArn": fn.Arn,
                                },
                            },
                        },
                    },
                },
            })
            if err != nil {
                return err
            }
            return nil
        })
    }
    
    import java.util.Map;
    
    import com.pulumi.Context;
    import com.pulumi.Exports;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    
    import com.pulumi.awsnative.s3.Bucket;
    import com.pulumi.awsnative.s3.AccessPoint;
    import com.pulumi.awsnative.s3.AccessPointArgs;
    import com.pulumi.awsnative.s3objectlambda.inputs.AccessPointObjectLambdaConfigurationArgs;
    import com.pulumi.awsnative.s3objectlambda.inputs.AccessPointTransformationConfigurationArgs;
    
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        private static void stack(Context ctx) {
    
            final var bucket = new Bucket("source");
    
            final var accessPoint = new AccessPoint("ap", AccessPointArgs.builder()
                .bucket(bucket.getId())
                .build());
    
            final Output<String> functionArn = /* your function arn */;
    
            final var contentTransform = functionArn.applyValue(arn ->
                Map.of("AwsLambda", Map.of("FunctionArn", arn))
            );
    
            final var objectLambdaConfig = AccessPointObjectLambdaConfigurationArgs
                .builder()
                .supportingAccessPoint(accessPoint.arn())
                .transformationConfigurations(
                    AccessPointTransformationConfigurationArgs
                        .builder()
                        .actions("GetObject")
                        .contentTransformation(contentTransform)
                        .build()
                )
                .build();
    
            final var objectLambdaArgs = com.pulumi.awsnative.s3objectlambda.AccessPointArgs
                .builder()
                .objectLambdaConfiguration(objectLambdaConfig)
                .build();
    
            final var objectLambda = new com.pulumi.awsnative.s3objectlambda.AccessPoint("objectlambda-ap", objectLambdaArgs);
            ctx.export("objectLambdaArn", objectLambda.arn());
        }
    }
    
    resources:
      myBucket:
        type: 'aws-native:s3:Bucket'
      ap:
        type: 'aws-native:s3:AccessPoint'
        properties:
          bucket: '${myBucket}'
      action:
        type: 'aws-native:s3objectlambda:AccessPoint'
        properties:
          objectLambdaConfiguration:
            supportingAccessPoint: '${ap.Arn}'
            transformationConfigurations:
              - actions:
                  - GetObject
                contentTransformation:
                  AwsLambda:
                    FunctionArn: '${fn.Arn}'
    
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.97.0 published on Wednesday, Feb 21, 2024 by Pulumi