Package @pulumi/aws
This page documents the language specification for the aws package. If you're looking for help working with the inputs, outputs, or functions of aws resources in a Pulumi program, please see the resource documentation for examples and API reference.
The Amazon Web Services (AWS) provider package offers support for all AWS services and their properties.
Services are exposed as types from modules such as ec2, ecs, lambda, and s3, among many others. Using this
package allows you to programmatically declare instances of any AWS services using infrastructure as code, which
Pulumi then uses to drive the AWS API.
If this is your first time using this package, these two resources may be helpful:
- AWS Getting Started Guide: Get up and running quickly.
- AWS Pulumi Setup Documentation: How to configure Pulumi for use with your AWS account.
Use the navigation below to see detailed documentation, including sample code, for each of the supported AWS services.
This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the
pulumi/pulumi-awsrepo; however, if that doesn’t turn up anything, please consult the sourceterraform-providers/terraform-provider-awsrepo.
var aws = require("@pulumi/aws");
import * as aws from "@pulumi/aws";Modules
- accessanalyzer
- acm
- acmpca
- alb
- apigateway
- apigatewayv2
- appautoscaling
- appmesh
- appsync
- athena
- autoscaling
- backup
- batch
- budgets
- cfg
- cloud9
- cloudformation
- cloudfront
- cloudhsmv2
- cloudtrail
- cloudwatch
- codebuild
- codecommit
- codedeploy
- codepipeline
- codestarnotifications
- cognito
- config
- cur
- datapipeline
- datasync
- dax
- devicefarm
- directconnect
- directoryservice
- dlm
- dms
- docdb
- dynamodb
- ebs
- ec2
- ec2clientvpn
- ec2transitgateway
- ecr
- ecs
- efs
- eks
- elasticache
- elasticbeanstalk
- elasticsearch
- elastictranscoder
- elb
- emr
- fms
- fsx
- gamelift
- glacier
- globalaccelerator
- glue
- guardduty
- iam
- inspector
- iot
- kinesis
- kms
- lambda
- lb
- licensemanager
- lightsail
- macie
- mediaconvert
- mediapackage
- mediastore
- mq
- msk
- neptune
- opsworks
- organizations
- pinpoint
- pricing
- qldb
- quicksight
- ram
- rds
- redshift
- resourcegroups
- route53
- s3
- sagemaker
- secretsmanager
- securityhub
- serverless
- servicecatalog
- servicediscovery
- servicequotas
- ses
- sfn
- shield
- simpledb
- sns
- sqs
- ssm
- storagegateway
- swf
- transfer
- types
- waf
- wafregional
- wafv2
- worklink
- workspaces
- xray
Resources
Functions
- getAmi
- getAmiIds
- getArn
- getAutoscalingGroups
- getAvailabilityZone
- getAvailabilityZones
- getBillingServiceAccount
- getCallerIdentity
- getCanonicalUserId
- getElasticIp
- getIpRanges
- getPartition
- getPrefixList
- getRegion
- getRegions
Others
- AFSouth1Region
- APEast1Region
- APNortheast1Region
- APNortheast2Region
- APSouth1Region
- APSoutheast1Region
- APSouthEast2Region
- ARN
- CACentralRegion
- CNNorth1Region
- CNNorthWest1Region
- EUCentral1Region
- EUNorth1Region
- EUSouth1Region
- EUWest1Region
- EUWest2Region
- EUWest3Region
- GetAmiArgs
- GetAmiIdsArgs
- GetAmiIdsResult
- GetAmiResult
- GetArnArgs
- GetArnResult
- GetAutoscalingGroupsArgs
- GetAutoscalingGroupsResult
- GetAvailabilityZoneArgs
- GetAvailabilityZoneResult
- GetAvailabilityZonesArgs
- GetAvailabilityZonesResult
- GetBillingServiceAccountResult
- GetCallerIdentityResult
- GetCanonicalUserIdResult
- GetElasticIpArgs
- GetElasticIpResult
- getEnv
- getEnvBoolean
- getEnvNumber
- GetIpRangesArgs
- GetIpRangesResult
- GetPartitionResult
- GetPrefixListArgs
- GetPrefixListResult
- GetRegionArgs
- GetRegionResult
- GetRegionsArgs
- GetRegionsResult
- getVersion
- MESouth1Region
- Overwrite
- ProviderArgs
- Region
- SAEast1Region
- Tags
- USEast1Region
- USEast2Region
- USWest1Region
- USWest2Region
Resources
Resource Provider
class Provider extends ProviderResourceThe provider type for the aws package. By default, resources use package-wide configuration
settings, however an explicit Provider instance may be created and passed during resource
construction to achieve fine-grained programmatic control over provider settings. See the
documentation for more information.
constructor
new Provider(name: string, args?: ProviderArgs, opts?: pulumi.ResourceOptions)Create a Provider resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ProviderReturns true if the given object is an instance of Provider. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method register
static register(provider: ProviderResource | undefined): Promise<string | undefined>property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getAmi
getAmi(args: GetAmiArgs, opts?: pulumi.InvokeOptions): Promise<GetAmiResult>Use this data source to get the ID of a registered AMI for use in other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.getAmi({
executableUsers: ["self"],
filters: [
{
name: "name",
values: ["myami-*"],
},
{
name: "root-device-type",
values: ["ebs"],
},
{
name: "virtualization-type",
values: ["hvm"],
},
],
mostRecent: true,
nameRegex: "^myami-\\d{3}",
owners: ["self"],
}, { async: true }));Function getAmiIds
getAmiIds(args: GetAmiIdsArgs, opts?: pulumi.InvokeOptions): Promise<GetAmiIdsResult>Use this data source to get a list of AMI IDs matching the specified criteria.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const ubuntu = pulumi.output(aws.getAmiIds({
filters: [{
name: "name",
values: ["ubuntu/images/ubuntu-*-*-amd64-server-*"],
}],
owners: ["099720109477"],
}, { async: true }));Function getArn
getArn(args: GetArnArgs, opts?: pulumi.InvokeOptions): Promise<GetArnResult>Parses an Amazon Resource Name (ARN) into its constituent parts.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const dbInstance = pulumi.output(aws.getArn({
arn: "arn:aws:rds:eu-west-1:123456789012:db:mysql-db",
}, { async: true }));Function getAutoscalingGroups
getAutoscalingGroups(args?: GetAutoscalingGroupsArgs, opts?: pulumi.InvokeOptions): Promise<GetAutoscalingGroupsResult>The Autoscaling Groups data source allows access to the list of AWS ASGs within a specific region. This will allow you to pass a list of AutoScaling Groups to other resources.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const groups = pulumi.output(aws.getAutoscalingGroups({
filters: [
{
name: "key",
values: ["Team"],
},
{
name: "value",
values: ["Pets"],
},
],
}, { async: true }));
const slackNotifications = new aws.autoscaling.Notification("slack_notifications", {
groupNames: groups.names,
notifications: [
"autoscaling:EC2_INSTANCE_LAUNCH",
"autoscaling:EC2_INSTANCE_TERMINATE",
"autoscaling:EC2_INSTANCE_LAUNCH_ERROR",
"autoscaling:EC2_INSTANCE_TERMINATE_ERROR",
],
topicArn: "TOPIC ARN",
});Function getAvailabilityZone
getAvailabilityZone(args?: GetAvailabilityZoneArgs, opts?: pulumi.InvokeOptions): Promise<GetAvailabilityZoneResult>aws.getAvailabilityZone provides details about a specific availability zone (AZ)
in the current region.
This can be used both to validate an availability zone given in a variable and to split the AZ name into its component parts of an AWS region and an AZ identifier letter. The latter may be useful e.g. for implementing a consistent subnet numbering scheme across several regions by mapping both the region and the subnet letter to network numbers.
This is different from the aws.getAvailabilityZones (plural) data source,
which provides a list of the available zones.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const config = new pulumi.Config();
const regionNumber = config.get("regionNumber") || {
"ap-northeast-1": 5,
"eu-central-1": 4,
"us-east-1": 1,
"us-west-1": 2,
"us-west-2": 3,
};
const azNumber = config.get("azNumber") || {
a: 1,
b: 2,
c: 3,
d: 4,
e: 5,
f: 6,
};
// Retrieve the AZ where we want to create network resources
// This must be in the region selected on the AWS provider.
const exampleAvailabilityZone = pulumi.output(aws.getAvailabilityZone({
name: "eu-central-1a",
}, { async: true }));
// Create a VPC for the region associated with the AZ
const exampleVpc = new aws.ec2.Vpc("example", {
cidrBlock: exampleAvailabilityZone.apply(exampleAvailabilityZone => (() => {
throw "tf2pulumi error: NYI: call to cidrsubnet";
return (() => { throw "NYI: call to cidrsubnet"; })();
})()),
});
// Create a subnet for the AZ within the regional VPC
const exampleSubnet = new aws.ec2.Subnet("example", {
cidrBlock: pulumi.all([exampleVpc.cidrBlock, exampleAvailabilityZone]).apply(([cidrBlock, exampleAvailabilityZone]) => (() => {
throw "tf2pulumi error: NYI: call to cidrsubnet";
return (() => { throw "NYI: call to cidrsubnet"; })();
})()),
vpcId: exampleVpc.id,
});Function getAvailabilityZones
getAvailabilityZones(args?: GetAvailabilityZonesArgs, opts?: pulumi.InvokeOptions): Promise<GetAvailabilityZonesResult>The Availability Zones data source allows access to the list of AWS Availability Zones which can be accessed by an AWS account within the region configured in the provider.
This is different from the aws.getAvailabilityZone (singular) data source,
which provides some details about a specific availability zone.
When Local Zones are enabled in a region, by default the API and this data source include both Local Zones and Availability Zones. To return only Availability Zones, see the example section below.
Example Usage
By State
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const available = aws.getAvailabilityZones({
state: "available",
});
const primary = new aws.ec2.Subnet("primary", {availabilityZone: available.then(available => available.names[0])});
// ...
const secondary = new aws.ec2.Subnet("secondary", {availabilityZone: available.then(available => available.names[1])});
// ...By Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = pulumi.output(aws.getAvailabilityZones({
allAvailabilityZones: true,
filters: [{
name: "opt-in-status",
values: [
"not-opted-in",
"opted-in",
],
}],
}, { async: true }));Function getBillingServiceAccount
getBillingServiceAccount(opts?: pulumi.InvokeOptions): Promise<GetBillingServiceAccountResult>Use this data source to get the Account ID of the AWS Billing and Cost Management Service Account for the purpose of whitelisting in S3 bucket policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = pulumi.output(aws.getBillingServiceAccount({ async: true }));
const billingLogs = new aws.s3.Bucket("billing_logs", {
acl: "private",
policy: pulumi.interpolate`{
"Id": "Policy",
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:GetBucketAcl", "s3:GetBucketPolicy"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-billing-tf-test-bucket",
"Principal": {
"AWS": [
"${main.arn}"
]
}
},
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-billing-tf-test-bucket/*",
"Principal": {
"AWS": [
"${main.arn}"
]
}
}
]
}
`,
});Function getCallerIdentity
getCallerIdentity(opts?: pulumi.InvokeOptions): Promise<GetCallerIdentityResult>Use this data source to get the access to the effective Account ID, User ID, and ARN in which this provider is authorized.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getCallerIdentity({ async: true }));
export const accountId = current.accountId;
export const callerArn = current.arn;
export const callerUser = current.userId;Function getCanonicalUserId
getCanonicalUserId(opts?: pulumi.InvokeOptions): Promise<GetCanonicalUserIdResult>The Canonical User ID data source allows access to the canonical user ID for the effective account in which this provider is working.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getCanonicalUserId({ async: true }));
export const canonicalUserId = current.id;Function getElasticIp
getElasticIp(args?: GetElasticIpArgs, opts?: pulumi.InvokeOptions): Promise<GetElasticIpResult>aws.ec2.Eip provides details about a specific Elastic IP.
Example Usage
Search By Allocation ID (VPC only)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const byAllocationId = pulumi.output(aws.getElasticIp({
id: "eipalloc-12345678",
}, { async: true }));Search By Filters (EC2-Classic or VPC)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const byFilter = pulumi.output(aws.getElasticIp({
filters: [{
name: "tag:Name",
values: ["exampleNameTagValue"],
}],
}, { async: true }));Search By Public IP (EC2-Classic or VPC)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const byPublicIp = pulumi.output(aws.getElasticIp({
publicIp: "1.2.3.4",
}, { async: true }));Search By Tags (EC2-Classic or VPC)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const byTags = pulumi.output(aws.getElasticIp({
tags: {
Name: "exampleNameTagValue",
},
}, { async: true }));Function getIpRanges
getIpRanges(args: GetIpRangesArgs, opts?: pulumi.InvokeOptions): Promise<GetIpRangesResult>Use this data source to get the IP ranges of various AWS products and services. For more information about the contents of this data source and required JSON syntax if referencing a custom URL, see the AWS IP Address Ranges documention.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const europeanEc2 = aws.getIpRanges({
regions: [
"eu-west-1",
"eu-central-1",
],
services: ["ec2"],
});
const fromEurope = new aws.ec2.SecurityGroup("fromEurope", {
ingress: [{
fromPort: "443",
toPort: "443",
protocol: "tcp",
cidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.cidrBlocks),
ipv6CidrBlocks: europeanEc2.then(europeanEc2 => europeanEc2.ipv6CidrBlocks),
}],
tags: {
CreateDate: europeanEc2.then(europeanEc2 => europeanEc2.createDate),
SyncToken: europeanEc2.then(europeanEc2 => europeanEc2.syncToken),
},
});Function getPartition
getPartition(opts?: pulumi.InvokeOptions): Promise<GetPartitionResult>Use this data source to lookup current AWS partition in which this provider is working
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getPartition({ async: true }));
const s3Policy = current.apply(current => aws.iam.getPolicyDocument({
statements: [{
actions: ["s3:ListBucket"],
resources: [`arn:${current.partition}:s3:::my-bucket`],
sid: "1",
}],
}, { async: true }));Function getPrefixList
getPrefixList(args?: GetPrefixListArgs, opts?: pulumi.InvokeOptions): Promise<GetPrefixListResult>aws.getPrefixList provides details about a specific prefix list (PL)
in the current region.
This can be used both to validate a prefix list given in a variable and to obtain the CIDR blocks (IP address ranges) for the associated AWS service. The latter may be useful e.g. for adding network ACL rules.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const privateS3VpcEndpoint = new aws.ec2.VpcEndpoint("private_s3", {
serviceName: "com.amazonaws.us-west-2.s3",
vpcId: aws_vpc_foo.id,
});
const privateS3PrefixList = privateS3VpcEndpoint.prefixListId.apply(prefixListId => aws.getPrefixList({
prefixListId: prefixListId,
}, { async: true }));
const bar = new aws.ec2.NetworkAcl("bar", {
vpcId: aws_vpc_foo.id,
});
const privateS3NetworkAclRule = new aws.ec2.NetworkAclRule("private_s3", {
cidrBlock: privateS3PrefixList.apply(privateS3PrefixList => privateS3PrefixList.cidrBlocks[0]),
egress: false,
fromPort: 443,
networkAclId: bar.id,
protocol: "tcp",
ruleAction: "allow",
ruleNumber: 200,
toPort: 443,
});Filter
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = pulumi.output(aws.getPrefixList({
filters: [{
name: "prefix-list-id",
values: ["pl-68a54001"],
}],
}, { async: true }));Function getRegion
getRegion(args?: GetRegionArgs, opts?: pulumi.InvokeOptions): Promise<GetRegionResult>aws.getRegion provides details about a specific AWS region.
As well as validating a given region name this resource can be used to discover the name of the region configured within the provider. The latter can be useful in a child module which is inheriting an AWS provider configuration from its parent module.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getRegion({ async: true }));Function getRegions
getRegions(args?: GetRegionsArgs, opts?: pulumi.InvokeOptions): Promise<GetRegionsResult>Provides information about AWS Regions. Can be used to filter regions i.e. by Opt-In status or only regions enabled for current account. To get details like endpoint and description of each region the data source can be combined with the aws.getRegion data source.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getRegions({ async: true }));Others
let AFSouth1Region
let AFSouth1Region: Region = "af-south-1";let APEast1Region
let APEast1Region: Region = "ap-east-1";let APNortheast1Region
let APNortheast1Region: Region = "ap-northeast-1";let APNortheast2Region
let APNortheast2Region: Region = "ap-northeast-2";let APSouth1Region
let APSouth1Region: Region = "ap-south-1";let APSoutheast1Region
let APSoutheast1Region: Region = "ap-southeast-1";let APSouthEast2Region
let APSouthEast2Region: Region = "ap-southeast-2";type ARN
type ARN = string;An ARN is an Amazon Resource Name, and uniquely identifies a region globally across all accounts and regions.
let CACentralRegion
let CACentralRegion: Region = "ca-central-1";let CNNorth1Region
let CNNorth1Region: Region = "cn-north-1";let CNNorthWest1Region
let CNNorthWest1Region: Region = "cn-northwest-1";let EUCentral1Region
let EUCentral1Region: Region = "eu-central-1";let EUNorth1Region
let EUNorth1Region: Region = "eu-north-1";let EUSouth1Region
let EUSouth1Region: Region = "eu-south-1";let EUWest1Region
let EUWest1Region: Region = "eu-west-1";let EUWest2Region
let EUWest2Region: Region = "eu-west-2";let EUWest3Region
let EUWest3Region: Region = "eu-west-3";interface GetAmiArgs
interface GetAmiArgsA collection of arguments for invoking getAmi.
property executableUsers
executableUsers?: string[];Limit search to users with explicit launch permission on
the image. Valid items are the numeric account ID or self.
property filters
filters?: GetAmiFilter[];One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
property mostRecent
mostRecent?: undefined | false | true;If more than one result is returned, use the most recent AMI.
property nameRegex
nameRegex?: undefined | string;A regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. It is recommended to combine this with other options to narrow down the list AWS returns.
property owners
owners: string[];List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, self (the current account), or an AWS owner alias (e.g. amazon, aws-marketplace, microsoft).
property tags
tags?: undefined | {[key: string]: any};Any tags assigned to the image.
* tags.#.key - The key name of the tag.
* tags.#.value - The value of the tag.
interface GetAmiIdsArgs
interface GetAmiIdsArgsA collection of arguments for invoking getAmiIds.
property executableUsers
executableUsers?: string[];Limit search to users with explicit launch
permission on the image. Valid items are the numeric account ID or self.
property filters
filters?: GetAmiIdsFilter[];One or more name/value pairs to filter off of. There are several valid keys, for a full reference, check out [describe-images in the AWS CLI reference][1].
property nameRegex
nameRegex?: undefined | string;A regex string to apply to the AMI list returned by AWS. This allows more advanced filtering not supported from the AWS API. This filtering is done locally on what AWS returns, and could have a performance impact if the result is large. It is recommended to combine this with other options to narrow down the list AWS returns.
property owners
owners: string[];List of AMI owners to limit search. At least 1 value must be specified. Valid values: an AWS account ID, self (the current account), or an AWS owner alias (e.g. amazon, aws-marketplace, microsoft).
property sortAscending
sortAscending?: undefined | false | true;Used to sort AMIs by creation time.
interface GetAmiIdsResult
interface GetAmiIdsResultA collection of values returned by getAmiIds.
property executableUsers
executableUsers?: string[];property filters
filters?: GetAmiIdsFilter[];property id
id: string;The provider-assigned unique ID for this managed resource.
property ids
ids: string[];property nameRegex
nameRegex?: undefined | string;property owners
owners: string[];property sortAscending
sortAscending?: undefined | false | true;interface GetAmiResult
interface GetAmiResultA collection of values returned by getAmi.
property architecture
architecture: string;The OS architecture of the AMI (ie: i386 or x8664).
property blockDeviceMappings
blockDeviceMappings: GetAmiBlockDeviceMapping[];The block device mappings of the AMI.
* block_device_mappings.#.device_name - The physical name of the device.
* block_device_mappings.#.ebs.delete_on_termination - true if the EBS volume
will be deleted on termination.
* block_device_mappings.#.ebs.encrypted - true if the EBS volume
is encrypted.
* block_device_mappings.#.ebs.iops - 0 if the EBS volume is
not a provisioned IOPS image, otherwise the supported IOPS count.
* block_device_mappings.#.ebs.snapshot_id - The ID of the snapshot.
* block_device_mappings.#.ebs.volume_size - The size of the volume, in GiB.
* block_device_mappings.#.ebs.volume_type - The volume type.
* block_device_mappings.#.no_device - Suppresses the specified device
included in the block device mapping of the AMI.
* block_device_mappings.#.virtual_name - The virtual device name (for
instance stores).
property creationDate
creationDate: string;The date and time the image was created.
property description
description: string;The description of the AMI that was provided during image creation.
property executableUsers
executableUsers?: string[];property filters
filters?: GetAmiFilter[];property hypervisor
hypervisor: string;The hypervisor type of the image.
property id
id: string;The provider-assigned unique ID for this managed resource.
property imageId
imageId: string;The ID of the AMI. Should be the same as the resource id.
property imageLocation
imageLocation: string;The location of the AMI.
property imageOwnerAlias
imageOwnerAlias: string;The AWS account alias (for example, amazon, self) or
the AWS account ID of the AMI owner.
property imageType
imageType: string;The type of image.
property kernelId
kernelId: string;The kernel associated with the image, if any. Only applicable for machine images.
property mostRecent
mostRecent?: undefined | false | true;property name
name: string;The name of the AMI that was provided during image creation.
property nameRegex
nameRegex?: undefined | string;property ownerId
ownerId: string;The AWS account ID of the image owner.
property owners
owners: string[];property platform
platform: string;The value is Windows for Windows AMIs; otherwise blank.
property productCodes
productCodes: GetAmiProductCode[];Any product codes associated with the AMI.
* product_codes.#.product_code_id - The product code.
* product_codes.#.product_code_type - The type of product code.
property public
public: boolean;true if the image has public launch permissions.
property ramdiskId
ramdiskId: string;The RAM disk associated with the image, if any. Only applicable for machine images.
property rootDeviceName
rootDeviceName: string;The device name of the root device.
property rootDeviceType
rootDeviceType: string;The type of root device (ie: ebs or instance-store).
property rootSnapshotId
rootSnapshotId: string;The snapshot id associated with the root device, if any
(only applies to ebs root devices).
property sriovNetSupport
sriovNetSupport: string;Specifies whether enhanced networking is enabled.
property state
state: string;The current state of the AMI. If the state is available, the image
is successfully registered and can be used to launch an instance.
property stateReason
stateReason: {[key: string]: any};Describes a state change. Fields are UNSET if not available.
* state_reason.code - The reason code for the state change.
* state_reason.message - The message for the state change.
property tags
tags: {[key: string]: any};Any tags assigned to the image.
* tags.#.key - The key name of the tag.
* tags.#.value - The value of the tag.
property virtualizationType
virtualizationType: string;The type of virtualization of the AMI (ie: hvm or
paravirtual).
interface GetArnArgs
interface GetArnArgsA collection of arguments for invoking getArn.
property arn
arn: string;The ARN to parse.
interface GetArnResult
interface GetArnResultA collection of values returned by getArn.
property account
account: string;The ID of the AWS account that owns the resource, without the hyphens.
property arn
arn: string;property id
id: string;The provider-assigned unique ID for this managed resource.
property partition
partition: string;The partition that the resource is in.
property region
region: string;The region the resource resides in. Note that the ARNs for some resources do not require a region, so this component might be omitted.
property resource
resource: string;The content of this part of the ARN varies by service. It often includes an indicator of the type of resource—for example, an IAM user or Amazon RDS database —followed by a slash (/) or a colon (:), followed by the resource name itself.
property service
service: string;The service namespace that identifies the AWS product.
interface GetAutoscalingGroupsArgs
interface GetAutoscalingGroupsArgsA collection of arguments for invoking getAutoscalingGroups.
property filters
filters?: GetAutoscalingGroupsFilter[];A filter used to scope the list e.g. by tags. See related docs.
interface GetAutoscalingGroupsResult
interface GetAutoscalingGroupsResultA collection of values returned by getAutoscalingGroups.
property arns
arns: string[];A list of the Autoscaling Groups Arns in the current region.
property filters
filters?: GetAutoscalingGroupsFilter[];property id
id: string;The provider-assigned unique ID for this managed resource.
property names
names: string[];A list of the Autoscaling Groups in the current region.
interface GetAvailabilityZoneArgs
interface GetAvailabilityZoneArgsA collection of arguments for invoking getAvailabilityZone.
property allAvailabilityZones
allAvailabilityZones?: undefined | false | true;Set to true to include all Availability Zones and Local Zones regardless of your opt in status.
property filters
filters?: GetAvailabilityZoneFilter[];Configuration block(s) for filtering. Detailed below.
property name
name?: undefined | string;The name of the filter field. Valid values can be found in the EC2 DescribeAvailabilityZones API Reference.
property state
state?: undefined | string;A specific availability zone state to require. May be any of "available", "information" or "impaired".
property zoneId
zoneId?: undefined | string;The zone ID of the availability zone to select.
interface GetAvailabilityZoneResult
interface GetAvailabilityZoneResultA collection of values returned by getAvailabilityZone.
property allAvailabilityZones
allAvailabilityZones?: undefined | false | true;property filters
filters?: GetAvailabilityZoneFilter[];property groupName
groupName: string;For Availability Zones, this is the same value as the Region name. For Local Zones, the name of the associated group, for example us-west-2-lax-1.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;property nameSuffix
nameSuffix: string;The part of the AZ name that appears after the region name, uniquely identifying the AZ within its region.
property networkBorderGroup
networkBorderGroup: string;The name of the location from which the address is advertised.
property optInStatus
optInStatus: string;For Availability Zones, this always has the value of opt-in-not-required. For Local Zones, this is the opt in status. The possible values are opted-in and not-opted-in.
property region
region: string;The region where the selected availability zone resides. This is always the region selected on the provider, since this data source searches only within that region.
property state
state: string;property zoneId
zoneId: string;interface GetAvailabilityZonesArgs
interface GetAvailabilityZonesArgsA collection of arguments for invoking getAvailabilityZones.
property allAvailabilityZones
allAvailabilityZones?: undefined | false | true;Set to true to include all Availability Zones and Local Zones regardless of your opt in status.
property blacklistedNames
blacklistedNames?: string[];List of blacklisted Availability Zone names.
property blacklistedZoneIds
blacklistedZoneIds?: string[];List of blacklisted Availability Zone IDs.
property filters
filters?: GetAvailabilityZonesFilter[];Configuration block(s) for filtering. Detailed below.
property groupNames
groupNames?: string[];property state
state?: undefined | string;Allows to filter list of Availability Zones based on their
current state. Can be either "available", "information", "impaired" or
"unavailable". By default the list includes a complete set of Availability Zones
to which the underlying AWS account has access, regardless of their state.
interface GetAvailabilityZonesResult
interface GetAvailabilityZonesResultA collection of values returned by getAvailabilityZones.
property allAvailabilityZones
allAvailabilityZones?: undefined | false | true;property blacklistedNames
blacklistedNames?: string[];property blacklistedZoneIds
blacklistedZoneIds?: string[];property filters
filters?: GetAvailabilityZonesFilter[];property groupNames
groupNames?: string[];property id
id: string;The provider-assigned unique ID for this managed resource.
property names
names: string[];A list of the Availability Zone names available to the account.
property state
state?: undefined | string;property zoneIds
zoneIds: string[];A list of the Availability Zone IDs available to the account.
interface GetBillingServiceAccountResult
interface GetBillingServiceAccountResultA collection of values returned by getBillingServiceAccount.
property arn
arn: string;The ARN of the AWS billing service account.
property id
id: string;The provider-assigned unique ID for this managed resource.
interface GetCallerIdentityResult
interface GetCallerIdentityResultA collection of values returned by getCallerIdentity.
property accountId
accountId: string;The AWS Account ID number of the account that owns or contains the calling entity.
property arn
arn: string;The AWS ARN associated with the calling entity.
property id
id: string;The provider-assigned unique ID for this managed resource.
property userId
userId: string;The unique identifier of the calling entity.
interface GetCanonicalUserIdResult
interface GetCanonicalUserIdResultA collection of values returned by getCanonicalUserId.
property displayName
displayName: string;The human-friendly name linked to the canonical user ID. The bucket owner’s display name. NOTE: This value is only included in the response in the US East (N. Virginia), US West (N. California), US West (Oregon), Asia Pacific (Singapore), Asia Pacific (Sydney), Asia Pacific (Tokyo), EU (Ireland), and South America (São Paulo) regions.
property id
id: string;The provider-assigned unique ID for this managed resource.
interface GetElasticIpArgs
interface GetElasticIpArgsA collection of arguments for invoking getElasticIp.
property filters
filters?: GetElasticIpFilter[];One or more name/value pairs to use as filters. There are several valid keys, for a full reference, check out the EC2 API Reference.
property id
id?: undefined | string;The allocation id of the specific VPC EIP to retrieve. If a classic EIP is required, do NOT set id, only set publicIp
property publicIp
publicIp?: undefined | string;The public IP of the specific EIP to retrieve.
property tags
tags?: undefined | {[key: string]: any};A map of tags, each pair of which must exactly match a pair on the desired Elastic IP
interface GetElasticIpResult
interface GetElasticIpResultA collection of values returned by getElasticIp.
property associationId
associationId: string;The ID representing the association of the address with an instance in a VPC.
property customerOwnedIp
customerOwnedIp: string;Customer Owned IP.
property customerOwnedIpv4Pool
customerOwnedIpv4Pool: string;The ID of a Customer Owned IP Pool. For more on customer owned IP addressed check out Customer-owned IP addresses guide
property domain
domain: string;Indicates whether the address is for use in EC2-Classic (standard) or in a VPC (vpc).
property filters
filters?: GetElasticIpFilter[];property id
id: string;If VPC Elastic IP, the allocation identifier. If EC2-Classic Elastic IP, the public IP address.
property instanceId
instanceId: string;The ID of the instance that the address is associated with (if any).
property networkInterfaceId
networkInterfaceId: string;The ID of the network interface.
property networkInterfaceOwnerId
networkInterfaceOwnerId: string;The ID of the AWS account that owns the network interface.
property privateDns
privateDns: string;The Private DNS associated with the Elastic IP address.
property privateIp
privateIp: string;The private IP address associated with the Elastic IP address.
property publicDns
publicDns: string;Public DNS associated with the Elastic IP address.
property publicIp
publicIp: string;Public IP address of Elastic IP.
property publicIpv4Pool
publicIpv4Pool: string;The ID of an address pool.
property tags
tags: {[key: string]: any};Key-value map of tags associated with Elastic IP.
function getEnv
getEnv(vars: string[]): string | undefinedfunction getEnvBoolean
getEnvBoolean(vars: string[]): boolean | undefinedfunction getEnvNumber
getEnvNumber(vars: string[]): number | undefinedinterface GetIpRangesArgs
interface GetIpRangesArgsA collection of arguments for invoking getIpRanges.
property regions
regions?: string[];Filter IP ranges by regions (or include all regions, if
omitted). Valid items are global (for cloudfront) as well as all AWS regions
(e.g. eu-central-1)
property services
services: string[];Filter IP ranges by services. Valid items are amazon
(for amazon.com), amazonConnect, apiGateway, cloud9, cloudfront,
codebuild, dynamodb, ec2, ec2InstanceConnect, globalaccelerator,
route53, route53Healthchecks, s3 and workspacesGateways. See the
[service attribute][2] documentation for other possible values.
property url
url?: undefined | string;Custom URL for source JSON file. Syntax must match AWS IP Address Ranges documention. Defaults to https://ip-ranges.amazonaws.com/ip-ranges.json.
interface GetIpRangesResult
interface GetIpRangesResultA collection of values returned by getIpRanges.
property cidrBlocks
cidrBlocks: string[];The lexically ordered list of CIDR blocks.
property createDate
createDate: string;The publication time of the IP ranges (e.g. 2016-08-03-23-46-05).
property id
id: string;The provider-assigned unique ID for this managed resource.
property ipv6CidrBlocks
ipv6CidrBlocks: string[];The lexically ordered list of IPv6 CIDR blocks.
property regions
regions?: string[];property services
services: string[];property syncToken
syncToken: number;The publication time of the IP ranges, in Unix epoch time format
(e.g. 1470267965).
property url
url?: undefined | string;interface GetPartitionResult
interface GetPartitionResultA collection of values returned by getPartition.
property dnsSuffix
dnsSuffix: string;property id
id: string;The provider-assigned unique ID for this managed resource.
property partition
partition: string;interface GetPrefixListArgs
interface GetPrefixListArgsA collection of arguments for invoking getPrefixList.
property filters
filters?: GetPrefixListFilter[];Configuration block(s) for filtering. Detailed below.
property name
name?: undefined | string;The name of the filter field. Valid values can be found in the EC2 DescribePrefixLists API Reference.
property prefixListId
prefixListId?: undefined | string;The ID of the prefix list to select.
interface GetPrefixListResult
interface GetPrefixListResultA collection of values returned by getPrefixList.
property cidrBlocks
cidrBlocks: string[];The list of CIDR blocks for the AWS service associated with the prefix list.
property filters
filters?: GetPrefixListFilter[];property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;The name of the selected prefix list.
property prefixListId
prefixListId?: undefined | string;interface GetRegionArgs
interface GetRegionArgsA collection of arguments for invoking getRegion.
property endpoint
endpoint?: undefined | string;The EC2 endpoint of the region to select.
property name
name?: undefined | string;The full name of the region to select.
interface GetRegionResult
interface GetRegionResultA collection of values returned by getRegion.
property description
description: string;The region’s description in this format: “Location (Region name)”.
property endpoint
endpoint: string;The EC2 endpoint for the selected region.
property id
id: string;The provider-assigned unique ID for this managed resource.
property name
name: string;The name of the selected region.
interface GetRegionsArgs
interface GetRegionsArgsA collection of arguments for invoking getRegions.
property allRegions
allRegions?: undefined | false | true;If true the source will query all regions regardless of availability.
property filters
filters?: GetRegionsFilter[];Configuration block(s) to use as filters. Detailed below.
interface GetRegionsResult
interface GetRegionsResultA collection of values returned by getRegions.
property allRegions
allRegions?: undefined | false | true;property filters
filters?: GetRegionsFilter[];property id
id: string;The provider-assigned unique ID for this managed resource.
property names
names: string[];Names of regions that meets the criteria.
function getVersion
getVersion(): stringlet MESouth1Region
let MESouth1Region: Region = "me-south-1";type Overwrite
type Overwrite = Pick<T, Diff<keyof T, keyof U>> & U;interface ProviderArgs
interface ProviderArgsThe set of arguments for constructing a Provider resource.
property accessKey
accessKey?: pulumi.Input<string>;The access key for API operations. You can retrieve this from the ‘Security & Credentials’ section of the AWS console.
property allowedAccountIds
allowedAccountIds?: pulumi.Input<pulumi.Input<string>[]>;property assumeRole
assumeRole?: pulumi.Input<ProviderAssumeRole>;property endpoints
endpoints?: pulumi.Input<pulumi.Input<ProviderEndpoint>[]>;property forbiddenAccountIds
forbiddenAccountIds?: pulumi.Input<pulumi.Input<string>[]>;property ignoreTags
ignoreTags?: pulumi.Input<ProviderIgnoreTags>;Configuration block with settings to ignore resource tags across all resources.
property insecure
insecure?: pulumi.Input<boolean>;Explicitly allow the provider to perform “insecure” SSL requests. If omitted,default value is false
property maxRetries
maxRetries?: pulumi.Input<number>;The maximum number of times an AWS API request is being executed. If the API request still fails, an error is thrown.
property profile
profile?: pulumi.Input<string>;The profile for API operations. If not set, the default profile created with aws configure will be used.
property region
region?: pulumi.Input<Region>;The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc.
property s3ForcePathStyle
s3ForcePathStyle?: pulumi.Input<boolean>;Set this to true to force the request to use path-style addressing, i.e., http://s3.amazonaws.com/BUCKET/KEY. By default, the S3 client will use virtual hosted bucket addressing when possible (http://BUCKET.s3.amazonaws.com/KEY). Specific to the Amazon S3 service.
property secretKey
secretKey?: pulumi.Input<string>;The secret key for API operations. You can retrieve this from the ‘Security & Credentials’ section of the AWS console.
property sharedCredentialsFile
sharedCredentialsFile?: pulumi.Input<string>;The path to the shared credentials file. If not set this defaults to ~/.aws/credentials.
property skipCredentialsValidation
skipCredentialsValidation?: pulumi.Input<boolean>;Skip the credentials validation via STS API. Used for AWS API implementations that do not have STS available/implemented.
property skipGetEc2Platforms
skipGetEc2Platforms?: pulumi.Input<boolean>;Skip getting the supported EC2 platforms. Used by users that don’t have ec2:DescribeAccountAttributes permissions.
property skipMetadataApiCheck
skipMetadataApiCheck?: pulumi.Input<boolean>;property skipRegionValidation
skipRegionValidation?: pulumi.Input<boolean>;Skip static validation of region name. Used by users of alternative AWS-like APIs or users w/ access to regions that are not public (yet).
property skipRequestingAccountId
skipRequestingAccountId?: pulumi.Input<boolean>;Skip requesting the account ID. Used for AWS API implementations that do not have IAM/STS API and/or metadata API.
property token
token?: pulumi.Input<string>;session token. A session token is only required if you are using temporary security credentials.
type Region
type Region = "af-south-1" | "ap-east-1" | "ap-northeast-1" | "ap-northeast-2" | "ap-south-1" | "ap-southeast-2" | "ap-southeast-1" | "ca-central-1" | "cn-north-1" | "cn-northwest-1" | "eu-central-1" | "eu-north-1" | "eu-west-1" | "eu-west-2" | "eu-west-3" | "eu-south-1" | "me-south-1" | "sa-east-1" | "us-east-1" | "us-east-2" | "us-west-1" | "us-west-2";A Region represents any valid Amazon region that may be targeted with deployments.
let SAEast1Region
let SAEast1Region: Region = "sa-east-1";interface Tags
interface TagsTags represents a set of key-value string pairs to which can be applied to an AWS resource.
let USEast1Region
let USEast1Region: Region = "us-east-1";let USEast2Region
let USEast2Region: Region = "us-east-2";let USWest1Region
let USWest1Region: Region = "us-west-1";let USWest2Region
let USWest2Region: Region = "us-west-2";