ios-cer-profile-expiration-date-checker
is a tool for checking the expiration dates of iOS certificates and provisioning profiles and post the days left to Slack, by using AWS Lambda and fastlane/spaceship.
- Install AWS CLI if you haven't
- Set up the credentials on your local machine
- Install Docker if you haven't
- Make sure you're in the project root, then execute the script below in terminal. Automatically create docker image and get into the container
$ ./scripts/create-ruby-env.sh
3. After Running the script, make sure you're in the docker container, then execute the script below in the container
bash-4.2# cp -a . /app
bash-4.2# exit
Parameter Key | Parameter Value Example | Description |
---|---|---|
StackName | "iOS-cer-profile-expiration-date-check" |
A name for CloudFormation Stack created ahead of deploying the Lambda function (only alphanumeric characters and hyphens). It creates S3 Bucket, KMS and Execution Role for Lambda. For more information, see cf-template.yaml in templates directory. |
StackNameLambda | "iOS-cer-profile-expiration-date-check-lambda" |
A name for CloudFormation Stack for deploying the Lambda function(only alphanumeric characters and hyphens). For more information, see sam-template.yaml in templates directory. |
CHANNEL | "#general" |
Slack Channel to post message to |
USERNAME | "iOS Monthly Bot" |
Name of this Bot (displayed in Slack) |
ICON | ":iphone:" |
Icon of this Bot (displayed in Slack) |
WARNINGDAY | "60" |
If an expiration day is less than the day, the Slack attachment color will be orange |
DANGERDAY | "30" |
If an expiration day is less than the day, the Slack attachment color will be red |
Specify a Schedule Expression for CloudWatch Event to invoke the Lambda function on a regular schedule. Please specify like ScheduleExpression: <Rate or Cron expression>
as written in line 5. For more information on Schedule Expressions, see AWS official Document, Schedule Expressions Using Rate or Cron.
5. Make sure you're in the project root, then execute the script below in terminal. Automatically create CloudFormation stacks and deploy Lambda in your AWS Account!
$ ./scripts/setup.sh
- Please input the following values (will be encrypted by AWS KMS and set as Environment Variables in the Lambda function)
AppleID:
Your Apple ID to login to the Apple Deeloper PortalPassword:
Your Password to login to the Apple Deeloper PortalWebhookURL:
You Slack Incoming Webhook URL- if error occured, fix the issues and rerun the script.
- you might be better to delete the stacks before rerunning.
- If you'd like to delete all the stacks, please execute
$ ./scripts/delete-all-stacks.sh
in your project root
- if error occured, fix the issues and rerun the script.
This depends on the following libraries.Thanks :)
MIT License, see LICENSE.