A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
Project description
Amazon Web Services (AWS) provider
The Amazon Web Services (AWS) resource provider for Pulumi lets you use AWS resources in your cloud programs. To use this package, please install the Pulumi CLI first. For a streamlined Pulumi walkthrough, including language runtime installation and AWS configuration, click "Get Started" below.
Installing
This package is available in many languages in the standard packaging formats.
Node.js (Java/TypeScript)
To use from JavaScript or TypeScript in Node.js, install using either npm
:
$ npm install @pulumi/aws
or yarn
:
$ yarn add @pulumi/aws
Python
To use from Python, install using pip
:
$ pip install pulumi_aws
Go
To use from Go, use go get
to grab the latest version of the library
$ go get github.com/pulumi/pulumi-aws/sdk/v4
.NET
To use from .NET, install using dotnet add package
:
$ dotnet add package Pulumi.Aws
Concepts
The @pulumi/aws
package provides a strongly-typed means to create cloud applications that create and interact closely
with AWS resources. Resources are exposed for the entirety of AWS resources and their properties, including (but not
limited to), 'apigateway', 'cloudformation', 'EC2', 'ECS', 'iam', 'lambda', etc. Many convenience APIs have also been
added to make development easier and to help avoid common mistakes, and to get stronger typing.
Serverless Functions
The aws.lambda.CallbackFunction
class allows you to create an AWS lambda function directly out of a JavaScript/TypeScript
function object of the right signature. This allows a Pulumi program to simply define a lambda using a simple lambda in
the language of choice, while having Pulumi itself do the appropriate transformation into the final AWS Lambda resource.
This makes many APIs easier to use, such as defining a Lambda to execute when an S3 Bucket is manipulated,
or a CloudWatch timer is fired. To see some examples of this in action, please refer to the examples/
directory.
The pulumi/pulumi-cloud repo offer higher level abstractions that build on top of this underlying capability.
Configuration
The following configuration points are available:
-
aws:region
- (Required) This is the AWS region. -
aws:accessKey
- (Optional) This is the AWS access key. It can also be sourced from theAWS_ACCESS_KEY_ID
environment variable, or via a shared credentials file ifaws:profile
is specified. -
aws:secretKey
- (Optional) This is the AWS secret key. It can also be sourced from theAWS_SECRET_ACCESS_KEY
environment variable, or via a shared credentials file ifaws:profile
is specified. -
aws:profile
- (Optional) This is the AWS profile name as set in the shared credentials file. -
aws:sharedCredentialsFile
- (Optional) This is the path to the shared credentials file. If this is not set andaws:profile
is specified,~/.aws/credentials
will be used. -
aws:token
- (Optional) Session token for validating temporary credentials. Typically provided after successful identity federation or Multi-Factor Authentication (MFA) login. With MFA login, this is the session token provided afterward, not the 6 digit MFA code used to get temporary credentials. It can also be sourced from theAWS_SESSION_TOKEN
environment variable. -
aws:maxRetries
- (Optional) This is the maximum number of times an API call is retried, in the case where requests are being throttled or experiencing transient failures. The delay between the subsequent API calls increases exponentially. If omitted, the default value is25
. -
aws:allowedAccountIds
- (Optional) List of allowed AWS account IDs to prevent you from mistakenly using an incorrect one. Conflicts withaws:forbiddenAccountIds
. -
aws:forbiddenAccountIds
- (Optional) List of forbidden AWS account IDs to prevent you from mistakenly using the wrong one. Conflicts withaws:allowedAccountIds
. -
aws:assumeRole
- (Optional) Supports the following (optional) arguments:durationSections
: Number of seconds to restrict the assume role session duration.externalId
: External identifier to use when assuming the role.policy
: IAM Policy JSON describing further restricting permissions for the IAM Role being assumed.policyArns
: Set of Amazon Resource Names (ARNs) of IAM Policies describing further restricting permissions for the role.roleArn
: Amazon Resource Name (ARN) of the IAM Role to assume.sessionName
: Session name to use when assuming the role.tags
: Map of assume role session tags. -
aws:insecure
- (Optional) Explicitly allow the provider to perform "insecure" SSL requests. If omitted, the default value isfalse
. -
aws:skipCredentialsValidation
- (Optional) Skip the credentials validation via the STS API. Useful for AWS API implementations that do not have STS available or implemented. Default value istrue
. -
aws:skipGetEc2Platforms
- (Optional) Skip getting the supported EC2 platforms. Used by users that don't have ec2:DescribeAccountAttributes permissions. Default value istrue
. -
aws:skipRegionValidation
- (Optional) Skip validation of provided region name. Useful for AWS-like implementations that use their own region names or to bypass the validation for regions that aren't publicly available yet. Default value istrue
. -
aws:skipRequestionAccountId
- (Optional) Skip requesting the account ID. Useful for AWS API implementations that do not have the IAM, STS API, or metadata API. Default value isfalse
. When specified, the use of ARNs is compromised as there is no accountID available to construct the ARN. -
aws:skipMetadataApiCheck
- (Optional) Skip the AWS Metadata API check. Useful for AWS API implementations that do not have a metadata API endpoint. This provider from authenticating via the Metadata API by default. You may need to use other authentication methods like static credentials, configuration variables, or environment variables. Default istrue
. -
aws:s3ForcePathStyle
- (Optional) 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,http://BUCKET.s3.amazonaws.com/KEY
, when possible. Specific to the Amazon S3 service. Default isfalse
.
Authenticating pulumi-aws via EC2 Instance Metadata?
As of pulumi-aws v3.28.1, the default behaviour for the provider was changed to disable MetadataApiCheck by default. This means, you need to do either of the following
- When using the default provider:
pulumi config set aws:skipMetadataApiCheck false
- When using a named provider
const myProvider = new aws.Provider("named-provider", {
// other config
skipMetadataApiCheck: false,
});
var provider = new Aws.Provider("named-provider", new Aws.ProviderArgs
{
// other config
SkipMetadataApiCheck = false,
});
provider, err := aws.NewProvider(ctx, "named-provider", &aws.ProviderArgs{
// other config
SkipMetadataApiCheck: pulumi.Bool(false),
})
provider = pulumi_aws.Provider('named-provider', skip_metadata_api_check=False)
Reference
For further information, please visit the AWS provider docs or for detailed reference documentation, please visit the API docs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pulumi_aws-4.39.0a1646953771.tar.gz
.
File metadata
- Download URL: pulumi_aws-4.39.0a1646953771.tar.gz
- Upload date:
- Size: 4.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e09d12e467fa25d4822762696f29020c242baf70872f7f8133a37b538185deed |
|
MD5 | 5262877e3ab3332a7bbb7b8fdd15ab13 |
|
BLAKE2b-256 | a8ce3d4d430088696d2ea071b8b1ae4d1263a6e36f1a5e7be2365e6b6c31ff1a |