美文网首页
AWS踩坑指南

AWS踩坑指南

作者: i_Eloise | 来源:发表于2018-03-05 15:49 被阅读0次

1.nones and free tier

  • EC2 just like a computer with only an operating system. The free tier for it
    is 750 hours which means you can continuously run an instance in your account for 31 days or you can choose to run 2 instance for 15 days for each of it.
  • Elastic IP: It is a static IP address which can be associated with your EC2 Instance. So if you shut down your EC2 and restart your EC2, the IP address would not be changed. But for free tier, if Elastic IP is not associated with a running instance or an instance is associated with more than one elastic IP address, you would be charge for fee.
  • difference between EC2 and Elastic Beanstalk:simply, EC2 is IaaS and Elastic Beanstalk is PaaS. Therefore, Elastic Beanstalk is more easy-to-use. You can simply upload the code and Elastic Beanstalk would automatically help you configure the infrastructure.
  • difference between S3 and RDS:S3 is a storage place, you can upload or retrieve data from it and RDS provide database service.

2.glassfish server & Derby database & Netbean

1)install glassfish and configure it
2)edit inbound and outbound rule in EC2
3)add JDBC connection pool in glassfish(can use ping to check the connection)
this step is very important, you have to setup right server name, database name, user name and also password in order to be able to connect to the database.
4)add JDBC resources in glassfish
5)In Netbean, you should connect to the server, otherwise, you would not be able to deploy your application. You can also connect to your database to check the data.
6)You also need to set up the JDBC connection and JDBC resource for your application.
DB.java & glassfish_resource.xml is related for database conenction in the project. In glassfish_resource, JDBC connection pool and JDBC resource is able to be seen.

3. S3

build a bucket

image.png
need to be remined:
  • import associated jar library in to your code project
    image.png
    image.png
  • need to change the withRegion to the region that your EC2 instance in.
    image.png
  • need to copy .aws with credential in it to:

4.RDS

need to change connector to a lower edition, if you have the following problem:


image.png

5.Elastic beanstalk

should be aware that the application in Elastic Beanstalk still use the data stored in Derby database in Glassfish. And therefore, we should change the URL in DB.java and also change the JDBC connection and resource(make sure the database URL is correct).

相关文章

  • AWS踩坑指南

    1.nones and free tier EC2 just like a computer with only ...

  • JavaScrip-StepPitGuide《JavaScrip

    《JavaScript踩坑指南》JavaScrip-StepPitGuide? 《JavaScript踩坑指南》 ...

  • Autoscaling GitLab Runner on AWS

    Autoscaling GitLab Runner on AWS 踩坑[https://mp.weixin.qq....

  • 前端学习安利

    前端面试题nuxt踩坑指南WebGLes6flexboxasync/awaitwebDocsVue keep-al...

  • AWS Secrets Manager 踩坑记

    最近项目上在引入AWS Secrets Manager[https://aws.amazon.com/secret...

  • 源码编译安装TensorFlow

    Ubuntu16.04 编译安装TensorFlow踩坑指南,参考官方文档 使用pip安装TensorFlow在运...

  • Vue踩坑指南

    在v-for渲染的时候, 如果遇到中途删除某一节点的情况触发重新渲染, 此时data里面的数据不刷新, 例如:对于...

  • mpvue“踩坑”指南

    mpvue是一个使用 Vue.js 开发小程序的前端框架。框架基于 Vue.js 核心,框架整体和vue语法保持一...

  • Robolectric踩坑指南

    一、介绍 自己百度去吧。 二、项目配置 1、针对Android Studio在build.gradle中添加: 2...

  • Mockito踩坑指南

    由于Spring/Spring Boot中支持Mockito框架,所以我们的注解可以直接使用@RunWith(Sp...

网友评论

      本文标题:AWS踩坑指南

      本文链接:https://www.haomeiwen.com/subject/wikhfftx.html