• Purging CloudFront Caches

    I had a image uploaded that had some information I didn’t mean to post. I made the change but it was already cached in CloudFront. To remove it so it will pickup the updated image, I had to invalidate it (Web Distributions only). First I had to create a .json file with the path to the image in the bucket: { "Paths": { "Quantity": 2, "Items": [ "/YOUR/PATH/TO/THE/FILE/IN/S3.jpg", "/YOUR/OTHER/PATH/TO/THE/FILE/IN/S3/*" ] }, "CallerReference": "removing image with info" } Then run this command line with the CloudFront distribution id and the path to the .
  • Configuring the Terminal Prompt

    I was recommended this tool to help you know what git branch you are working on from the terminal prompt. https://github.com/jimeh/git-aware-prompt Configurations I added the configuration to my settings in: vi ~/.bash_profile # http://stackoverflow.com/questions/10406926/how-to-change-default-virtualenvwrapper-prompt export GITAWAREPROMPT=~/.bash/git-aware-prompt source "${GITAWAREPROMPT}/main.sh" #/Users/patty/.virtualenvs/postactivate export PS1="\n\u@\h\n[\w]\n\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " export SUDO_PS1="\n\[$bakred\]\u@\h\n\[$txtrst\][\w]\n\$ " Then in virtualenvs postacivate I added: vi /Users/pattyr/.virtualenvs/postactivate # This hook is sourced after every virtualenv is activated if [ "${_OLD_VIRTUAL_PS1:0:2}" == "\n" ]; then PS1="\n\[$txtylw\](`basename \"$VIRTUAL_ENV\"`)\n\[$txtrst\]${_OLD_VIRTUAL_PS1:2:${#_OLD_VIRTUAL_PS1}}" fi Before After
  • Solar Panel API Setup

    Description When I saw Enphase allows API connection to the data generated by the solar panels, I had to do something with it. This guide will describe how I setup and collect data to display on the Solar Data page. Because I have a limit on Enphase’s API calls, I collect the data from my solar panels through the API two times a day via a scheduled Lambda function which stores it in a DynamoDB database.
  • Basic Cognito

    Description AWS Coginto is a user mangement tool for web and mobile applications. This project is a basic setup to get familiar with Cognito and the interface. It is meant to run for testing on localhost (or even file://) as passwords are sent in plaintext. Shoutout to Robert for help in getting me started and sharing his html code. Tools Used in this Project Amazon Coginto My Github Project - smylee_basic_cognito Coginto Setup Note: Cognito is still in beta and at times the setup form can be a little flakey.
  • Magic Night Project - Part 2: Slack Slash Commands for GitHub Pull Request Actions

    Description When a custom Slack command is triggered, the corresponding command will change the state of a GitHub pull request. A magic night project provided by AWS User Group Hosted by MindTouch. Tools used in this project Slack: smylee.Slack.com GitHub: GitHub.com/smyleeface/shiny-palm-tree Amazon API Gateway, Lambda, IAM > Roles, Encryption Keys AWS CLI Prerequisites GitHub Pull Request Alert on Slack (Magic Night Project - Part 1) The AWS CLI installed with a user and valid API key with an authorized user to run the kms command before continuing.
  • Magic Night Project - Part 1: GitHub Pull Request Alert on Slack

    Description When a GitHub pull request is made, it will trigger an alert on Slack. A magic night project provided by AWS User Group Hosted by MindTouch. Tools used in this project Slack: smylee.slack.com GitHub: github.com/smyleeface/shiny-palm-tree Amazon API Gateway & Lambda Slack Setup Setup a Slack team if you don’t have one to use. Create a new channel (or skip this step to use an existing channel that the messages will appear.
  • S3 Multifile Upload with Evaporate

    So now that my site is using Hugo for static HTML file generation, S3 to store the files, lambda to trigger the Hugo update, and CloudFront to serve images, the next step is to upload files to S3 directly from the browser. Thanks to my buddy Robert, he got me started and helped me get the API Gateway setup. HTML page with input type of file with evaporate. Include the aws_key, bucket: and aws_url.
  • Hugo Site Auto Generated by Lambda

    Description Static HTML site generated by Hugo site generator. When the content directory in S3 is changed, a Lambda function will trigger Hugo to update. Tools used in this project https://github.com/spf13/hugo/releases https://gohugo.io/ Amazon API Gateway, Lambda, S3, Route 53, CloudFront Prerequisites A domain name (example.com) Setup the Domain Name Route 53 Create Hosted Zone > Domain Name > Public Hosted Zone Add Name Servers to your registrar Create S3 Buckets example.