Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pulumi/aws

Package Overview
Dependencies
Maintainers
2
Versions
1706
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pulumi/aws

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

  • 6.64.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
333K
increased by14.21%
Maintainers
2
Weekly downloads
 
Created

What is @pulumi/aws?

@pulumi/aws is an npm package that allows developers to define, deploy, and manage AWS cloud resources using Pulumi, a modern infrastructure as code platform. It provides a wide range of functionalities to interact with various AWS services programmatically.

What are @pulumi/aws's main functionalities?

Creating an S3 Bucket

This code sample demonstrates how to create an S3 bucket using the @pulumi/aws package. The bucket is created with a private ACL.

const pulumi = require('@pulumi/pulumi');
const aws = require('@pulumi/aws');

const bucket = new aws.s3.Bucket('my-bucket', {
  acl: 'private',
});

exports.bucketName = bucket.id;

Launching an EC2 Instance

This code sample demonstrates how to launch an EC2 instance using the @pulumi/aws package. The instance is created with a specified AMI and instance type.

const pulumi = require('@pulumi/pulumi');
const aws = require('@pulumi/aws');

const instance = new aws.ec2.Instance('my-instance', {
  ami: 'ami-0c55b159cbfafe1f0',
  instanceType: 't2.micro',
});

exports.instanceId = instance.id;

Creating a Lambda Function

This code sample demonstrates how to create a Lambda function using the @pulumi/aws package. It includes creating an IAM role and the Lambda function itself.

const pulumi = require('@pulumi/pulumi');
const aws = require('@pulumi/aws');

const role = new aws.iam.Role('lambdaRole', {
  assumeRolePolicy: aws.iam.assumeRolePolicyForPrincipal({ Service: 'lambda.amazonaws.com' }),
});

const lambda = new aws.lambda.Function('myFunction', {
  runtime: aws.lambda.NodeJS12dXRuntime,
  code: new pulumi.asset.AssetArchive({
    '.': new pulumi.asset.FileArchive('./app'),
  }),
  handler: 'index.handler',
  role: role.arn,
});

exports.functionName = lambda.name;

Setting up a VPC

This code sample demonstrates how to set up a VPC using the @pulumi/aws package. The VPC is created with a specified CIDR block.

const pulumi = require('@pulumi/pulumi');
const aws = require('@pulumi/aws');

const vpc = new aws.ec2.Vpc('my-vpc', {
  cidrBlock: '10.0.0.0/16',
});

exports.vpcId = vpc.id;

Other packages similar to @pulumi/aws

Keywords

FAQs

Package last updated on 06 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc