Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takahashi-h5/9224ef7c75ca8fb77d2f411cda3041e3 to your computer and use it in GitHub Desktop.
Save takahashi-h5/9224ef7c75ca8fb77d2f411cda3041e3 to your computer and use it in GitHub Desktop.
const AWS = require('aws-sdk')
AWS.config.update({ region: 'ap-northeast-1' })
const ec2 = new AWS.EC2({ apiVersion: '2016-11-15' })
exports.handler = async (event) => {
const params = {
GroupIds: [
"sg-0a4bgh87c26a497654"
]
}
const datas = await ec2.describeSecurityGroups(params).promise()
const response = {
statusCode: 200,
body: JSON.stringify(datas),
}
return response
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment