Git Product home page Git Product logo

aws-s3-cross-account-access-with-terraform's Introduction

AWS-S3-CROSS-ACCOUNT-ACCESS-WITH-TERRAFORM

AWS-S3-CROSS-ACCOUNT-ACCESS-WITH-TERRAFORM

This module was built VPC IN ACCOUN-A AND BUILD S3 BUCKET IN ACCOUN-B cookiecutter-microservice.

RESOURCES

ACCOUNT-A

vpc ec2 s3 private link

ACCOUNT-B In Account B s3 Bucket bucket policy

Usage

There are two instances in ACCOUNT-A both PUBLIC and AND PRIVATE instance in ACCOUNT-A. and the private instance kept in a private subnet needs to Access in s3 bucket Found in Account-B

Account a is open to port 22

ssh -i id_rsa ec2-user@publicIpp

Create a file in and and copy the content of "id_rsa" in the file

cat > id_rsa 
-----BEGIN RSA PRIVATE KEY-----
MIIG5AIBAAKCAYEA4zQL1pUg7p4AWeTrtsgwwbLobfGUqAB11hlDGYDWeOWKXpbCq
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dS9pIuI0jwOrfjGM4sWyGKk8hPehg92e^%%%Iwpa38CpCd42yb68w==
-----END RSA PRIVATE KEY-----

change permision on the file

chmod 400 id_rsa

ssh to private instance in using the newly created key

ssh -i id_rsa ec2-user@private_ip

Now the test the connection and make sure we can access s3 object in ACCOUNT-B

aws s3 ls s3://BUCKETNAME

Authour

[email protected]

aws-s3-cross-account-access-with-terraform's People

Contributors

bkoji1150 avatar

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.