Skip to content

Instantly share code, notes, and snippets.

@bkruger99
Created October 11, 2016 01:22
Show Gist options
  • Save bkruger99/4f9ab0f5a8e3aaf4aff0e506b8c3d81e to your computer and use it in GitHub Desktop.
Save bkruger99/4f9ab0f5a8e3aaf4aff0e506b8c3d81e to your computer and use it in GitHub Desktop.
aws SQS Sender ID attribute
What I notice from SQS SenderID attributes so far:
Autoscale Group SNS:
AIDAIT2UOQQY3AUEKVGXU
Lambda SQS Message:
AROAIL6GAI2XEC672SWG2:awslambda_39_20161007224708400
EC2 SQS Message
AROAIL6GAI2XEC672SWG2:i-12345678901234567 (known as the instance id that sent the message, but no account number if cross account)
python regexes:
instances: (?P<instance>i-[a-fA-F0-9]{17})
lambda: (?P<lambda>awslambda_[0-9]{2}_(?P<year>(?:19|20)\d\d)(?P<month>0[1-9]|1[012])(?P<day>0[1-9]|[12][0-9]|3[01])(?P<hour>[0-2][0-9])(?P<mins>[0-5][0-9])(?P<seconds>[0-5][0-9])(?P<nano>[0-9][0-9][0-9]))
one big one to catch them all (also ugly for now)
(?P<awsid>[A-Za-z0-9]{21})(:((?P<instance>i-[a-fA-F0-9]{17})|(?P<lambda>awslambda_[0-9]{2}_(?P<year>(?:19|20)\d\d)(?P<month>0[1-9]|1[012])(?P<day>0[1-9]|[12][0-9]|3[01])(?P<hour>[0-2][0-9])(?P<mins>[0-5][0-9])(?P<seconds>[0-5][0-9])(?P<nano>[0-9][0-9][0-9]))))?
awsid is the default aws sending id, whatever it may be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment