Created
July 18, 2020 03:08
-
-
Save takahashi-h5/9224ef7c75ca8fb77d2f411cda3041e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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