Example #1
0
File: init.go Project: elizar/apex
// Run command.
func run(c *cobra.Command, args []string) error {
	if err := root.Prepare(c, args); err != nil {
		return err
	}

	region := root.Config.Region
	if region == nil {
		return errors.New("AWS region missing, are your credentials set up? Visit http://apex.run/#aws-credentials for more details")
	}

	return boot.All(*region)
}
Example #2
0
// Run command.
func run(c *cobra.Command, args []string) error {
	stats.Track("Init", nil)

	if err := root.Prepare(c, args); err != nil {
		return err
	}

	region := root.Config.Region
	if region == nil {
		return errors.New(credentialsError)
	}

	b := boot.Bootstrapper{
		IAM:    iam.New(root.Session),
		Region: *region,
	}

	return b.Boot()
}