Skip to content

Instantly share code, notes, and snippets.

@quickmute
Last active February 7, 2022 02:54
Show Gist options
  • Save quickmute/bf0730f512e6ab1e4b62711ee2506b37 to your computer and use it in GitHub Desktop.
Save quickmute/bf0730f512e6ab1e4b62711ee2506b37 to your computer and use it in GitHub Desktop.
new rest api
# You should have gotten these from previous steps
$ROLE_ARN = "arn:aws:iam::999999999999:role/delete_me_hyon"
$SNS_TOPIC_ARN = "arn:aws:sns:us-east-1:999999999999:delete_me_hyon"
$REGION = "us-east-1"
# Create a new AWS API GW - REST API
$api_id = aws apigateway create-rest-api --name 'delete_me_hyon' --output text --query 'id' --region $REGION
# Test it
aws apigateway get-resources --rest-api-id $API_ID
# Get the root resource ID, keep this for future reference
$root_resource_id = aws apigateway get-resources --rest-api-id $API_ID --output text --query 'items[0].id' --region $REGION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment