Giter VIP home page Giter VIP logo

aws-account-alternate-contacts-bootstrap's Introduction

Auto update Account Alternate Contacts for Newly created AWS Accounts

About

This project contains source code and supporting files for a serverless pipeline for automatically updated alternate contacts fora newly created AWS Accounts that you can deploy with the SAM CLI. It includes the following files and folders.

  • account_conctact_bootstrap - Code for the application's Lambda functions.
  • aws-account-contact-bootstrap-template.yaml - A template that defines the application's AWS resources.

The application uses several AWS resources, including AWS Lambda function and Amazon EventBridge Rules. These resources are defined in the aws-account-contact-bootstrap-template.yaml file in this project.

Solution Architecture

Building and Deploying the application

Requirements

Setup

Download or clone this repository.

$ git clone [email protected]:aws-samples/aws-account-contact-bootstrap.git
$ cd aws-account-contact-bootstrap

Update the AWS CLI profile to be used in the profile.txt file. Note: even for default profile ,Create a file with text default in the profile.txt file

To create a new bucket for deployment artifacts, run create-bucket.sh by specifying the region as arguement as shown below.

$ ./create-bucket.sh us-east-1
make_bucket: lambda-artifacts-a5e491dbb5b22e0d

Deploy

To deploy the application, run deploy.sh us-east-1.

$ ./deploy.sh
BUILD SUCCESSFUL in 1s
Successfully packaged artifacts and wrote output template to file out.yml.
Waiting for changeset to be created..
Successfully created/updated stack - aws-account-contact-bootstrap

This script uses AWS CloudFormation to deploy the Lambda functions and an IAM role. If the AWS CloudFormation stack that contains the resources already exists, the script updates it with any changes to the template or function code.

Cleanup

To delete the sample application that you created, use the AWS CLI. Assuming you used your project name for the stack name, you can run the following:

aws cloudformation delete-stack --stack-name aws-account-contact-bootstrap

Or use the cleanup.sh script with deployment region as input

 $ ./cleanup.sh us-east-1

License

This solution is licensed under the MIT-0 License. See the LICENSE file.

aws-account-alternate-contacts-bootstrap's People

Contributors

amazon-auto avatar avisaws avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

aws-account-alternate-contacts-bootstrap's Issues

Lambda does not work any more

I used sam to install this into our payer acocunt, and when I added a new account this error was spit out by lambda:

Response
{
  "errorMessage": "Unable to import module 'create_account_event/handle_create_account_event': cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/var/task/urllib3/util/ssl_.py)",
  "errorType": "Runtime.ImportModuleError",
  "requestId": "74476b80-5163-4915-96b3-0b67d8f6ddb5",
  "stackTrace": []
}

Function Logs
START RequestId: 74476b80-5163-4915-96b3-0b67d8f6ddb5 Version: $LATEST
[ERROR] Runtime.ImportModuleError: Unable to import module 'create_account_event/handle_create_account_event': cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl_' (/var/task/urllib3/util/ssl_.py)
Traceback (most recent call last):END RequestId: 74476b80-5163-4915-96b3-0b67d8f6ddb5
REPORT RequestId: 74476b80-5163-4915-96b3-0b67d8f6ddb5	Duration: 1.96 ms	Billed Duration: 2 ms	Memory Size: 128 MB	Max Memory Used: 50 MB	Init Duration: 306.24 ms

Request ID
74476b80-5163-4915-96b3-0b67d8f6ddb5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.