Hi Everyone Im using windows + AWS + Typescript + ...
# aws
c
Hi Everyone Im using windows + AWS + Typescript + visual studio code need to create a EC2 instance on my personal test account, How do I do that ?? Need Help
b
Hey, we've got a getting started guide here. That should be a good place to start
c
Yes I have followed the page.
I am not able to reflect the instance created on my account
const eip = new aws.ec2.Eip("myeip"); const securityGroup = new aws.ec2.SecurityGroup("mysecuritygroup", { ingress: [ { protocol: "tcp", fromPort: 80, toPort: 80, cidrBlocks: ["0.0.0.0/0"] }, ], }); const vpc = new aws.ec2.Vpc("myvpc", { cidrBlock: "10.0.0.0/16" }) const internetGateway = new aws.ec2.InternetGateway("myinternetgateway", { vpcId: vpc.id, }); const publicRouteTable = new aws.ec2.RouteTable("myroutetable", { routes: [ { cidrBlock: "0.0.0.0/0", gatewayId: internetGateway.id, }, ], vpcId: vpc.id, });
I was able to create security groups, eip & vpc but the code doesn;t able to create the instance
✔️ 1
b
Can you show me the entire file please. It's saying that the bucket name you've given is invalid
👍 1
c
const myVpc = new aws.ec2.Vpc("myVpc", {     cidrBlock: "10.0.0.0/16",     tags: {         Name: "DemoVpc",     }, }); const mySubnet = new aws.ec2.Subnet("mySubnet", {     vpcId: myVpc.id,     cidrBlock: "10.0.0.0/16",     tags: {         Name: "DemoSubnet",     }, }); const fooNetworkInterface = new aws.ec2.NetworkInterface("ExcelNetworkInterface", {     subnetId: mySubnet.id,     privateIps: ["10.0.0.100"],     tags: {         Name: "primary_network_interface",     }, }); const fooInstance = new aws.ec2.Instance("fooInstance", {     ami: "ami-008806d238cf70838",     instanceType: "t2.micro",     networkInterfaces: [{         networkInterfaceId: fooNetworkInterface.id,         deviceIndex: 0,     }],     creditSpecification: {         cpuCredits: "unlimited",     }, });
b
I don't see any s3 buckets there. Are you still getting the same error with the above code?