Skip to content

Commit

Permalink
quick fix: parsing json secret
Browse files Browse the repository at this point in the history
  • Loading branch information
RavenEsc committed Jan 10, 2025
1 parent 01bcde2 commit c21e458
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/discordlambda/discordnote.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def lambda_handler(event, context):
SecretId=secret_name
)

secret = json.loads(get_secret_value_response['SecretString'])
webhook = DiscordWebhook(url=secret["DiscordWebhook"])
secret_json = json.loads(get_secret_value_response['SecretString'])
webhook_url = secret_json['DiscordWebhook']
webhook = DiscordWebhook(url=webhook_url)
# EC2 Public Instance
if alert == 'EC2_Public_Instance':
# EC2 values set as variables
Expand Down

0 comments on commit c21e458

Please sign in to comment.