gluaaws

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 4 Imported by: 0

README

glua-aws

This is a lua module for aws services

Usage

To use the AWS module in your Lua code:

local aws = require("aws")

-- List EC2 instances by specifying region and profile
local instances = aws.listEC2Instances("us-west-2", "default")

-- Iterate through instances
for _, instance in ipairs(instances) do
    -- Access instance properties
    print("Instance ID:", instance.instanceId)
    print("Instance Type:", instance.instanceType)
    print("State:", instance.state)
    
    -- Access IP addresses (if available)
    if instance.privateIp then
        print("Private IP:", instance.privateIp)
    end
    if instance.publicIp then
        print("Public IP:", instance.publicIp)
    end
    
    -- Access instance tags
    for tagKey, tagValue in pairs(instance.tags) do
        print("Tag:", tagKey, "=", tagValue)
    end
end

Each instance object contains the following properties:

  • instanceId: The EC2 instance ID
  • instanceType: The instance type (e.g., t2.micro)
  • state: Current instance state
  • privateIp: Private IP address (if available)
  • publicIp: Public IP address (if available)
  • tags: Table containing instance tags

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loader

func Loader(L *lua.LState) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL