Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs

License

NotificationsYou must be signed in to change notification settings

UlisesGascon/sample-terraform-localstack

Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs.

Important

As this is a simple example I will use only this references. Please change it 😉

AWS_ACCESS_KEY_ID='123'AWS_SECRET_KEY='xyz'AWS_BUCKET_NAME='demo-bucket'AWS_BUCKET_REGION='us-east-1'

What is this about?

Previous Steps...

  • You need to installDocker and Docker Compose to play this game 😉
  • You need to simulate AWS in local?.
    • I usedLocalstack as part of the docker compose dependencies. Let's keep it simple and clean 💪
    • Just rundocker-compose up
    • Checkhttp://localhost:8055/#/infra

Time to play

  • You need to run/testTerraform scripts?
    • You need toinstall Terraform in your machine (for mac:brew install terraform)
    • Check the example filemain.tf
    • Initialize the enviromentterraform init
    • Execute itterraform apply
    • Checkhttp://localhost:4572/ andhttp://localhost:8055/#/infra
  • You need to run AWS Cli commands?
    • You need to installAWS CLI (for mac:brew install awscli)
    • Example of bucket creation
      • Update you configaws config check.env
      • Create Bucketaws --endpoint-url=http://localhost:4572 s3 mb s3://demo-bucket
      • Attach anACL to the bucket so it is readableaws --endpoint-url=http://localhost:4572 s3api put-bucket-acl --bucket demo-bucket --acl public-read
    • Checkhttp://localhost:4572/ andhttp://localhost:8055/#/infra
  • You need to run SDK Scripts?
    • Install Node
    • Checkaws.js andupload-demo.js
    • Install dependenciesnpm install
    • Run the scriptnode upload-demo
    • Check./localstack/data files

Context (Please Read)

About

Sample project to use Terraform, Localstack (AWS Local) and Docker compose with Nodejs

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp